mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 02:13:46 +00:00
ext/ogg/gstoggdemux.c: The new-pad-group sequence is add-pads, no-more-pads, add-pads, no-more-pads...
Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_demux_activate_chain), (gst_ogg_demux_read_chain), (gst_ogg_demux_handle_page): The new-pad-group sequence is add-pads, no-more-pads, add-pads, no-more-pads...
This commit is contained in:
parent
8f77a5d928
commit
9d4543ed67
2 changed files with 35 additions and 31 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-04-02 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
|
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_activate_chain),
|
||||||
|
(gst_ogg_demux_read_chain), (gst_ogg_demux_handle_page):
|
||||||
|
The new-pad-group sequence is add-pads, no-more-pads, add-pads,
|
||||||
|
no-more-pads...
|
||||||
|
|
||||||
2008-04-02 Wim Taymans <wim.taymans@collabora.co.uk>
|
2008-04-02 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||||
|
|
||||||
* gst/playback/gstqueue2.c: (update_out_rates),
|
* gst/playback/gstqueue2.c: (update_out_rates),
|
||||||
|
|
|
@ -1768,14 +1768,8 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_ogg_demux_deactivate_current_chain (ogg);
|
|
||||||
|
|
||||||
/* FIXME, should not be called with NULL */
|
/* FIXME, should not be called with NULL */
|
||||||
if (chain == NULL) {
|
if (chain != NULL) {
|
||||||
ogg->current_chain = chain;
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ogg, "activating chain %p", chain);
|
GST_DEBUG_OBJECT (ogg, "activating chain %p", chain);
|
||||||
|
|
||||||
/* first add the pads */
|
/* first add the pads */
|
||||||
|
@ -1794,10 +1788,16 @@ gst_ogg_demux_activate_chain (GstOggDemux * ogg, GstOggChain * chain,
|
||||||
|
|
||||||
gst_element_add_pad (GST_ELEMENT (ogg), GST_PAD_CAST (pad));
|
gst_element_add_pad (GST_ELEMENT (ogg), GST_PAD_CAST (pad));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* after adding the new pads, remove the old pads */
|
||||||
|
gst_ogg_demux_deactivate_current_chain (ogg);
|
||||||
|
|
||||||
gst_element_no_more_pads (GST_ELEMENT (ogg));
|
|
||||||
ogg->current_chain = chain;
|
ogg->current_chain = chain;
|
||||||
|
|
||||||
|
/* we are finished now */
|
||||||
|
gst_element_no_more_pads (GST_ELEMENT (ogg));
|
||||||
|
|
||||||
/* FIXME, must be sent from the streaming thread */
|
/* FIXME, must be sent from the streaming thread */
|
||||||
if (event)
|
if (event)
|
||||||
gst_ogg_demux_send_event (ogg, event);
|
gst_ogg_demux_send_event (ogg, event);
|
||||||
|
@ -2762,7 +2762,8 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page)
|
||||||
GST_TIME_ARGS (chain->segment_stop),
|
GST_TIME_ARGS (chain->segment_stop),
|
||||||
GST_TIME_ARGS (chain->begin_time));
|
GST_TIME_ARGS (chain->begin_time));
|
||||||
|
|
||||||
/* activate it as it means we have a non-header */
|
/* activate it as it means we have a non-header, this will also deactivate
|
||||||
|
* the currently running chain. */
|
||||||
gst_ogg_demux_activate_chain (ogg, chain, event);
|
gst_ogg_demux_activate_chain (ogg, chain, event);
|
||||||
pad = gst_ogg_demux_find_pad (ogg, serialno);
|
pad = gst_ogg_demux_find_pad (ogg, serialno);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2777,10 +2778,6 @@ gst_ogg_demux_handle_page (GstOggDemux * ogg, ogg_page * page)
|
||||||
current_chain = ogg->current_chain;
|
current_chain = ogg->current_chain;
|
||||||
current_time = ogg->segment.last_stop;
|
current_time = ogg->segment.last_stop;
|
||||||
|
|
||||||
if (current_chain) {
|
|
||||||
/* remove existing pads */
|
|
||||||
gst_ogg_demux_deactivate_current_chain (ogg);
|
|
||||||
}
|
|
||||||
/* time of new chain is current time */
|
/* time of new chain is current time */
|
||||||
chain_time = current_time;
|
chain_time = current_time;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue