mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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.
This commit is contained in:
parent
4fd77c1920
commit
46d159afce
5 changed files with 24 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2005-09-20 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* 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 <wim@fluendo.com>
|
||||
|
||||
* gst/gstbus.c: (poll_func), (poll_timeout), (gst_bus_poll):
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue