gst/apetag/apedemux.c: Forward tags, too.
Original commit message from CVS: * gst/apetag/apedemux.c: (gst_ape_demux_parse_tags), (gst_ape_demux_stream_init): Forward tags, too.
This commit is contained in:
parent
4f3815cb3a
commit
0c3cca89fc
@ -1,3 +1,9 @@
|
|||||||
|
2004-12-04 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* gst/apetag/apedemux.c: (gst_ape_demux_parse_tags),
|
||||||
|
(gst_ape_demux_stream_init):
|
||||||
|
Forward tags, too.
|
||||||
|
|
||||||
2004-12-04 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
2004-12-04 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
* gst/apetag/apedemux.c: (gst_ape_demux_stream_init):
|
* gst/apetag/apedemux.c: (gst_ape_demux_stream_init):
|
||||||
|
@ -421,7 +421,7 @@ gst_ape_demux_typefind (GstApeDemux * ape,
|
|||||||
* Parse tags from a buffer.
|
* Parse tags from a buffer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static GstTagList *
|
||||||
gst_ape_demux_parse_tags (GstApeDemux * ape, guint8 * data, gint size)
|
gst_ape_demux_parse_tags (GstApeDemux * ape, guint8 * data, gint size)
|
||||||
{
|
{
|
||||||
GstTagList *taglist = gst_tag_list_new ();
|
GstTagList *taglist = gst_tag_list_new ();
|
||||||
@ -501,10 +501,13 @@ gst_ape_demux_parse_tags (GstApeDemux * ape, guint8 * data, gint size)
|
|||||||
/* let people know */
|
/* let people know */
|
||||||
if (have_tag) {
|
if (have_tag) {
|
||||||
gst_element_found_tags (GST_ELEMENT (ape), taglist);
|
gst_element_found_tags (GST_ELEMENT (ape), taglist);
|
||||||
/*gst_pad_push (ape->srcpad, GST_DATA (gst_event_new_tag (taglist))); */
|
/* we'll push it over the srcpad later */
|
||||||
} else {
|
} else {
|
||||||
gst_tag_list_free (taglist);
|
gst_tag_list_free (taglist);
|
||||||
|
taglist = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return taglist;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -518,6 +521,7 @@ gst_ape_demux_stream_init (GstApeDemux * ape)
|
|||||||
gboolean seekable = TRUE, res = TRUE;
|
gboolean seekable = TRUE, res = TRUE;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
guint32 size = 0;
|
guint32 size = 0;
|
||||||
|
GstTagList *taglist1 = NULL, *taglist2 = NULL, *taglist = NULL;
|
||||||
|
|
||||||
GST_LOG ("Initializing stream, stripping tags");
|
GST_LOG ("Initializing stream, stripping tags");
|
||||||
|
|
||||||
@ -568,7 +572,7 @@ gst_ape_demux_stream_init (GstApeDemux * ape)
|
|||||||
goto the_city;
|
goto the_city;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_ape_demux_parse_tags (ape, data, size);
|
taglist1 = gst_ape_demux_parse_tags (ape, data, size);
|
||||||
ape->start_off = size;
|
ape->start_off = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -633,7 +637,7 @@ gst_ape_demux_stream_init (GstApeDemux * ape)
|
|||||||
data += 32;
|
data += 32;
|
||||||
size -= 32;
|
size -= 32;
|
||||||
}
|
}
|
||||||
gst_ape_demux_parse_tags (ape, data, size);
|
taglist2 = gst_ape_demux_parse_tags (ape, data, size);
|
||||||
ape->end_off = size;
|
ape->end_off = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -671,6 +675,25 @@ gst_ape_demux_stream_init (GstApeDemux * ape)
|
|||||||
the_city:
|
the_city:
|
||||||
/* become rich & famous */
|
/* become rich & famous */
|
||||||
gst_bytestream_destroy (bs);
|
gst_bytestream_destroy (bs);
|
||||||
|
if (taglist1 || taglist2) {
|
||||||
|
if (res) {
|
||||||
|
/* merge */
|
||||||
|
if (taglist1 && taglist2) {
|
||||||
|
taglist = gst_tag_list_merge (taglist1, taglist2,
|
||||||
|
GST_TAG_MERGE_REPLACE);
|
||||||
|
gst_tag_list_free (taglist1);
|
||||||
|
gst_tag_list_free (taglist2);
|
||||||
|
} else {
|
||||||
|
taglist = taglist1 ? taglist1 : taglist2;
|
||||||
|
}
|
||||||
|
gst_pad_push (ape->srcpad, GST_DATA (gst_event_new_tag (taglist)));
|
||||||
|
} else {
|
||||||
|
if (taglist1)
|
||||||
|
gst_tag_list_free (taglist1);
|
||||||
|
if (taglist2)
|
||||||
|
gst_tag_list_free (taglist2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user