summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ccf150)
raw | patch | inline | side by side (parent: 8ccf150)
author | Tim-Philipp Müller <tim@centricular.net> | |
Mon, 19 May 2008 10:46:44 +0000 (10:46 +0000) | ||
committer | Tim-Philipp Müller <tim@centricular.net> | |
Mon, 19 May 2008 10:46:44 +0000 (10:46 +0000) |
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gsttypefind.c: (gst_type_find_suggest_simple):
* gst/gsttypefind.h:
* win32/common/libgstreamer.def:
API: add gst_type_find_suggest_simple(), #533740.
* docs/gst/gstreamer-sections.txt:
* gst/gsttypefind.c: (gst_type_find_suggest_simple):
* gst/gsttypefind.h:
* win32/common/libgstreamer.def:
API: add gst_type_find_suggest_simple(), #533740.
diff --git a/ChangeLog b/ChangeLog
index 834cfa65c28a6ec33d8ccc04cf639954f0d72851..9a0260c3637c1d0ba1d5d120062e8d37b1707f6a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2008-05-19 Tim-Philipp Müller <tim.muller at collabora co uk>
+
+ * docs/gst/gstreamer-sections.txt:
+ * gst/gsttypefind.c: (gst_type_find_suggest_simple):
+ * gst/gsttypefind.h:
+ * win32/common/libgstreamer.def:
+ API: add gst_type_find_suggest_simple(), #533740.
+
2008-05-19 Tim-Philipp Müller <tim.muller at collabora co uk>
* libs/gst/base/gstbasesrc.c: (gst_base_src_start):
index 21296c595dbe33b820935957606003c6c9ab359c..9d81be97051732b8bd9562c2652a084b23c2d1c4 100644 (file)
GstTypeFindProbability
gst_type_find_peek
gst_type_find_suggest
+gst_type_find_suggest_simple
gst_type_find_get_length
gst_type_find_register
<SUBSECTION Standard>
diff --git a/gst/gsttypefind.c b/gst/gsttypefind.c
index 219b03b2c81a608ca7b4a511d04dadaea7cfe08f..683ccc98cb6962903355d8648354f2c681497016 100644 (file)
--- a/gst/gsttypefind.c
+++ b/gst/gsttypefind.c
find->suggest (find->data, probability, caps);
}
+/**
+ * gst_type_find_suggest_simple:
+ * @find: The #GstTypeFind object the function was called with
+ * @probability: The probability in percent that the suggestion is right
+ * @media_type: the media type of the suggested caps
+ * @fieldname: first field of the suggested caps, or NULL
+ * @...: additional arguments to the suggested caps in the same format as the
+ * arguments passed to gst_structure_new() (ie. triplets of field name,
+ * field GType and field value)
+ *
+ * If a #GstTypeFindFunction calls this function it suggests the caps with the
+ * given probability. A #GstTypeFindFunction may supply different suggestions
+ * in one call. It is up to the caller of the #GstTypeFindFunction to interpret
+ * these values.
+ *
+ * This function is similar to gst_type_find_suggest(), only that instead of
+ * passing a #GstCaps argument you can create the caps on the fly in the same
+ * way as you can with gst_caps_new_simple().
+ *
+ * Make sure you terminate the list of arguments with a NULL argument and that
+ * the values passed have the correct type (in terms of width in bytes when
+ * passed to the vararg function - this applies particularly to gdouble and
+ * guint64 arguments).
+ *
+ * Since: 0.10.20
+ */
+void
+gst_type_find_suggest_simple (GstTypeFind * find, guint probability,
+ const char *media_type, const char *fieldname, ...)
+{
+ GstStructure *structure;
+ va_list var_args;
+ GstCaps *caps;
+
+ g_return_if_fail (find->suggest != NULL);
+ g_return_if_fail (probability <= 100);
+ g_return_if_fail (media_type != NULL);
+
+ caps = gst_caps_new_empty ();
+
+ va_start (var_args, fieldname);
+ structure = gst_structure_new_valist (media_type, fieldname, var_args);
+ va_end (var_args);
+
+ gst_caps_append_structure (caps, structure);
+ g_return_if_fail (gst_caps_is_fixed (caps));
+
+ find->suggest (find->data, probability, caps);
+ gst_caps_unref (caps);
+}
+
/**
* gst_type_find_get_length:
* @find: The #GstTypeFind the function was called with
diff --git a/gst/gsttypefind.h b/gst/gsttypefind.h
index 5b613d7e74a774a7222eda5ecdc917f0b813bbb2..6e1f049786f5c304f7a1bfa771d8d5d6656d474b 100644 (file)
--- a/gst/gsttypefind.h
+++ b/gst/gsttypefind.h
guint probability,
const GstCaps * caps);
+void gst_type_find_suggest_simple (GstTypeFind * find,
+ guint probability,
+ const char * media_type,
+ const char * fieldname, ...);
+
guint64 gst_type_find_get_length (GstTypeFind * find);
/* registration interface */
index d60e562942d1fcd29fad82171e1ff3df32b20dfe..9be809b3854438b56d1a7c7f2ca86c84817491ef 100644 (file)
gst_type_find_probability_get_type
gst_type_find_register
gst_type_find_suggest
+ gst_type_find_suggest_simple
gst_type_register_static_full
gst_update_registry
gst_uri_construct