mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
gst: sink: Don't provide clock in provide mode
Counter-intuitive as it seems, when we are driving the clock, we can't also provide a clock from PipeWire to the pipeline -- we need the pipeline to drive the graph. So we make the mode control whether we provide a clock or not.
This commit is contained in:
parent
3c62d29a55
commit
439d5d04fe
1 changed files with 8 additions and 1 deletions
|
|
@ -242,7 +242,8 @@ gst_pipewire_sink_class_init (GstPipeWireSinkClass * klass)
|
||||||
GST_TYPE_PIPEWIRE_SINK_MODE,
|
GST_TYPE_PIPEWIRE_SINK_MODE,
|
||||||
DEFAULT_PROP_MODE,
|
DEFAULT_PROP_MODE,
|
||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS |
|
||||||
|
GST_PARAM_MUTABLE_READY));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_FD,
|
PROP_FD,
|
||||||
|
|
@ -1037,6 +1038,12 @@ gst_pipewire_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
goto open_failed;
|
goto open_failed;
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
|
/* If we are a driver, we shouldn't try to also provide the clock, as we
|
||||||
|
* _are_ the clock for the graph. For that case, we rely on the pipeline
|
||||||
|
* clock to drive the pipeline (and thus the graph). */
|
||||||
|
if (this->mode == GST_PIPEWIRE_SINK_MODE_PROVIDE)
|
||||||
|
GST_OBJECT_FLAG_UNSET (this, GST_ELEMENT_FLAG_PROVIDE_CLOCK);
|
||||||
|
|
||||||
/* the initial stream state is active, which is needed for linking and
|
/* the initial stream state is active, which is needed for linking and
|
||||||
* negotiation to happen and the bufferpool to be set up. We don't know
|
* negotiation to happen and the bufferpool to be set up. We don't know
|
||||||
* if we'll go to plaing, so we deactivate the stream until that
|
* if we'll go to plaing, so we deactivate the stream until that
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue