X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgsttaglist.c;h=56e6a46b6e407bc734e5f5010ea5c33cc370006f;hb=dc5a62f70234f729c0f3443ab725e9f0232cc1fe;hp=d978b2d440d4f1fa670f7eeb8c1931c3bc0ea743;hpb=e7a77927ffb51cfe9937a08399dff8349be8cf3a;p=platform%2Fupstream%2Fgstreamer.git diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index d978b2d..56e6a46 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -15,19 +15,19 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. */ /** * SECTION:gsttaglist + * @title: GstTagList * @short_description: List of tags and values used to describe media metadata * * List of tags and values used to describe media metadata. * - * Strings must be in ASCII or UTF-8 encoding. No other encodings are allowed. - * - * Last reviewed on 2009-06-09 (0.10.23) + * Strings in structures must be ASCII or UTF-8 encoded. Other encodings are + * not allowed. Strings must not be empty or %NULL. */ #ifdef HAVE_CONFIG_H @@ -85,6 +85,7 @@ static GMutex __tag_mutex; /* tags hash table: maps tag name string => GstTagInfo */ static GHashTable *__tags; +GType _gst_tag_list_type = 0; GST_DEFINE_MINI_OBJECT_TYPE (GstTagList, gst_tag_list); static void __gst_tag_list_free (GstTagList * list); @@ -99,6 +100,8 @@ _priv_gst_tag_initialize (void) { g_mutex_init (&__tag_mutex); + _gst_tag_list_type = gst_tag_list_get_type (); + __tags = g_hash_table_new (g_str_hash, g_str_equal); gst_tag_register_static (GST_TAG_TITLE, GST_TAG_FLAG_META, G_TYPE_STRING, @@ -219,6 +222,10 @@ _priv_gst_tag_initialize (void) _("composer"), _("person(s) who composed the recording"), gst_tag_merge_strings_with_comma); + gst_tag_register_static (GST_TAG_CONDUCTOR, GST_TAG_FLAG_META, + G_TYPE_STRING, + _("conductor"), + _("conductor/performer refinement"), gst_tag_merge_strings_with_comma); gst_tag_register_static (GST_TAG_DURATION, GST_TAG_FLAG_DECODED, G_TYPE_UINT64, _("duration"), _("length in GStreamer time units (nanoseconds)"), NULL); @@ -387,6 +394,22 @@ _priv_gst_tag_initialize (void) gst_tag_register_static (GST_TAG_IMAGE_ORIENTATION, GST_TAG_FLAG_META, G_TYPE_STRING, _("image orientation"), _("How the image should be rotated or flipped before display"), NULL); + gst_tag_register_static (GST_TAG_PUBLISHER, GST_TAG_FLAG_META, + G_TYPE_STRING, + _("publisher"), + _("Name of the label or publisher"), gst_tag_merge_strings_with_comma); + gst_tag_register_static (GST_TAG_INTERPRETED_BY, GST_TAG_FLAG_META, + G_TYPE_STRING, + _("interpreted-by"), + _("Information about the people behind a remix and similar " + "interpretations"), gst_tag_merge_strings_with_comma); + gst_tag_register_static (GST_TAG_MIDI_BASE_NOTE, GST_TAG_FLAG_META, + G_TYPE_UINT, + _("midi-base-note"), _("Midi note number of the audio track."), NULL); + gst_tag_register_static (GST_TAG_PRIVATE_DATA, GST_TAG_FLAG_META, + GST_TYPE_SAMPLE, + _("private-data"), _("Private data"), gst_tag_merge_use_first); + } /** @@ -448,13 +471,13 @@ gst_tag_lookup (const gchar * tag_name) } /** - * gst_tag_register: + * gst_tag_register: (skip) * @name: the name or identifier string * @flag: a flag describing the type of tag info * @type: the type this data is in * @nick: human-readable name * @blurb: a human-readable description about this tag - * @func: function for merging multiple values of this tag, or NULL + * @func: (allow-none): function for merging multiple values of this tag, or %NULL * * Registers a new tag type for the use with GStreamer's type system. If a type * with that name is already registered, that one is used. @@ -463,7 +486,7 @@ gst_tag_lookup (const gchar * tag_name) * * Important: if you do not supply a merge function the implication will be * that there can only be one single value for this tag in a tag list and - * any additional values will silenty be discarded when being added (unless + * any additional values will silently be discarded when being added (unless * #GST_TAG_MERGE_REPLACE, #GST_TAG_MERGE_REPLACE_ALL, or * #GST_TAG_MERGE_PREPEND is used as merge mode, in which case the new * value will replace the old one in the list). @@ -487,18 +510,18 @@ gst_tag_register (const gchar * name, GstTagFlag flag, GType type, g_return_if_fail (blurb != NULL); g_return_if_fail (type != 0 && type != GST_TYPE_LIST); - return gst_tag_register_static (g_intern_string (name), flag, type, + gst_tag_register_static (g_intern_string (name), flag, type, g_intern_string (nick), g_intern_string (blurb), func); } /** - * gst_tag_register_static: + * gst_tag_register_static: (skip) * @name: the name or identifier string (string constant) * @flag: a flag describing the type of tag info * @type: the type this data is in * @nick: human-readable name or short description (string constant) * @blurb: a human-readable description for this tag (string constant) - * @func: function for merging multiple values of this tag, or NULL + * @func: (allow-none): function for merging multiple values of this tag, or %NULL * * Registers a new tag type for the use with GStreamer's type system. * @@ -544,7 +567,7 @@ gst_tag_register_static (const gchar * name, GstTagFlag flag, GType type, * * Checks if the given type is already registered. * - * Returns: TRUE if the type is already registered + * Returns: %TRUE if the type is already registered */ gboolean gst_tag_exists (const gchar * tag) @@ -581,7 +604,7 @@ gst_tag_get_type (const gchar * tag) * Returns the human-readable name of this tag, You must not change or free * this string. * - * Returns: the human-readable name of this tag + * Returns: (nullable): the human-readable name of this tag */ const gchar * gst_tag_get_nick (const gchar * tag) @@ -590,7 +613,11 @@ gst_tag_get_nick (const gchar * tag) g_return_val_if_fail (tag != NULL, NULL); info = gst_tag_lookup (tag); - g_return_val_if_fail (info != NULL, NULL); + if (!info) { + GST_WARNING ("Unknown tag: %s", tag); + + return tag; + } return info->nick; } @@ -602,7 +629,7 @@ gst_tag_get_nick (const gchar * tag) * Returns the human-readable description of this tag, You must not change or * free this string. * - * Returns: the human-readable description of this tag + * Returns: (nullable): the human-readable description of this tag */ const gchar * gst_tag_get_description (const gchar * tag) @@ -643,7 +670,7 @@ gst_tag_get_flag (const gchar * tag) * Checks if the given tag is fixed. A fixed tag can only contain one value. * Unfixed tags can contain lists of values. * - * Returns: TRUE, if the given tag is fixed. + * Returns: %TRUE, if the given tag is fixed. */ gboolean gst_tag_is_fixed (const gchar * tag) @@ -659,7 +686,7 @@ gst_tag_is_fixed (const gchar * tag) /* takes ownership of the structure */ static GstTagList * -gst_tag_list_new_internal (GstStructure * s) +gst_tag_list_new_internal (GstStructure * s, GstTagScope scope) { GstTagList *tag_list; @@ -672,7 +699,7 @@ gst_tag_list_new_internal (GstStructure * s) (GstMiniObjectFreeFunction) __gst_tag_list_free); GST_TAG_LIST_STRUCTURE (tag_list) = s; - GST_TAG_LIST_SCOPE (tag_list) = GST_TAG_SCOPE_STREAM; + GST_TAG_LIST_SCOPE (tag_list) = scope; #ifdef DEBUG_REFCOUNT GST_CAT_TRACE (GST_CAT_TAGS, "created taglist %p", tag_list); @@ -692,6 +719,10 @@ __gst_tag_list_free (GstTagList * list) gst_structure_free (GST_TAG_LIST_STRUCTURE (list)); +#ifdef USE_POISONING + memset (list, 0xff, sizeof (GstTagListImpl)); +#endif + g_slice_free1 (sizeof (GstTagListImpl), list); } @@ -703,7 +734,8 @@ __gst_tag_list_copy (const GstTagList * list) g_return_val_if_fail (GST_IS_TAG_LIST (list), NULL); s = GST_TAG_LIST_STRUCTURE (list); - return gst_tag_list_new_internal (gst_structure_copy (s)); + return gst_tag_list_new_internal (gst_structure_copy (s), + GST_TAG_LIST_SCOPE (list)); } /** @@ -722,17 +754,17 @@ gst_tag_list_new_empty (void) GstTagList *tag_list; s = gst_structure_new_id_empty (GST_QUARK (TAGLIST)); - tag_list = gst_tag_list_new_internal (s); + tag_list = gst_tag_list_new_internal (s, GST_TAG_SCOPE_STREAM); return tag_list; } /** * gst_tag_list_new: * @tag: tag - * @...: NULL-terminated list of values to set + * @...: %NULL-terminated list of values to set * * Creates a new taglist and appends the values for the given tags. It expects - * tag-value pairs like gst_tag_list_add(), and a NULL terminator after the + * tag-value pairs like gst_tag_list_add(), and a %NULL terminator after the * last pair. The type of the values is implicit and is documented in the API * reference, but can also be queried at runtime with gst_tag_get_type(). It * is an error to pass a value of a type not matching the tag type into this @@ -830,8 +862,9 @@ gst_tag_list_get_scope (const GstTagList * list) * * Serializes a tag list to a string. * - * Returns: a newly-allocated string, or NULL in case of an error. The - * string must be freed with g_free() when no longer needed. + * Returns: (nullable): a newly-allocated string, or %NULL in case of + * an error. The string must be freed with g_free() when no longer + * needed. */ gchar * gst_tag_list_to_string (const GstTagList * list) @@ -847,17 +880,24 @@ gst_tag_list_to_string (const GstTagList * list) * * Deserializes a tag list. * - * Returns: a new #GstTagList, or NULL in case of an error. + * Returns: (nullable): a new #GstTagList, or %NULL in case of an + * error. */ GstTagList * gst_tag_list_new_from_string (const gchar * str) { GstTagList *tag_list; + GstStructure *s; g_return_val_if_fail (str != NULL, NULL); g_return_val_if_fail (g_str_has_prefix (str, "taglist"), NULL); - tag_list = gst_tag_list_new_internal (gst_structure_from_string (str, NULL)); + s = gst_structure_from_string (str, NULL); + if (s == NULL) + return NULL; + + tag_list = gst_tag_list_new_internal (s, GST_TAG_SCOPE_STREAM); + return tag_list; } @@ -902,7 +942,7 @@ gst_tag_list_nth_tag_name (const GstTagList * list, guint index) * * Checks if the given taglist is empty. * - * Returns: TRUE if the taglist is empty, otherwise FALSE. + * Returns: %TRUE if the taglist is empty, otherwise %FALSE. */ gboolean gst_tag_list_is_empty (const GstTagList * list) @@ -941,7 +981,7 @@ gst_tag_list_fields_equal (const GValue * value1, const GValue * value2) * * Checks if the two given taglists are equal. * - * Returns: TRUE if the taglists are equal, otherwise FALSE + * Returns: %TRUE if the taglists are equal, otherwise %FALSE */ gboolean gst_tag_list_is_equal (const GstTagList * list1, const GstTagList * list2) @@ -1025,14 +1065,20 @@ gst_tag_list_add_value_internal (GstTagList * tag_list, GstTagMergeMode mode, gst_structure_id_set_value (list, tag_quark, value); break; case GST_TAG_MERGE_PREPEND: - gst_value_list_merge (&dest, value, value2); - gst_structure_id_set_value (list, tag_quark, &dest); - g_value_unset (&dest); + if (GST_VALUE_HOLDS_LIST (value2) && !GST_VALUE_HOLDS_LIST (value)) + gst_value_list_prepend_value ((GValue *) value2, value); + else { + gst_value_list_merge (&dest, value, value2); + gst_structure_id_take_value (list, tag_quark, &dest); + } break; case GST_TAG_MERGE_APPEND: - gst_value_list_merge (&dest, value2, value); - gst_structure_id_set_value (list, tag_quark, &dest); - g_value_unset (&dest); + if (GST_VALUE_HOLDS_LIST (value2) && !GST_VALUE_HOLDS_LIST (value)) + gst_value_list_append_value ((GValue *) value2, value); + else { + gst_value_list_merge (&dest, value2, value); + gst_structure_id_take_value (list, tag_quark, &dest); + } break; case GST_TAG_MERGE_KEEP: case GST_TAG_MERGE_KEEP_ALL: @@ -1105,16 +1151,16 @@ gst_tag_list_insert (GstTagList * into, const GstTagList * from, /** * gst_tag_list_merge: - * @list1: first list to merge - * @list2: second list to merge + * @list1: (allow-none): first list to merge + * @list2: (allow-none): second list to merge * @mode: the mode to use * - * Merges the two given lists into a new list. If one of the lists is NULL, a - * copy of the other is returned. If both lists are NULL, NULL is returned. + * Merges the two given lists into a new list. If one of the lists is %NULL, a + * copy of the other is returned. If both lists are %NULL, %NULL is returned. * * Free-function: gst_tag_list_unref * - * Returns: (transfer full): the new list + * Returns: (transfer full) (nullable): the new list */ GstTagList * gst_tag_list_merge (const GstTagList * list1, const GstTagList * list2, @@ -1174,7 +1220,7 @@ gst_tag_list_get_tag_size (const GstTagList * list, const gchar * tag) * @list: list to set tags in * @mode: the mode to use * @tag: tag - * @...: NULL-terminated list of values to set + * @...: %NULL-terminated list of values to set * * Sets the values for the given tags using the specified mode. */ @@ -1257,7 +1303,7 @@ gst_tag_list_add_valist (GstTagList * list, GstTagMergeMode mode, g_warning ("%s: %s", G_STRLOC, error); g_free (error); /* we purposely leak the value here, it might not be - * in a sane state if an error condition occoured + * in a sane state if an error condition occurred */ return; } @@ -1341,6 +1387,7 @@ void gst_tag_list_remove_tag (GstTagList * list, const gchar * tag) { g_return_if_fail (GST_IS_TAG_LIST (list)); + g_return_if_fail (gst_tag_list_is_writable (list)); g_return_if_fail (tag != NULL); gst_structure_remove_field (GST_TAG_LIST_STRUCTURE (list), tag); @@ -1398,8 +1445,9 @@ gst_tag_list_foreach (const GstTagList * list, GstTagForeachFunc func, * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: (transfer none): The GValue for the specified entry or NULL if the - * tag wasn't available or the tag doesn't have as many entries + * Returns: (transfer none) (nullable): The GValue for the specified + * entry or %NULL if the tag wasn't available or the tag + * doesn't have as many entries */ const GValue * gst_tag_list_get_value_index (const GstTagList * list, const gchar * tag, @@ -1436,7 +1484,7 @@ gst_tag_list_get_value_index (const GstTagList * list, const gchar * tag, * with the tag. * You must g_value_unset() the value after use. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ gboolean @@ -1470,7 +1518,7 @@ gst_tag_list_copy_value (GValue * dest, const GstTagList * list, return TRUE; } -/* FIXME 0.11: this whole merge function business is overdesigned, and the +/* FIXME 2.0: this whole merge function business is overdesigned, and the * _get_foo() API is misleading as well - how many application developers will * expect gst_tag_list_get_string (list, GST_TAG_ARTIST, &val) might return a * string with multiple comma-separated artists? _get_foo() should just be @@ -1526,7 +1574,7 @@ gst_tag_list_get_ ## name ## _index (const GstTagList *list, \ * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1539,7 +1587,7 @@ gst_tag_list_get_ ## name ## _index (const GstTagList *list, \ * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (boolean, gboolean, TRUE); @@ -1552,7 +1600,7 @@ TAG_MERGE_FUNCS (boolean, gboolean, TRUE); * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1565,7 +1613,7 @@ TAG_MERGE_FUNCS (boolean, gboolean, TRUE); * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (int, gint, TRUE); @@ -1578,7 +1626,7 @@ TAG_MERGE_FUNCS (int, gint, TRUE); * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1591,11 +1639,23 @@ TAG_MERGE_FUNCS (int, gint, TRUE); * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (uint, guint, TRUE); /** + * gst_tag_list_get_int64: + * @list: a #GstTagList to get the tag from + * @tag: tag to read out + * @value: (out): location for the result + * + * Copies the contents for the given tag into the value, merging multiple values + * into one if multiple values are associated with the tag. + * + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + * given list. + */ +/** * gst_tag_list_get_int64_index: * @list: a #GstTagList to get the tag from * @tag: tag to read out @@ -1605,7 +1665,7 @@ TAG_MERGE_FUNCS (uint, guint, TRUE); * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (int64, gint64, TRUE); @@ -1618,7 +1678,7 @@ TAG_MERGE_FUNCS (int64, gint64, TRUE); * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1631,7 +1691,7 @@ TAG_MERGE_FUNCS (int64, gint64, TRUE); * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (uint64, guint64, TRUE); @@ -1644,7 +1704,7 @@ TAG_MERGE_FUNCS (uint64, guint64, TRUE); * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1657,7 +1717,7 @@ TAG_MERGE_FUNCS (uint64, guint64, TRUE); * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (float, gfloat, TRUE); @@ -1670,7 +1730,7 @@ TAG_MERGE_FUNCS (float, gfloat, TRUE); * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1683,7 +1743,7 @@ TAG_MERGE_FUNCS (float, gfloat, TRUE); * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (double, gdouble, TRUE); @@ -1696,7 +1756,7 @@ TAG_MERGE_FUNCS (double, gdouble, TRUE); * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1709,7 +1769,7 @@ TAG_MERGE_FUNCS (double, gdouble, TRUE); * Gets the value that is at the given index for the given tag in the given * list. * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (pointer, gpointer, (*value != NULL)); @@ -1740,11 +1800,11 @@ _gst_strdup0 (const gchar * s) * * The resulting string in @value will be in UTF-8 encoding and should be * freed by the caller using g_free when no longer needed. The - * returned string is also guaranteed to be non-NULL and non-empty. + * returned string is also guaranteed to be non-%NULL and non-empty. * * Free-function: g_free * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ /** @@ -1759,17 +1819,17 @@ _gst_strdup0 (const gchar * s) * * The resulting string in @value will be in UTF-8 encoding and should be * freed by the caller using g_free when no longer needed. The - * returned string is also guaranteed to be non-NULL and non-empty. + * returned string is also guaranteed to be non-%NULL and non-empty. * * Free-function: g_free * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ TAG_MERGE_FUNCS (string, gchar *, (*value != NULL)); /* - *FIXME 0.11: Instead of _peek (non-copy) and _get (copy), we could have + *FIXME 2.0: Instead of _peek (non-copy) and _get (copy), we could have * _get (non-copy) and _dup (copy) for strings, seems more * widely used */ @@ -1785,9 +1845,9 @@ TAG_MERGE_FUNCS (string, gchar *, (*value != NULL)); * * The resulting string in @value will be in UTF-8 encoding and doesn't need * to be freed by the caller. The returned string is also guaranteed to - * be non-NULL and non-empty. + * be non-%NULL and non-empty. * - * Returns: TRUE, if a value was set, FALSE if the tag didn't exist in the + * Returns: %TRUE, if a value was set, %FALSE if the tag didn't exist in the * given list. */ gboolean @@ -1819,8 +1879,8 @@ gst_tag_list_peek_string_index (const GstTagList * list, * * Free-function: g_date_free * - * Returns: TRUE, if a date was copied, FALSE if the tag didn't exist in the - * given list or if it was #NULL. + * Returns: %TRUE, if a date was copied, %FALSE if the tag didn't exist in the + * given list or if it was %NULL. */ gboolean gst_tag_list_get_date (const GstTagList * list, const gchar * tag, @@ -1852,8 +1912,8 @@ gst_tag_list_get_date (const GstTagList * list, const gchar * tag, * * Free-function: g_date_free * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the - * given list or if it was #NULL. + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + * given list or if it was %NULL. */ gboolean gst_tag_list_get_date_index (const GstTagList * list, @@ -1884,8 +1944,8 @@ gst_tag_list_get_date_index (const GstTagList * list, * * Free-function: gst_date_time_unref * - * Returns: TRUE, if a datetime was copied, FALSE if the tag didn't exist in - * thegiven list or if it was #NULL. + * Returns: %TRUE, if a datetime was copied, %FALSE if the tag didn't exist in + * the given list or if it was %NULL. */ gboolean gst_tag_list_get_date_time (const GstTagList * list, const gchar * tag, @@ -1900,8 +1960,6 @@ gst_tag_list_get_date_time (const GstTagList * list, const gchar * tag, if (!gst_tag_list_copy_value (&v, list, tag)) return FALSE; - g_return_val_if_fail (GST_VALUE_HOLDS_DATE_TIME (&v), FALSE); - *value = (GstDateTime *) g_value_dup_boxed (&v); g_value_unset (&v); return (*value != NULL); @@ -1920,8 +1978,8 @@ gst_tag_list_get_date_time (const GstTagList * list, const gchar * tag, * * Free-function: gst_date_time_unref * - * Returns: TRUE, if a value was copied, FALSE if the tag didn't exist in the - * given list or if it was #NULL. + * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the + * given list or if it was %NULL. */ gboolean gst_tag_list_get_date_time_index (const GstTagList * list, @@ -1954,8 +2012,8 @@ gst_tag_list_get_date_time_index (const GstTagList * list, * * Free-function: gst_sample_unref * - * Returns: TRUE, if a sample was returned, FALSE if the tag didn't exist in - * the given list or if it was #NULL. + * Returns: %TRUE, if a sample was returned, %FALSE if the tag didn't exist in + * the given list or if it was %NULL. */ gboolean gst_tag_list_get_sample (const GstTagList * list, const gchar * tag, @@ -1983,15 +2041,15 @@ gst_tag_list_get_sample (const GstTagList * list, const gchar * tag, * pointer variable to store the result into * * Gets the sample that is at the given index for the given tag in the given - * list and copies it into the variable pointed to by @smple. Free the sample + * list and copies it into the variable pointed to by @sample. Free the sample * with gst_sample_unref() when it is no longer needed. You can retrieve the * buffer from the sample using gst_sample_get_buffer() and the associated * caps (if any) with gst_sample_get_caps(). * * Free-function: gst_sample_unref * - * Returns: TRUE, if a sample was copied, FALSE if the tag didn't exist in the - * given list or if it was #NULL. + * Returns: %TRUE, if a sample was copied, %FALSE if the tag didn't exist in the + * given list or if it was %NULL. */ gboolean gst_tag_list_get_sample_index (const GstTagList * list,