diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2006-10-06 17:00:14 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-10-06 17:00:14 +0000 |
commit | 3adedd4f6061ae5029b880a384346d1cbc856a47 (patch) | |
tree | fb1d61311497384cb6085827d79e2c01e5f184d3 | |
parent | 09328ad0104734def11242b6c9d750845e92c5de (diff) |
Activate pads before adding.
Original commit message from CVS:
* ext/dv/gstdvdemux.c: (gst_dvdemux_add_pads), (gst_dvdemux_chain):
* gst/auparse/gstauparse.c: (gst_au_parse_add_srcpad):
Activate pads before adding.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ext/dv/gstdvdemux.c | 11 | ||||
-rw-r--r-- | gst/auparse/gstauparse.c | 1 |
3 files changed, 18 insertions, 0 deletions
@@ -1,5 +1,11 @@ 2006-10-06 Wim Taymans <wim@fluendo.com> + * ext/dv/gstdvdemux.c: (gst_dvdemux_add_pads), (gst_dvdemux_chain): + * gst/auparse/gstauparse.c: (gst_au_parse_add_srcpad): + Activate pads before adding. + +2006-10-06 Wim Taymans <wim@fluendo.com> + * gst/multipart/multipartdemux.c: (gst_multipart_demux_init), (gst_multipart_find_pad_by_mime): Activate pads before adding. diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c index 7d25c249..fb47bb31 100644 --- a/ext/dv/gstdvdemux.c +++ b/ext/dv/gstdvdemux.c @@ -306,6 +306,7 @@ gst_dvdemux_add_pads (GstDVDemux * dvdemux) gst_pad_set_event_function (dvdemux->videosrcpad, GST_DEBUG_FUNCPTR (gst_dvdemux_handle_src_event)); gst_pad_use_fixed_caps (dvdemux->videosrcpad); + gst_pad_set_active (dvdemux->videosrcpad, TRUE); gst_element_add_pad (GST_ELEMENT (dvdemux), dvdemux->videosrcpad); dvdemux->audiosrcpad = @@ -317,6 +318,7 @@ gst_dvdemux_add_pads (GstDVDemux * dvdemux) gst_pad_set_event_function (dvdemux->audiosrcpad, GST_DEBUG_FUNCPTR (gst_dvdemux_handle_src_event)); gst_pad_use_fixed_caps (dvdemux->audiosrcpad); + gst_pad_set_active (dvdemux->audiosrcpad, TRUE); gst_element_add_pad (GST_ELEMENT (dvdemux), dvdemux->audiosrcpad); gst_element_no_more_pads (GST_ELEMENT (dvdemux)); @@ -1491,6 +1493,7 @@ gst_dvdemux_chain (GstPad * pad, GstBuffer * buffer) { GstDVDemux *dvdemux; GstFlowReturn ret; + GstClockTime timestamp; dvdemux = GST_DVDEMUX (gst_pad_get_parent (pad)); @@ -1500,6 +1503,14 @@ gst_dvdemux_chain (GstPad * pad, GstBuffer * buffer) if (G_UNLIKELY (GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DISCONT))) gst_adapter_clear (dvdemux->adapter); + /* a timestamp always should be respected */ + timestamp = GST_BUFFER_TIMESTAMP (buffer); + if (GST_CLOCK_TIME_IS_VALID (timestamp)) { + gst_segment_set_last_stop (&dvdemux->time_segment, GST_FORMAT_TIME, + timestamp); + /* FIXME, adjust frame_offset and other counters */ + } + /* temporary hack? Can't do this from the state change */ if (G_UNLIKELY (!dvdemux->videosrcpad)) gst_dvdemux_add_pads (dvdemux); diff --git a/gst/auparse/gstauparse.c b/gst/auparse/gstauparse.c index 406e5454..4664984c 100644 --- a/gst/auparse/gstauparse.c +++ b/gst/auparse/gstauparse.c @@ -197,6 +197,7 @@ gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * new_caps) GST_DEBUG_FUNCPTR (gst_au_parse_src_event)); gst_pad_use_fixed_caps (auparse->srcpad); + gst_pad_set_active (auparse->srcpad, TRUE); if (auparse->src_caps) gst_pad_set_caps (auparse->srcpad, auparse->src_caps); |