mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 01:28:34 +00:00
add can-activate-pull property to baseaudiosink
* gst-libs/gst/audio/gstbaseaudiosink.c: Add can-activate-pull property to baseaudiosink.
This commit is contained in:
parent
915b3d139d
commit
c4074a2ee4
1 changed files with 17 additions and 4 deletions
|
@ -80,13 +80,17 @@ enum
|
||||||
#define DEFAULT_PROVIDE_CLOCK TRUE
|
#define DEFAULT_PROVIDE_CLOCK TRUE
|
||||||
#define DEFAULT_SLAVE_METHOD GST_BASE_AUDIO_SINK_SLAVE_SKEW
|
#define DEFAULT_SLAVE_METHOD GST_BASE_AUDIO_SINK_SLAVE_SKEW
|
||||||
|
|
||||||
|
/* FIXME, enable pull mode when clock slaving and trick modes are figured out */
|
||||||
|
#define DEFAULT_CAN_ACTIVATE_PULL FALSE
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PROP_0,
|
PROP_0,
|
||||||
PROP_BUFFER_TIME,
|
PROP_BUFFER_TIME,
|
||||||
PROP_LATENCY_TIME,
|
PROP_LATENCY_TIME,
|
||||||
PROP_PROVIDE_CLOCK,
|
PROP_PROVIDE_CLOCK,
|
||||||
PROP_SLAVE_METHOD
|
PROP_SLAVE_METHOD,
|
||||||
|
PROP_CAN_ACTIVATE_PULL
|
||||||
};
|
};
|
||||||
|
|
||||||
GType
|
GType
|
||||||
|
@ -200,6 +204,11 @@ gst_base_audio_sink_class_init (GstBaseAudioSinkClass * klass)
|
||||||
GST_TYPE_BASE_AUDIO_SINK_SLAVE_METHOD, DEFAULT_SLAVE_METHOD,
|
GST_TYPE_BASE_AUDIO_SINK_SLAVE_METHOD, DEFAULT_SLAVE_METHOD,
|
||||||
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
|
g_object_class_install_property (gobject_class, PROP_CAN_ACTIVATE_PULL,
|
||||||
|
g_param_spec_boolean ("can-activate-pull", "Allow Pull Scheduling",
|
||||||
|
"Allow pull-based scheduling", DEFAULT_CAN_ACTIVATE_PULL,
|
||||||
|
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
gstelement_class->change_state =
|
gstelement_class->change_state =
|
||||||
GST_DEBUG_FUNCPTR (gst_base_audio_sink_change_state);
|
GST_DEBUG_FUNCPTR (gst_base_audio_sink_change_state);
|
||||||
gstelement_class->provide_clock =
|
gstelement_class->provide_clock =
|
||||||
|
@ -239,9 +248,7 @@ gst_base_audio_sink_init (GstBaseAudioSink * baseaudiosink,
|
||||||
(GstAudioClockGetTimeFunc) gst_base_audio_sink_get_time, baseaudiosink);
|
(GstAudioClockGetTimeFunc) gst_base_audio_sink_get_time, baseaudiosink);
|
||||||
|
|
||||||
GST_BASE_SINK (baseaudiosink)->can_activate_push = TRUE;
|
GST_BASE_SINK (baseaudiosink)->can_activate_push = TRUE;
|
||||||
/* FIXME, enable pull mode when segments, latency, state changes, negotiation
|
GST_BASE_SINK (baseaudiosink)->can_activate_pull = DEFAULT_CAN_ACTIVATE_PULL;
|
||||||
* and clock slaving are figured out */
|
|
||||||
GST_BASE_SINK (baseaudiosink)->can_activate_pull = FALSE;
|
|
||||||
|
|
||||||
/* install some custom pad_query functions */
|
/* install some custom pad_query functions */
|
||||||
gst_pad_set_query_function (GST_BASE_SINK_PAD (baseaudiosink),
|
gst_pad_set_query_function (GST_BASE_SINK_PAD (baseaudiosink),
|
||||||
|
@ -574,6 +581,9 @@ gst_base_audio_sink_set_property (GObject * object, guint prop_id,
|
||||||
case PROP_SLAVE_METHOD:
|
case PROP_SLAVE_METHOD:
|
||||||
gst_base_audio_sink_set_slave_method (sink, g_value_get_enum (value));
|
gst_base_audio_sink_set_slave_method (sink, g_value_get_enum (value));
|
||||||
break;
|
break;
|
||||||
|
case PROP_CAN_ACTIVATE_PULL:
|
||||||
|
GST_BASE_SINK (sink)->can_activate_pull = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
@ -601,6 +611,9 @@ gst_base_audio_sink_get_property (GObject * object, guint prop_id,
|
||||||
case PROP_SLAVE_METHOD:
|
case PROP_SLAVE_METHOD:
|
||||||
g_value_set_enum (value, gst_base_audio_sink_get_slave_method (sink));
|
g_value_set_enum (value, gst_base_audio_sink_get_slave_method (sink));
|
||||||
break;
|
break;
|
||||||
|
case PROP_CAN_ACTIVATE_PULL:
|
||||||
|
g_value_set_boolean (value, GST_BASE_SINK (sink)->can_activate_pull);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue