gst/matroska/: Send tag event after newsegment event.

Original commit message from CVS:
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_send_event),
(gst_matroska_demux_loop_stream_parse_id):
* gst/matroska/matroska-ids.h:
Send tag event after newsegment event.
This commit is contained in:
Tim-Philipp Müller 2006-06-29 11:41:55 +00:00
parent 5aa89bdd33
commit 62487ce3b5
3 changed files with 19 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2006-06-29 Tim-Philipp Müller <tim at centricular dot net>
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream),
(gst_matroska_demux_send_event),
(gst_matroska_demux_loop_stream_parse_id):
* gst/matroska/matroska-ids.h:
Send tag event after newsegment event.
2006-06-29 Tim-Philipp Müller <tim at centricular dot net>
* gst/id3demux/gstid3demux.c: (gst_id3demux_trim_buffer),

View file

@ -945,16 +945,13 @@ gst_matroska_demux_add_stream (GstMatroskaDemux * demux)
GST_INFO_OBJECT (demux, "Adding pad '%s' with caps %" GST_PTR_FORMAT,
padname, caps);
context->pending_tags = list;
gst_pad_use_fixed_caps (context->pad);
gst_pad_set_caps (context->pad, context->caps);
gst_pad_set_active (context->pad, TRUE);
gst_element_add_pad (GST_ELEMENT (demux), context->pad);
/* tags */
if (list) {
gst_element_found_tags_for_pad (GST_ELEMENT (demux), context->pad, list);
}
g_free (padname);
/* tadaah! */
@ -1088,6 +1085,12 @@ gst_matroska_demux_send_event (GstMatroskaDemux * demux, GstEvent * event)
stream = demux->src[i];
gst_event_ref (event);
gst_pad_push_event (stream->pad, event);
if (stream->pending_tags) {
gst_element_found_tags_for_pad (GST_ELEMENT (demux), stream->pad,
stream->pending_tags);
stream->pending_tags = NULL;
}
}
gst_event_unref (event);
return ret;
@ -2870,7 +2873,6 @@ gst_matroska_demux_loop_stream_parse_id (GstMatroskaDemux * demux,
gst_event_new_new_segment (FALSE, 1.0,
GST_FORMAT_TIME, 0,
(demux->duration > 0) ? demux->duration : -1, 0));
GST_DEBUG_OBJECT (demux, "signaling no more pads");
gst_element_no_more_pads (GST_ELEMENT (demux));
} else {

View file

@ -257,6 +257,9 @@ typedef struct _GstMatroskaTrackContext {
/* Special counter for muxer to skip the first N vorbis/theora headers -
* they are put into codec private data, not muxed into the stream */
guint xiph_headers_to_skip;
/* Tags to send after newsegment event */
GstTagList *pending_tags;
} GstMatroskaTrackContext;
typedef struct _GstMatroskaTrackVideoContext {