diff --git a/ChangeLog b/ChangeLog index 01f443e31a..89e268e6df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +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): diff --git a/gst/base/gstbasesink.c b/gst/base/gstbasesink.c index 8fa0483507..8886f6c87e 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 2e7242995a..7bdaf18dea 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 8fa0483507..8886f6c87e 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 2e7242995a..7bdaf18dea 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;