mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
taglist: rename _new() to _new_empty() and new_full*() to new*()
This commit is contained in:
parent
dc7ec44486
commit
4e7944b0b9
11 changed files with 57 additions and 51 deletions
|
@ -2444,8 +2444,8 @@ gst_tag_get_description
|
||||||
gst_tag_get_flag
|
gst_tag_get_flag
|
||||||
gst_tag_is_fixed
|
gst_tag_is_fixed
|
||||||
gst_tag_list_new
|
gst_tag_list_new
|
||||||
gst_tag_list_new_full
|
gst_tag_list_new_empty
|
||||||
gst_tag_list_new_full_valist
|
gst_tag_list_new_valist
|
||||||
gst_tag_list_new_from_string
|
gst_tag_list_new_from_string
|
||||||
gst_tag_list_to_string
|
gst_tag_list_to_string
|
||||||
gst_is_tag_list
|
gst_is_tag_list
|
||||||
|
@ -2517,7 +2517,7 @@ gst_tag_merge_mode_get_type
|
||||||
<FILE>gsttagsetter</FILE>
|
<FILE>gsttagsetter</FILE>
|
||||||
<TITLE>GstTagSetter</TITLE>
|
<TITLE>GstTagSetter</TITLE>
|
||||||
GstTagSetter
|
GstTagSetter
|
||||||
GstTagSetterIFace
|
GstTagSetterInterface
|
||||||
gst_tag_setter_reset_tags
|
gst_tag_setter_reset_tags
|
||||||
gst_tag_setter_merge_tags
|
gst_tag_setter_merge_tags
|
||||||
gst_tag_setter_add_tags
|
gst_tag_setter_add_tags
|
||||||
|
|
|
@ -360,3 +360,10 @@ The 0.11 porting guide
|
||||||
allows bindings to properly use GstIterator and prevents complex
|
allows bindings to properly use GstIterator and prevents complex
|
||||||
return value ownership issues.
|
return value ownership issues.
|
||||||
|
|
||||||
|
* GstTagList
|
||||||
|
is now an opaque object instead of being typedefed to a GstStructure. Cast
|
||||||
|
to GstStructure or use gst_structure_* API on it at your own peril (it may
|
||||||
|
still work for now, but might be changed in future).
|
||||||
|
|
||||||
|
gst_tag_list_new() has been renamed to gst_tag_list_new_empty().
|
||||||
|
gst_tag_list_new_full*() have been renamed to gst_tag_list_new*().
|
||||||
|
|
|
@ -626,7 +626,7 @@ gst_tag_is_fixed (const gchar * tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_tag_list_new:
|
* gst_tag_list_new_empty:
|
||||||
*
|
*
|
||||||
* Creates a new empty GstTagList.
|
* Creates a new empty GstTagList.
|
||||||
*
|
*
|
||||||
|
@ -635,13 +635,13 @@ gst_tag_is_fixed (const gchar * tag)
|
||||||
* Returns: (transfer full): An empty tag list
|
* Returns: (transfer full): An empty tag list
|
||||||
*/
|
*/
|
||||||
GstTagList *
|
GstTagList *
|
||||||
gst_tag_list_new (void)
|
gst_tag_list_new_empty (void)
|
||||||
{
|
{
|
||||||
return GST_TAG_LIST (gst_structure_id_empty_new (GST_QUARK (TAGLIST)));
|
return GST_TAG_LIST (gst_structure_id_empty_new (GST_QUARK (TAGLIST)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_tag_list_new_full:
|
* gst_tag_list_new:
|
||||||
* @tag: tag
|
* @tag: tag
|
||||||
* @...: NULL-terminated list of values to set
|
* @...: NULL-terminated list of values to set
|
||||||
*
|
*
|
||||||
|
@ -660,16 +660,15 @@ gst_tag_list_new (void)
|
||||||
*
|
*
|
||||||
* Since: 0.10.24
|
* Since: 0.10.24
|
||||||
*/
|
*/
|
||||||
/* FIXME 0.11: rename gst_tag_list_new_full to _new and _new to _new_empty */
|
|
||||||
GstTagList *
|
GstTagList *
|
||||||
gst_tag_list_new_full (const gchar * tag, ...)
|
gst_tag_list_new (const gchar * tag, ...)
|
||||||
{
|
{
|
||||||
GstTagList *list;
|
GstTagList *list;
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
g_return_val_if_fail (tag != NULL, NULL);
|
g_return_val_if_fail (tag != NULL, NULL);
|
||||||
|
|
||||||
list = gst_tag_list_new ();
|
list = gst_tag_list_new_empty ();
|
||||||
va_start (args, tag);
|
va_start (args, tag);
|
||||||
gst_tag_list_add_valist (list, GST_TAG_MERGE_APPEND, tag, args);
|
gst_tag_list_add_valist (list, GST_TAG_MERGE_APPEND, tag, args);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
@ -678,10 +677,10 @@ gst_tag_list_new_full (const gchar * tag, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_tag_list_new_full_valist:
|
* gst_tag_list_new_valist:
|
||||||
* @var_args: tag / value pairs to set
|
* @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.
|
* Useful mostly for language bindings.
|
||||||
*
|
*
|
||||||
* Free-function: gst_tag_list_free
|
* Free-function: gst_tag_list_free
|
||||||
|
@ -692,12 +691,12 @@ gst_tag_list_new_full (const gchar * tag, ...)
|
||||||
* Since: 0.10.24
|
* Since: 0.10.24
|
||||||
*/
|
*/
|
||||||
GstTagList *
|
GstTagList *
|
||||||
gst_tag_list_new_full_valist (va_list var_args)
|
gst_tag_list_new_valist (va_list var_args)
|
||||||
{
|
{
|
||||||
GstTagList *list;
|
GstTagList *list;
|
||||||
const gchar *tag;
|
const gchar *tag;
|
||||||
|
|
||||||
list = gst_tag_list_new ();
|
list = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
tag = va_arg (var_args, gchar *);
|
tag = va_arg (var_args, gchar *);
|
||||||
gst_tag_list_add_valist (list, GST_TAG_MERGE_APPEND, tag, var_args);
|
gst_tag_list_add_valist (list, GST_TAG_MERGE_APPEND, tag, var_args);
|
||||||
|
@ -1011,8 +1010,8 @@ gst_tag_list_merge (const GstTagList * list1, const GstTagList * list2,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create empty list, we need to do this to correctly handling merge modes */
|
/* 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 ();
|
list1_cp = (list1) ? gst_tag_list_copy (list1) : gst_tag_list_new_empty ();
|
||||||
list2_cp = (list2) ? list2 : gst_tag_list_new ();
|
list2_cp = (list2) ? list2 : gst_tag_list_new_empty ();
|
||||||
|
|
||||||
gst_tag_list_insert (list1_cp, list2_cp, mode);
|
gst_tag_list_insert (list1_cp, list2_cp, mode);
|
||||||
|
|
||||||
|
|
|
@ -198,9 +198,9 @@ GstTagFlag gst_tag_get_flag (const gchar * tag);
|
||||||
gboolean gst_tag_is_fixed (const gchar * tag);
|
gboolean gst_tag_is_fixed (const gchar * tag);
|
||||||
|
|
||||||
/* tag lists */
|
/* tag lists */
|
||||||
GstTagList * gst_tag_list_new (void);
|
GstTagList * gst_tag_list_new_empty (void);
|
||||||
GstTagList * gst_tag_list_new_full (const gchar * tag, ...);
|
GstTagList * gst_tag_list_new (const gchar * tag, ...);
|
||||||
GstTagList * gst_tag_list_new_full_valist (va_list var_args);
|
GstTagList * gst_tag_list_new_valist (va_list var_args);
|
||||||
|
|
||||||
gchar * gst_tag_list_to_string (const GstTagList * list);
|
gchar * gst_tag_list_to_string (const GstTagList * list);
|
||||||
GstTagList * gst_tag_list_new_from_string (const gchar * str);
|
GstTagList * gst_tag_list_new_from_string (const gchar * str);
|
||||||
|
|
|
@ -283,7 +283,7 @@ gst_tag_setter_add_tag_valist (GstTagSetter * setter, GstTagMergeMode mode,
|
||||||
|
|
||||||
g_static_mutex_lock (&data->lock);
|
g_static_mutex_lock (&data->lock);
|
||||||
if (!data->list)
|
if (!data->list)
|
||||||
data->list = gst_tag_list_new ();
|
data->list = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
gst_tag_list_add_valist (data->list, mode, tag, var_args);
|
gst_tag_list_add_valist (data->list, mode, tag, var_args);
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ gst_tag_setter_add_tag_valist_values (GstTagSetter * setter,
|
||||||
g_static_mutex_lock (&data->lock);
|
g_static_mutex_lock (&data->lock);
|
||||||
|
|
||||||
if (!data->list)
|
if (!data->list)
|
||||||
data->list = gst_tag_list_new ();
|
data->list = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
gst_tag_list_add_valist_values (data->list, mode, tag, var_args);
|
gst_tag_list_add_valist_values (data->list, mode, tag, var_args);
|
||||||
|
|
||||||
|
@ -346,7 +346,7 @@ gst_tag_setter_add_tag_value (GstTagSetter * setter,
|
||||||
g_static_mutex_lock (&data->lock);
|
g_static_mutex_lock (&data->lock);
|
||||||
|
|
||||||
if (!data->list)
|
if (!data->list)
|
||||||
data->list = gst_tag_list_new ();
|
data->list = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
gst_tag_list_add_value (data->list, mode, tag, value);
|
gst_tag_list_add_value (data->list, mode, tag, value);
|
||||||
|
|
||||||
|
|
|
@ -1316,7 +1316,7 @@ gst_base_parse_post_bitrates (GstBaseParse * parse, gboolean post_min,
|
||||||
GstTagList *taglist = NULL;
|
GstTagList *taglist = NULL;
|
||||||
|
|
||||||
if (post_min && parse->priv->post_min_bitrate) {
|
if (post_min && parse->priv->post_min_bitrate) {
|
||||||
taglist = gst_tag_list_new ();
|
taglist = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
|
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
|
||||||
GST_TAG_MINIMUM_BITRATE, parse->priv->min_bitrate, NULL);
|
GST_TAG_MINIMUM_BITRATE, parse->priv->min_bitrate, NULL);
|
||||||
|
@ -1324,7 +1324,7 @@ gst_base_parse_post_bitrates (GstBaseParse * parse, gboolean post_min,
|
||||||
|
|
||||||
if (post_avg && parse->priv->post_avg_bitrate) {
|
if (post_avg && parse->priv->post_avg_bitrate) {
|
||||||
if (taglist == NULL)
|
if (taglist == NULL)
|
||||||
taglist = gst_tag_list_new ();
|
taglist = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
parse->priv->posted_avg_bitrate = parse->priv->avg_bitrate;
|
parse->priv->posted_avg_bitrate = parse->priv->avg_bitrate;
|
||||||
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_BITRATE,
|
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE, GST_TAG_BITRATE,
|
||||||
|
@ -1333,7 +1333,7 @@ gst_base_parse_post_bitrates (GstBaseParse * parse, gboolean post_min,
|
||||||
|
|
||||||
if (post_max && parse->priv->post_max_bitrate) {
|
if (post_max && parse->priv->post_max_bitrate) {
|
||||||
if (taglist == NULL)
|
if (taglist == NULL)
|
||||||
taglist = gst_tag_list_new ();
|
taglist = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
|
gst_tag_list_add (taglist, GST_TAG_MERGE_REPLACE,
|
||||||
GST_TAG_MAXIMUM_BITRATE, parse->priv->max_bitrate, NULL);
|
GST_TAG_MAXIMUM_BITRATE, parse->priv->max_bitrate, NULL);
|
||||||
|
|
|
@ -93,7 +93,7 @@ GST_START_TEST (create_events)
|
||||||
|
|
||||||
/* TAGS */
|
/* TAGS */
|
||||||
{
|
{
|
||||||
GstTagList *taglist = gst_tag_list_new ();
|
GstTagList *taglist = gst_tag_list_new_empty ();
|
||||||
GstTagList *tl2 = NULL;
|
GstTagList *tl2 = NULL;
|
||||||
|
|
||||||
event = gst_event_new_tag (taglist);
|
event = gst_event_new_tag (taglist);
|
||||||
|
|
|
@ -102,7 +102,7 @@ GST_START_TEST (test_parsing)
|
||||||
GstTagList *tag;
|
GstTagList *tag;
|
||||||
|
|
||||||
/* FIXME, do some more tag adding */
|
/* FIXME, do some more tag adding */
|
||||||
tag = gst_tag_list_new ();
|
tag = gst_tag_list_new_empty ();
|
||||||
fail_if (tag == NULL);
|
fail_if (tag == NULL);
|
||||||
message = gst_message_new_tag (NULL, tag);
|
message = gst_message_new_tag (NULL, tag);
|
||||||
fail_if (message == NULL);
|
fail_if (message == NULL);
|
||||||
|
|
|
@ -67,7 +67,7 @@ check_tags_empty (const GstTagList * list)
|
||||||
#define NEW_LIST_FIXED(mode) \
|
#define NEW_LIST_FIXED(mode) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if (list) gst_tag_list_free (list); \
|
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, \
|
gst_tag_list_add (list, mode, FTAG, FIXED1, FTAG, FIXED2, \
|
||||||
FTAG, FIXED3, FTAG, FIXED4, NULL); \
|
FTAG, FIXED3, FTAG, FIXED4, NULL); \
|
||||||
mark_point(); \
|
mark_point(); \
|
||||||
|
@ -76,7 +76,7 @@ G_STMT_START { \
|
||||||
#define NEW_LIST_UNFIXED(mode) \
|
#define NEW_LIST_UNFIXED(mode) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if (list) gst_tag_list_free (list); \
|
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, \
|
gst_tag_list_add (list, mode, UTAG, UNFIXED1, UTAG, UNFIXED2, \
|
||||||
UTAG, UNFIXED3, UTAG, UNFIXED4, NULL); \
|
UTAG, UNFIXED3, UTAG, UNFIXED4, NULL); \
|
||||||
mark_point(); \
|
mark_point(); \
|
||||||
|
@ -85,11 +85,11 @@ G_STMT_START { \
|
||||||
#define NEW_LISTS_FIXED(mode) \
|
#define NEW_LISTS_FIXED(mode) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if (list) gst_tag_list_free (list); \
|
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, \
|
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, FTAG, FIXED1, \
|
||||||
FTAG, FIXED2, NULL); \
|
FTAG, FIXED2, NULL); \
|
||||||
if (list2) gst_tag_list_free (list2); \
|
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, \
|
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, FTAG, FIXED3, \
|
||||||
FTAG, FIXED4, NULL); \
|
FTAG, FIXED4, NULL); \
|
||||||
if (merge) gst_tag_list_free (merge); \
|
if (merge) gst_tag_list_free (merge); \
|
||||||
|
@ -100,11 +100,11 @@ G_STMT_START { \
|
||||||
#define NEW_LISTS_UNFIXED(mode) \
|
#define NEW_LISTS_UNFIXED(mode) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if (list) gst_tag_list_free (list); \
|
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, \
|
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, UTAG, UNFIXED1, \
|
||||||
UTAG, UNFIXED2, NULL); \
|
UTAG, UNFIXED2, NULL); \
|
||||||
if (list2) gst_tag_list_free (list2); \
|
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,\
|
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, UTAG, UNFIXED3,\
|
||||||
UTAG, UNFIXED4, NULL); \
|
UTAG, UNFIXED4, NULL); \
|
||||||
if (merge) gst_tag_list_free (merge); \
|
if (merge) gst_tag_list_free (merge); \
|
||||||
|
@ -117,7 +117,7 @@ G_STMT_START { \
|
||||||
if (list) gst_tag_list_free (list); \
|
if (list) gst_tag_list_free (list); \
|
||||||
list = NULL; \
|
list = NULL; \
|
||||||
if (list2) gst_tag_list_free (list2); \
|
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, \
|
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, FTAG, FIXED3, \
|
||||||
FTAG, FIXED4, NULL); \
|
FTAG, FIXED4, NULL); \
|
||||||
if (merge) gst_tag_list_free (merge); \
|
if (merge) gst_tag_list_free (merge); \
|
||||||
|
@ -128,7 +128,7 @@ G_STMT_START { \
|
||||||
#define NEW_LISTS_EMPTY2(mode) \
|
#define NEW_LISTS_EMPTY2(mode) \
|
||||||
G_STMT_START { \
|
G_STMT_START { \
|
||||||
if (list) gst_tag_list_free (list); \
|
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, \
|
gst_tag_list_add (list, GST_TAG_MERGE_APPEND, FTAG, FIXED1, \
|
||||||
FTAG, FIXED2, NULL); \
|
FTAG, FIXED2, NULL); \
|
||||||
if (list2) gst_tag_list_free (list2); \
|
if (list2) gst_tag_list_free (list2); \
|
||||||
|
@ -271,7 +271,7 @@ GST_START_TEST (test_date_tags)
|
||||||
gchar *str;
|
gchar *str;
|
||||||
|
|
||||||
date = g_date_new_dmy (14, 10, 2005);
|
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);
|
gst_tag_list_add (tag_list, GST_TAG_MERGE_APPEND, GST_TAG_DATE, date, NULL);
|
||||||
|
|
||||||
str = gst_tag_list_to_string (tag_list);
|
str = gst_tag_list_to_string (tag_list);
|
||||||
|
@ -304,7 +304,7 @@ GST_START_TEST (test_type)
|
||||||
{
|
{
|
||||||
GstTagList *taglist;
|
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));
|
||||||
fail_unless (gst_is_tag_list (taglist));
|
fail_unless (gst_is_tag_list (taglist));
|
||||||
gst_tag_list_free (taglist);
|
gst_tag_list_free (taglist);
|
||||||
|
@ -317,7 +317,7 @@ GST_START_TEST (test_type)
|
||||||
|
|
||||||
/* check gst_tag_list_is_empty */
|
/* check gst_tag_list_is_empty */
|
||||||
ASSERT_CRITICAL (gst_tag_list_is_empty (NULL));
|
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));
|
fail_unless (gst_tag_list_is_empty (taglist));
|
||||||
gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "JD", NULL);
|
gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "JD", NULL);
|
||||||
fail_if (gst_tag_list_is_empty (taglist));
|
fail_if (gst_tag_list_is_empty (taglist));
|
||||||
|
@ -331,7 +331,7 @@ GST_START_TEST (test_set_non_utf8_string)
|
||||||
GstTagList *taglist;
|
GstTagList *taglist;
|
||||||
guint8 foobar[2] = { 0xff, 0x00 }; /* not UTF-8 */
|
guint8 foobar[2] = { 0xff, 0x00 }; /* not UTF-8 */
|
||||||
|
|
||||||
taglist = gst_tag_list_new ();
|
taglist = gst_tag_list_new_empty ();
|
||||||
fail_unless (taglist != NULL);
|
fail_unless (taglist != NULL);
|
||||||
|
|
||||||
ASSERT_WARNING (gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND,
|
ASSERT_WARNING (gst_tag_list_add (taglist, GST_TAG_MERGE_APPEND,
|
||||||
|
@ -350,7 +350,7 @@ GST_START_TEST (test_buffer_tags)
|
||||||
GstTagList *tags;
|
GstTagList *tags;
|
||||||
GstBuffer *buf1, *buf2;
|
GstBuffer *buf1, *buf2;
|
||||||
|
|
||||||
tags = gst_tag_list_new ();
|
tags = gst_tag_list_new_empty ();
|
||||||
buf1 = gst_buffer_new_and_alloc (222);
|
buf1 = gst_buffer_new_and_alloc (222);
|
||||||
buf2 = gst_buffer_new_and_alloc (100);
|
buf2 = gst_buffer_new_and_alloc (100);
|
||||||
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_IMAGE, buf1,
|
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_IMAGE, buf1,
|
||||||
|
@ -393,7 +393,7 @@ GST_START_TEST (test_empty_tags)
|
||||||
if (GST_VERSION_NANO != 1)
|
if (GST_VERSION_NANO != 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tags = gst_tag_list_new ();
|
tags = gst_tag_list_new_empty ();
|
||||||
ASSERT_WARNING (gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
|
ASSERT_WARNING (gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
|
||||||
GST_TAG_ARTIST, NULL, NULL));
|
GST_TAG_ARTIST, NULL, NULL));
|
||||||
ASSERT_WARNING (gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
|
ASSERT_WARNING (gst_tag_list_add (tags, GST_TAG_MERGE_APPEND,
|
||||||
|
@ -411,7 +411,7 @@ GST_START_TEST (test_new_full)
|
||||||
gdouble track_gain;
|
gdouble track_gain;
|
||||||
guint track_num;
|
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,
|
GST_TAG_TRACK_NUMBER, 9, GST_TAG_TRACK_GAIN, 4.242, GST_TAG_TITLE,
|
||||||
"Title!", NULL);
|
"Title!", NULL);
|
||||||
|
|
||||||
|
@ -437,7 +437,7 @@ GST_START_TEST (test_merge_strings_with_comma)
|
||||||
GstTagList *tags;
|
GstTagList *tags;
|
||||||
gchar *artists = NULL;
|
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, "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, "Bar", NULL);
|
||||||
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", NULL);
|
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", NULL);
|
||||||
|
@ -457,12 +457,12 @@ GST_START_TEST (test_equal)
|
||||||
{
|
{
|
||||||
GstTagList *tags, *tags2;
|
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, "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, "Bar", NULL);
|
||||||
gst_tag_list_add (tags, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", 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));
|
fail_unless (!gst_tag_list_is_equal (tags2, tags));
|
||||||
gst_tag_list_add (tags2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", NULL);
|
gst_tag_list_add (tags2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "Yay", NULL);
|
||||||
fail_unless (!gst_tag_list_is_equal (tags2, tags));
|
fail_unless (!gst_tag_list_is_equal (tags2, tags));
|
||||||
|
|
|
@ -90,13 +90,13 @@ GST_START_TEST (test_merge)
|
||||||
|
|
||||||
setter = GST_TAG_SETTER (enc);
|
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",
|
gst_tag_list_add (list1, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "artist1",
|
||||||
NULL);
|
NULL);
|
||||||
gst_tag_setter_merge_tags (setter, list1, GST_TAG_MERGE_APPEND);
|
gst_tag_setter_merge_tags (setter, list1, GST_TAG_MERGE_APPEND);
|
||||||
assert_tag_setter_list_length (setter, 1);
|
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_list_add (list2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST, "artist2",
|
||||||
GST_TAG_TITLE, "title1", NULL);
|
GST_TAG_TITLE, "title1", NULL);
|
||||||
gst_tag_setter_merge_tags (setter, list2, GST_TAG_MERGE_APPEND);
|
gst_tag_setter_merge_tags (setter, list2, GST_TAG_MERGE_APPEND);
|
||||||
|
@ -135,8 +135,8 @@ GST_START_TEST (test_merge_modes)
|
||||||
fail_unless (enc != NULL);
|
fail_unless (enc != NULL);
|
||||||
|
|
||||||
setter = GST_TAG_SETTER (enc);
|
setter = GST_TAG_SETTER (enc);
|
||||||
list1 = gst_tag_list_new ();
|
list1 = gst_tag_list_new_empty ();
|
||||||
list2 = gst_tag_list_new ();
|
list2 = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
/* i = 0: - -
|
/* i = 0: - -
|
||||||
* i = 1: list1 -
|
* i = 1: list1 -
|
||||||
|
@ -185,8 +185,8 @@ GST_START_TEST (test_merge_modes_skip_empty)
|
||||||
fail_unless (enc != NULL);
|
fail_unless (enc != NULL);
|
||||||
|
|
||||||
setter = GST_TAG_SETTER (enc);
|
setter = GST_TAG_SETTER (enc);
|
||||||
list1 = gst_tag_list_new ();
|
list1 = gst_tag_list_new_empty ();
|
||||||
list2 = gst_tag_list_new ();
|
list2 = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST,
|
gst_tag_list_add (list2, GST_TAG_MERGE_APPEND, GST_TAG_ARTIST,
|
||||||
|
|
|
@ -491,7 +491,7 @@ GST_START_TEST (test_element_found_tags)
|
||||||
pipeline = gst_element_factory_make ("pipeline", NULL);
|
pipeline = gst_element_factory_make ("pipeline", NULL);
|
||||||
fakesrc = gst_element_factory_make ("fakesrc", NULL);
|
fakesrc = gst_element_factory_make ("fakesrc", NULL);
|
||||||
fakesink = gst_element_factory_make ("fakesink", NULL);
|
fakesink = gst_element_factory_make ("fakesink", NULL);
|
||||||
list = gst_tag_list_new ();
|
list = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
g_object_set (fakesrc, "num-buffers", (int) 10, NULL);
|
g_object_set (fakesrc, "num-buffers", (int) 10, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue