mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 00:58:12 +00:00
ext/ogg/gstogmparse.c: In state change function, first chain up to parent class, then handle downwards state change s...
Original commit message from CVS: * ext/ogg/gstogmparse.c: (gst_ogm_parse_class_init), (gst_ogm_audio_parse_init), (gst_ogm_video_parse_init), (gst_ogm_text_parse_init), (gst_ogm_parse_change_state): In state change function, first chain up to parent class, then handle downwards state change stuff. Remove some commented out cruft from 0.8 code.
This commit is contained in:
parent
ccf6ce6b31
commit
be085f13a8
2 changed files with 18 additions and 36 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2006-03-02 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/ogg/gstogmparse.c: (gst_ogm_parse_class_init),
|
||||||
|
(gst_ogm_audio_parse_init), (gst_ogm_video_parse_init),
|
||||||
|
(gst_ogm_text_parse_init), (gst_ogm_parse_change_state):
|
||||||
|
In state change function, first chain up to parent class,
|
||||||
|
then handle downwards state change stuff. Remove some
|
||||||
|
commented out cruft from 0.8 code.
|
||||||
|
|
||||||
2006-03-02 Tim-Philipp Müller <tim at centricular dot net>
|
2006-03-02 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* ext/ogg/gstogmparse.c: (gst_ogm_audio_parse_init),
|
* ext/ogg/gstogmparse.c: (gst_ogm_audio_parse_init),
|
||||||
|
|
|
@ -140,10 +140,6 @@ static void gst_ogm_video_parse_init (GstOgmParse * ogm);
|
||||||
static void gst_ogm_audio_parse_init (GstOgmParse * ogm);
|
static void gst_ogm_audio_parse_init (GstOgmParse * ogm);
|
||||||
static void gst_ogm_text_parse_init (GstOgmParse * ogm);
|
static void gst_ogm_text_parse_init (GstOgmParse * ogm);
|
||||||
|
|
||||||
#if 0
|
|
||||||
static const GstFormat *gst_ogm_parse_get_sink_formats (GstPad * pad);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const GstQueryType *gst_ogm_parse_get_sink_querytypes (GstPad * pad);
|
static const GstQueryType *gst_ogm_parse_get_sink_querytypes (GstPad * pad);
|
||||||
static gboolean gst_ogm_parse_sink_query (GstPad * pad, GstQuery * query);
|
static gboolean gst_ogm_parse_sink_query (GstPad * pad, GstQuery * query);
|
||||||
static gboolean gst_ogm_parse_sink_convert (GstPad * pad, GstFormat src_format,
|
static gboolean gst_ogm_parse_sink_convert (GstPad * pad, GstFormat src_format,
|
||||||
|
@ -325,9 +321,10 @@ gst_ogm_parse_class_init (GstOgmParseClass * klass)
|
||||||
{
|
{
|
||||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
|
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass);
|
||||||
|
|
||||||
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
|
parent_class = g_type_class_peek_parent (klass);
|
||||||
|
|
||||||
gstelement_class->change_state = gst_ogm_parse_change_state;
|
gstelement_class->change_state =
|
||||||
|
GST_DEBUG_FUNCPTR (gst_ogm_parse_change_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -352,11 +349,6 @@ gst_ogm_audio_parse_init (GstOgmParse * ogm)
|
||||||
GST_DEBUG_FUNCPTR (gst_ogm_parse_chain));
|
GST_DEBUG_FUNCPTR (gst_ogm_parse_chain));
|
||||||
gst_element_add_pad (GST_ELEMENT (ogm), ogm->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (ogm), ogm->sinkpad);
|
||||||
|
|
||||||
#if 0
|
|
||||||
ogm->srcpad = gst_pad_new_from_template (audio_src_templ, "src");
|
|
||||||
gst_pad_use_explicit_caps (ogm->srcpad);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (ogm), ogm->srcpad);
|
|
||||||
#endif
|
|
||||||
ogm->srcpad = NULL;
|
ogm->srcpad = NULL;
|
||||||
ogm->srcpadtempl = audio_src_templ;
|
ogm->srcpadtempl = audio_src_templ;
|
||||||
}
|
}
|
||||||
|
@ -374,11 +366,6 @@ gst_ogm_video_parse_init (GstOgmParse * ogm)
|
||||||
GST_DEBUG_FUNCPTR (gst_ogm_parse_chain));
|
GST_DEBUG_FUNCPTR (gst_ogm_parse_chain));
|
||||||
gst_element_add_pad (GST_ELEMENT (ogm), ogm->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (ogm), ogm->sinkpad);
|
||||||
|
|
||||||
#if 0
|
|
||||||
ogm->srcpad = gst_pad_new_from_template (video_src_templ, "src");
|
|
||||||
gst_pad_use_explicit_caps (ogm->srcpad);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (ogm), ogm->srcpad);
|
|
||||||
#endif
|
|
||||||
ogm->srcpad = NULL;
|
ogm->srcpad = NULL;
|
||||||
ogm->srcpadtempl = video_src_templ;
|
ogm->srcpadtempl = video_src_templ;
|
||||||
}
|
}
|
||||||
|
@ -398,29 +385,10 @@ gst_ogm_text_parse_init (GstOgmParse * ogm)
|
||||||
GST_DEBUG_FUNCPTR (gst_ogm_parse_chain));
|
GST_DEBUG_FUNCPTR (gst_ogm_parse_chain));
|
||||||
gst_element_add_pad (GST_ELEMENT (ogm), ogm->sinkpad);
|
gst_element_add_pad (GST_ELEMENT (ogm), ogm->sinkpad);
|
||||||
|
|
||||||
#if 0
|
|
||||||
ogm->srcpad = gst_pad_new_from_template (text_src_templ, "src");
|
|
||||||
gst_pad_use_explicit_caps (ogm->srcpad);
|
|
||||||
gst_element_add_pad (GST_ELEMENT (ogm), ogm->srcpad);
|
|
||||||
#endif
|
|
||||||
ogm->srcpad = NULL;
|
ogm->srcpad = NULL;
|
||||||
ogm->srcpadtempl = text_src_templ;
|
ogm->srcpadtempl = text_src_templ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static const GstFormat *
|
|
||||||
gst_ogm_parse_get_sink_formats (GstPad * pad)
|
|
||||||
{
|
|
||||||
static GstFormat formats[] = {
|
|
||||||
GST_FORMAT_DEFAULT,
|
|
||||||
GST_FORMAT_TIME,
|
|
||||||
0
|
|
||||||
};
|
|
||||||
|
|
||||||
return formats;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const GstQueryType *
|
static const GstQueryType *
|
||||||
gst_ogm_parse_get_sink_querytypes (GstPad * pad)
|
gst_ogm_parse_get_sink_querytypes (GstPad * pad)
|
||||||
{
|
{
|
||||||
|
@ -737,8 +705,13 @@ gst_ogm_parse_chain (GstPad * pad, GstBuffer * buffer)
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
gst_ogm_parse_change_state (GstElement * element, GstStateChange transition)
|
gst_ogm_parse_change_state (GstElement * element, GstStateChange transition)
|
||||||
{
|
{
|
||||||
|
GstStateChangeReturn ret;
|
||||||
GstOgmParse *ogm = GST_OGM_PARSE (element);
|
GstOgmParse *ogm = GST_OGM_PARSE (element);
|
||||||
|
|
||||||
|
ret = parent_class->change_state (element, transition);
|
||||||
|
if (ret != GST_STATE_CHANGE_SUCCESS)
|
||||||
|
return ret;
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
if (ogm->srcpad) {
|
if (ogm->srcpad) {
|
||||||
|
@ -752,7 +725,7 @@ gst_ogm_parse_change_state (GstElement * element, GstStateChange transition)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent_class->change_state (element, transition);
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
|
Loading…
Reference in a new issue