+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):
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);
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;
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
/* 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)
{
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;
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;