From: Wim Taymans Date: Tue, 20 Sep 2005 17:38:51 +0000 (+0000) Subject: gst/base/gstbasesink.c: Make sync property settable from subclass. X-Git-Tag: RELEASE-0_9_3~96 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46d159afcee5a62e8096da880d696670f3a266fb;p=platform%2Fupstream%2Fgstreamer.git gst/base/gstbasesink.c: Make sync property settable from subclass. Original commit message from CVS: * gst/base/gstbasesink.c: (gst_base_sink_class_init), (gst_base_sink_init): Make sync property settable from subclass. * gst/elements/gstfakesink.c: (gst_fake_sink_init), (gst_fake_sink_change_state): Set sync to FALSE by default. --- diff --git a/ChangeLog b/ChangeLog index 01f443e..89e268e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2005-09-20 Wim Taymans + * gst/base/gstbasesink.c: (gst_base_sink_class_init), + (gst_base_sink_init): + Make sync property settable from subclass. + + * gst/elements/gstfakesink.c: (gst_fake_sink_init), + (gst_fake_sink_change_state): + Set sync to FALSE by default. + +2005-09-20 Wim Taymans + * gst/gstbus.c: (poll_func), (poll_timeout), (gst_bus_poll): * tools/gst-launch.c: (main): The timeout handler should have lower priority than the source diff --git a/gst/base/gstbasesink.c b/gst/base/gstbasesink.c index 8fa0483..8886f6c 100644 --- a/gst/base/gstbasesink.c +++ b/gst/base/gstbasesink.c @@ -157,7 +157,7 @@ gst_base_sink_class_init (GstBaseSinkClass * klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SYNC, g_param_spec_boolean ("sync", "Sync", "Sync on the clock", DEFAULT_SYNC, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + G_PARAM_READWRITE)); gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_base_sink_set_clock); gstelement_class->change_state = @@ -270,6 +270,8 @@ gst_base_sink_init (GstBaseSink * basesink, gpointer g_class) basesink->can_activate_push = DEFAULT_CAN_ACTIVATE_PUSH; basesink->can_activate_pull = DEFAULT_CAN_ACTIVATE_PULL; + basesink->sync = DEFAULT_SYNC; + GST_FLAG_SET (basesink, GST_ELEMENT_IS_SINK); } diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index 2e72429..7bdaf18 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -58,10 +58,11 @@ enum LAST_SIGNAL }; +#define DEFAULT_SYNC FALSE + #define DEFAULT_STATE_ERROR FAKE_SINK_STATE_ERROR_NONE #define DEFAULT_SILENT FALSE #define DEFAULT_DUMP FALSE -#define DEFAULT_SYNC FALSE #define DEFAULT_SIGNAL_HANDOFFS FALSE #define DEFAULT_LAST_MESSAGE NULL #define DEFAULT_CAN_ACTIVATE_PUSH TRUE @@ -211,6 +212,7 @@ gst_fake_sink_init (GstFakeSink * fakesink, GstFakeSinkClass * g_class) { fakesink->silent = DEFAULT_SILENT; fakesink->dump = DEFAULT_DUMP; + GST_BASE_SINK (fakesink)->sync = DEFAULT_SYNC; fakesink->last_message = g_strdup (DEFAULT_LAST_MESSAGE); fakesink->state_error = DEFAULT_STATE_ERROR; fakesink->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS; @@ -403,6 +405,7 @@ gst_fake_sink_change_state (GstElement * element, GstStateChange transition) return ret; + /* ERROR */ error: GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL), (NULL)); return GST_STATE_CHANGE_FAILURE; diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c index 8fa0483..8886f6c 100644 --- a/libs/gst/base/gstbasesink.c +++ b/libs/gst/base/gstbasesink.c @@ -157,7 +157,7 @@ gst_base_sink_class_init (GstBaseSinkClass * klass) G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SYNC, g_param_spec_boolean ("sync", "Sync", "Sync on the clock", DEFAULT_SYNC, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); + G_PARAM_READWRITE)); gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_base_sink_set_clock); gstelement_class->change_state = @@ -270,6 +270,8 @@ gst_base_sink_init (GstBaseSink * basesink, gpointer g_class) basesink->can_activate_push = DEFAULT_CAN_ACTIVATE_PUSH; basesink->can_activate_pull = DEFAULT_CAN_ACTIVATE_PULL; + basesink->sync = DEFAULT_SYNC; + GST_FLAG_SET (basesink, GST_ELEMENT_IS_SINK); } diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index 2e72429..7bdaf18 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -58,10 +58,11 @@ enum LAST_SIGNAL }; +#define DEFAULT_SYNC FALSE + #define DEFAULT_STATE_ERROR FAKE_SINK_STATE_ERROR_NONE #define DEFAULT_SILENT FALSE #define DEFAULT_DUMP FALSE -#define DEFAULT_SYNC FALSE #define DEFAULT_SIGNAL_HANDOFFS FALSE #define DEFAULT_LAST_MESSAGE NULL #define DEFAULT_CAN_ACTIVATE_PUSH TRUE @@ -211,6 +212,7 @@ gst_fake_sink_init (GstFakeSink * fakesink, GstFakeSinkClass * g_class) { fakesink->silent = DEFAULT_SILENT; fakesink->dump = DEFAULT_DUMP; + GST_BASE_SINK (fakesink)->sync = DEFAULT_SYNC; fakesink->last_message = g_strdup (DEFAULT_LAST_MESSAGE); fakesink->state_error = DEFAULT_STATE_ERROR; fakesink->signal_handoffs = DEFAULT_SIGNAL_HANDOFFS; @@ -403,6 +405,7 @@ gst_fake_sink_change_state (GstElement * element, GstStateChange transition) return ret; + /* ERROR */ error: GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL), (NULL)); return GST_STATE_CHANGE_FAILURE;