}
/**
- * gst_tag_list_new:
+ * gst_tag_list_new_empty:
*
* Creates a new empty GstTagList.
*
* Returns: (transfer full): An empty tag list
*/
GstTagList *
-gst_tag_list_new (void)
+gst_tag_list_new_empty (void)
{
return GST_TAG_LIST (gst_structure_id_empty_new (GST_QUARK (TAGLIST)));
}
/**
- * gst_tag_list_new_full:
+ * gst_tag_list_new:
* @tag: tag
* @...: NULL-terminated list of values to set
*
*
* Since: 0.10.24
*/
-/* FIXME 0.11: rename gst_tag_list_new_full to _new and _new to _new_empty */
GstTagList *
-gst_tag_list_new_full (const gchar * tag, ...)
+gst_tag_list_new (const gchar * tag, ...)
{
GstTagList *list;
va_list args;
g_return_val_if_fail (tag != NULL, NULL);
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
va_start (args, tag);
gst_tag_list_add_valist (list, GST_TAG_MERGE_APPEND, tag, args);
va_end (args);
}
/**
- * gst_tag_list_new_full_valist:
+ * gst_tag_list_new_valist:
* @var_args: tag / value pairs to set
*
- * Just like gst_tag_list_new_full(), only that it takes a va_list argument.
+ * Just like gst_tag_list_new(), only that it takes a va_list argument.
* Useful mostly for language bindings.
*
* Free-function: gst_tag_list_free
* Since: 0.10.24
*/
GstTagList *
-gst_tag_list_new_full_valist (va_list var_args)
+gst_tag_list_new_valist (va_list var_args)
{
GstTagList *list;
const gchar *tag;
- list = gst_tag_list_new ();
+ list = gst_tag_list_new_empty ();
tag = va_arg (var_args, gchar *);
gst_tag_list_add_valist (list, GST_TAG_MERGE_APPEND, tag, var_args);
}
/* create empty list, we need to do this to correctly handling merge modes */
- list1_cp = (list1) ? gst_tag_list_copy (list1) : gst_tag_list_new ();
- list2_cp = (list2) ? list2 : gst_tag_list_new ();
+ list1_cp = (list1) ? gst_tag_list_copy (list1) : gst_tag_list_new_empty ();
+ list2_cp = (list2) ? list2 : gst_tag_list_new_empty ();
gst_tag_list_insert (list1_cp, list2_cp, mode);
#define NEW_LIST_FIXED(mode) \
G_STMT_START { \
if (list) gst_tag_list_free (list); \
- list = gst_tag_list_new (); \
+ list = gst_tag_list_new_empty (); \
gst_tag_list_add (list, mode, FTAG, FIXED1, FTAG, FIXED2, \
FTAG, FIXED3, FTAG, FIXED4, NULL); \
mark_point(); \
#define NEW_LIST_UNFIXED(mode) \
G_STMT_START { \
if (list) gst_tag_list_free (list); \
- list = gst_tag_list_new (); \
+ list = gst_tag_list_new_empty (); \
gst_tag_list_add (list, mode, UTAG, UNFIXED1, UTAG, UNFIXED2, \
UTAG, UNFIXED3, UTAG, UNFIXED4, NULL); \
mark_point(); \
#define NEW_LISTS_FIXED(mode) \
G_STMT_START { \
if (list) gst_tag_list_free (list); \
- list = gst_tag_list_new (); \
+ list = gst_tag_list_new_empty (); \
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, FTAG, FIXED1, \
FTAG, FIXED2, NULL); \
if (list2) gst_tag_list_free (list2); \
- list2 = gst_tag_list_new (); \
+ list2 = gst_tag_list_new_empty (); \
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, FTAG, FIXED3, \
FTAG, FIXED4, NULL); \
if (merge) gst_tag_list_free (merge); \
#define NEW_LISTS_UNFIXED(mode) \
G_STMT_START { \
if (list) gst_tag_list_free (list); \
- list = gst_tag_list_new (); \
+ list = gst_tag_list_new_empty (); \
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, UTAG, UNFIXED1, \
UTAG, UNFIXED2, NULL); \
if (list2) gst_tag_list_free (list2); \
- list2 = gst_tag_list_new (); \
+ list2 = gst_tag_list_new_empty (); \
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, UTAG, UNFIXED3,\
UTAG, UNFIXED4, NULL); \
if (merge) gst_tag_list_free (merge); \
if (list) gst_tag_list_free (list); \
list = NULL; \
if (list2) gst_tag_list_free (list2); \
- list2 = gst_tag_list_new (); \
+ list2 = gst_tag_list_new_empty (); \
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, FTAG, FIXED3, \
FTAG, FIXED4, NULL); \
if (merge) gst_tag_list_free (merge); \
#define NEW_LISTS_EMPTY2(mode) \
G_STMT_START { \
if (list) gst_tag_list_free (list); \
- list = gst_tag_list_new (); \
+ list = gst_tag_list_new_empty (); \
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, FTAG, FIXED1, \
FTAG, FIXED2, NULL); \
if (list2) gst_tag_list_free (list2); \
gchar *str;
date = g_date_new_dmy (14, 10, 2005);
- tag_list = gst_tag_list_new ();
+ tag_list = gst_tag_list_new_empty ();
gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND, GST_TAG_DATE, date, NULL);
str = gst_tag_list_to_string (tag_list);
{
GstTagList *taglist;
- taglist = gst_tag_list_new ();
+ taglist = gst_tag_list_new_empty ();
fail_unless (GST_IS_TAG_LIST (taglist));
fail_unless (gst_is_tag_list (taglist));
gst_tag_list_free (taglist);
/* check gst_tag_list_is_empty */
ASSERT_CRITICAL (gst_tag_list_is_empty (NULL));
- taglist = gst_tag_list_new ();
+ taglist = gst_tag_list_new_empty ();
fail_unless (gst_tag_list_is_empty (taglist));
gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "JD", NULL);
fail_if (gst_tag_list_is_empty (taglist));
GstTagList *taglist;
guint8 foobar[2] = { 0xff, 0x00 }; /* not UTF-8 */
- taglist = gst_tag_list_new ();
+ taglist = gst_tag_list_new_empty ();
fail_unless (taglist != NULL);
ASSERT_WARNING (gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND,
GstTagList *tags;
GstBuffer *buf1, *buf2;
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
buf1 = gst_buffer_new_and_alloc (222);
buf2 = gst_buffer_new_and_alloc (100);
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_IMAGE, buf1,
if (GST_VERSION_NANO != 1)
return;
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
ASSERT_WARNING (gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
GST_TAG_ARTIST, NULL, NULL));
ASSERT_WARNING (gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
gdouble track_gain;
guint track_num;
- tags = gst_tag_list_new_full (GST_TAG_ARTIST, "Arty Ist",
+ tags = gst_tag_list_new (GST_TAG_ARTIST, "Arty Ist",
GST_TAG_TRACK_NUMBER, 9, GST_TAG_TRACK_GAIN, 4.242, GST_TAG_TITLE,
"Title!", NULL);
GstTagList *tags;
gchar *artists = NULL;
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Foo", NULL);
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Bar", NULL);
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", NULL);
{
GstTagList *tags, *tags2;
- tags = gst_tag_list_new ();
+ tags = gst_tag_list_new_empty ();
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Foo", NULL);
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Bar", NULL);
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", NULL);
- tags2 = gst_tag_list_new ();
+ tags2 = gst_tag_list_new_empty ();
fail_unless (!gst_tag_list_is_equal (tags2, tags));
gst_tag_list_add (tags2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", NULL);
fail_unless (!gst_tag_list_is_equal (tags2, tags));
setter = GST_TAG_SETTER (enc);
- list1 = gst_tag_list_new ();
+ list1 = gst_tag_list_new_empty ();
gst_tag_list_add (list1, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "artist1",
NULL);
gst_tag_setter_merge_tags (setter, list1, GST_TAG_MERGE_APPEND);
assert_tag_setter_list_length (setter, 1);
- list2 = gst_tag_list_new ();
+ list2 = gst_tag_list_new_empty ();
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "artist2",
GST_TAG_TITLE, "title1", NULL);
gst_tag_setter_merge_tags (setter, list2, GST_TAG_MERGE_APPEND);
fail_unless (enc != NULL);
setter = GST_TAG_SETTER (enc);
- list1 = gst_tag_list_new ();
- list2 = gst_tag_list_new ();
+ list1 = gst_tag_list_new_empty ();
+ list2 = gst_tag_list_new_empty ();
/* i = 0: - -
* i = 1: list1 -
fail_unless (enc != NULL);
setter = GST_TAG_SETTER (enc);
- list1 = gst_tag_list_new ();
- list2 = gst_tag_list_new ();
+ list1 = gst_tag_list_new_empty ();
+ list2 = gst_tag_list_new_empty ();
if (i == 1) {
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST,