mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
ext/ogg/gstoggdemux.c: Segment done must include stream time.
Original commit message from CVS: * ext/ogg/gstoggdemux.c: (gst_ogg_demux_configure_segment), (gst_ogg_demux_perform_seek): Segment done must include stream time. * ext/ogg/gstoggmux.c: (gst_ogg_mux_class_init), (gst_ogg_mux_clear), (gst_ogg_mux_init), (gst_ogg_mux_finalize), (gst_ogg_mux_change_state): Fix ogg muxer again.
This commit is contained in:
parent
c70a2b383a
commit
928996eb94
3 changed files with 34 additions and 20 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2005-11-16 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_configure_segment),
|
||||
(gst_ogg_demux_perform_seek):
|
||||
Segment done must include stream time.
|
||||
|
||||
* ext/ogg/gstoggmux.c: (gst_ogg_mux_class_init),
|
||||
(gst_ogg_mux_clear), (gst_ogg_mux_init), (gst_ogg_mux_finalize),
|
||||
(gst_ogg_mux_change_state):
|
||||
Fix ogg muxer again.
|
||||
|
||||
2005-11-16 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* ext/ogg/gstogmparse.c: (gst_ogm_audio_parse_init):
|
||||
|
|
|
@ -1777,7 +1777,7 @@ gst_ogg_demux_perform_seek (GstOggDemux * ogg)
|
|||
if (ogg->segment_flags & GST_SEEK_FLAG_SEGMENT) {
|
||||
gst_element_post_message (GST_ELEMENT (ogg),
|
||||
gst_message_new_segment_start (GST_OBJECT (ogg), GST_FORMAT_TIME,
|
||||
ogg->segment_start));
|
||||
start));
|
||||
}
|
||||
/* restart our task since it might have been stopped when we did the
|
||||
* flush. */
|
||||
|
|
|
@ -163,6 +163,7 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink_%d",
|
|||
static void gst_ogg_mux_base_init (gpointer g_class);
|
||||
static void gst_ogg_mux_class_init (GstOggMuxClass * klass);
|
||||
static void gst_ogg_mux_init (GstOggMux * ogg_mux);
|
||||
static void gst_ogg_mux_finalize (GObject * object);
|
||||
|
||||
static GstFlowReturn
|
||||
gst_ogg_mux_collected (GstCollectPads * pads, GstOggMux * ogg_mux);
|
||||
|
@ -229,6 +230,7 @@ gst_ogg_mux_class_init (GstOggMuxClass * klass)
|
|||
|
||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
||||
|
||||
gobject_class->finalize = gst_ogg_mux_finalize;
|
||||
gobject_class->get_property = gst_ogg_mux_get_property;
|
||||
gobject_class->set_property = gst_ogg_mux_set_property;
|
||||
|
||||
|
@ -269,21 +271,6 @@ gst_ogg_mux_clear (GstOggMux * ogg_mux)
|
|||
ogg_mux->max_delay = DEFAULT_MAX_DELAY;
|
||||
ogg_mux->max_page_delay = DEFAULT_MAX_PAGE_DELAY;
|
||||
ogg_mux->delta_pad = NULL;
|
||||
|
||||
if (ogg_mux->collect) {
|
||||
gst_object_unref (ogg_mux->collect);
|
||||
ogg_mux->collect = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gst_ogg_mux_reset (GstOggMux * ogg_mux)
|
||||
{
|
||||
gst_ogg_mux_clear (ogg_mux);
|
||||
|
||||
ogg_mux->collect = gst_collectpads_new ();
|
||||
gst_collectpads_set_function (ogg_mux->collect,
|
||||
(GstCollectPadsFunction) gst_ogg_mux_collected, ogg_mux);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -302,11 +289,28 @@ gst_ogg_mux_init (GstOggMux * ogg_mux)
|
|||
/* seed random number generator for creation of serial numbers */
|
||||
srand (time (NULL));
|
||||
|
||||
ogg_mux->collect = NULL;
|
||||
ogg_mux->collect = gst_collectpads_new ();
|
||||
gst_collectpads_set_function (ogg_mux->collect,
|
||||
(GstCollectPadsFunction) gst_ogg_mux_collected, ogg_mux);
|
||||
|
||||
gst_ogg_mux_clear (ogg_mux);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_ogg_mux_finalize (GObject * object)
|
||||
{
|
||||
GstOggMux *ogg_mux;
|
||||
|
||||
ogg_mux = GST_OGG_MUX (object);
|
||||
|
||||
if (ogg_mux->collect) {
|
||||
gst_object_unref (ogg_mux->collect);
|
||||
ogg_mux->collect = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static GstPadLinkReturn
|
||||
gst_ogg_mux_sinkconnect (GstPad * pad, GstPad * peer)
|
||||
{
|
||||
|
@ -1382,13 +1386,13 @@ gst_ogg_mux_change_state (GstElement * element, GstStateChange transition)
|
|||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
gst_ogg_mux_reset (ogg_mux);
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||
ogg_mux->next_ts = 0;
|
||||
ogg_mux->offset = 0;
|
||||
ogg_mux->pulling = NULL;
|
||||
gst_collectpads_start (ogg_mux->collect);
|
||||
gst_ogg_mux_clear (ogg_mux);
|
||||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||
break;
|
||||
|
@ -1403,10 +1407,9 @@ gst_ogg_mux_change_state (GstElement * element, GstStateChange transition)
|
|||
break;
|
||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||
gst_collectpads_stop (ogg_mux->collect);
|
||||
gst_ogg_mux_clear_collectpads (ogg_mux->collect);
|
||||
break;
|
||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||
gst_ogg_mux_clear (ogg_mux);
|
||||
gst_ogg_mux_clear_collectpads (ogg_mux->collect);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue