Commit 7448422f authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

gst/autodetect/: Fix state change function and use GST_DEBUG_FUNCPTR in class_init.

Original commit message from CVS:
* gst/autodetect/gstautoaudiosink.c:
(gst_auto_audio_sink_class_init),
(gst_auto_audio_sink_change_state):
* gst/autodetect/gstautovideosink.c:
(gst_auto_video_sink_class_init),
(gst_auto_video_sink_change_state):
Fix state change function and use GST_DEBUG_FUNCPTR in
class_init.
parent 7d9dd13c
2005-11-01 Tim-Philipp Müller <tim at centricular dot net>
* gst/autodetect/gstautoaudiosink.c:
(gst_auto_audio_sink_class_init),
(gst_auto_audio_sink_change_state):
* gst/autodetect/gstautovideosink.c:
(gst_auto_video_sink_class_init),
(gst_auto_video_sink_change_state):
Fix state change function and use GST_DEBUG_FUNCPTR in
class_init.
2005-11-01 Josef Zlomek <josef dot zlomek at xeris dot cz>
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
......
......@@ -57,7 +57,7 @@ gst_auto_audio_sink_class_init (GstAutoAudioSinkClass * klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
eklass->change_state = gst_auto_audio_sink_change_state;
eklass->change_state = GST_DEBUG_FUNCPTR (gst_auto_audio_sink_change_state);
}
/*
......@@ -237,15 +237,21 @@ static GstStateChangeReturn
gst_auto_audio_sink_change_state (GstElement * element,
GstStateChange transition)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstAutoAudioSink *sink = GST_AUTO_AUDIO_SINK (element);
GST_DEBUG_OBJECT (element, "Change state 0x%x", transition);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
if (!gst_auto_audio_sink_detect (sink))
return GST_STATE_CHANGE_FAILURE;
break;
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
gst_auto_audio_sink_reset (sink);
break;
......@@ -253,5 +259,5 @@ gst_auto_audio_sink_change_state (GstElement * element,
break;
}
return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
return ret;
}
......@@ -57,7 +57,7 @@ gst_auto_video_sink_class_init (GstAutoVideoSinkClass * klass)
{
GstElementClass *eklass = GST_ELEMENT_CLASS (klass);
eklass->change_state = gst_auto_video_sink_change_state;
eklass->change_state = GST_DEBUG_FUNCPTR (gst_auto_video_sink_change_state);
}
/*
......@@ -205,15 +205,21 @@ static GstStateChangeReturn
gst_auto_video_sink_change_state (GstElement * element,
GstStateChange transition)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GstAutoVideoSink *sink = GST_AUTO_VIDEO_SINK (element);
GST_DEBUG_OBJECT (element, "Change state 0x%x", transition);
switch (transition) {
case GST_STATE_CHANGE_NULL_TO_READY:
if (!gst_auto_video_sink_detect (sink))
return GST_STATE_CHANGE_FAILURE;
break;
default:
break;
}
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
switch (transition) {
case GST_STATE_CHANGE_READY_TO_NULL:
gst_auto_video_sink_reset (sink);
break;
......@@ -221,5 +227,5 @@ gst_auto_video_sink_change_state (GstElement * element,
break;
}
return GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
return ret;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment