diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2006-09-25 13:55:44 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-09-25 13:55:44 +0000 |
commit | 9cadd004a874b3181f4994df6bf87268f3aa9ca3 (patch) | |
tree | 876eac3515ae7fac978d9ad432c210e04e4fce93 /gst/autodetect/gstautoaudiosink.c | |
parent | b234d9b0f9ccf0db1fdfeccef24feb7508eb2fa1 (diff) |
gst/autodetect/: Small cleanups. don't try to set "sync" property when it is not available.
Original commit message from CVS:
* gst/autodetect/gstautoaudiosink.c:
(gst_auto_audio_sink_base_init), (gst_auto_audio_sink_class_init),
(gst_auto_audio_sink_find_best):
* gst/autodetect/gstautovideosink.c: (gst_auto_video_sink_detect):
Small cleanups.
don't try to set "sync" property when it is not available.
Diffstat (limited to 'gst/autodetect/gstautoaudiosink.c')
-rw-r--r-- | gst/autodetect/gstautoaudiosink.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/autodetect/gstautoaudiosink.c b/gst/autodetect/gstautoaudiosink.c index 8e8f14fa..ccaa413a 100644 --- a/gst/autodetect/gstautoaudiosink.c +++ b/gst/autodetect/gstautoaudiosink.c @@ -57,6 +57,7 @@ GST_ELEMENT_DETAILS ("Auto audio sink", "Sink/Audio", "Wrapper audio sink for automatically detected audio sink", "Ronald Bultje <rbultje@ronald.bitfreak.net>"); + static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -69,13 +70,16 @@ gst_auto_audio_sink_base_init (gpointer klass) gst_element_class_add_pad_template (eklass, gst_static_pad_template_get (&sink_template)); + gst_element_class_set_details (eklass, &gst_auto_audio_sink_details); } static void gst_auto_audio_sink_class_init (GstAutoAudioSinkClass * klass) { - GstElementClass *eklass = GST_ELEMENT_CLASS (klass); + GstElementClass *eklass; + + eklass = GST_ELEMENT_CLASS (klass); eklass->change_state = GST_DEBUG_FUNCPTR (gst_auto_audio_sink_change_state); } @@ -235,7 +239,8 @@ gst_auto_audio_sink_find_best (GstAutoAudioSink * sink) GST_ELEMENT_WARNING (sink, RESOURCE, NOT_FOUND, (NULL), ("Failed to find a usable audio sink")); choice = gst_element_factory_make ("fakesink", "fake-audio-sink"); - g_object_set (choice, "sync", TRUE, NULL); + if (g_object_class_find_property (G_OBJECT_GET_CLASS (choice), "sync")) + g_object_set (choice, "sync", TRUE, NULL); gst_element_set_state (choice, GST_STATE_READY); } } |