mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
pipewiresrc: Make it live by default
In theory, the pipewiresrc element is a live element by default. However, that is not reflected in code, as the element never sets that flag unless explicltly requested through stream properties. Make it live by default, but still respect if consumers of the element mark it as not live.
This commit is contained in:
parent
8d4f7df9d6
commit
0fd44bc9d0
1 changed files with 4 additions and 1 deletions
|
|
@ -428,6 +428,9 @@ gst_pipewire_src_init (GstPipeWireSrc * src)
|
|||
/* we operate in time */
|
||||
gst_base_src_set_format (GST_BASE_SRC (src), GST_FORMAT_TIME);
|
||||
|
||||
/* we're a live source, unless explicitly requested not to be */
|
||||
gst_base_src_set_live (GST_BASE_SRC (src), TRUE);
|
||||
|
||||
GST_OBJECT_FLAG_SET (src, GST_ELEMENT_FLAG_PROVIDE_CLOCK);
|
||||
|
||||
src->always_copy = DEFAULT_ALWAYS_COPY;
|
||||
|
|
@ -670,7 +673,7 @@ parse_stream_properties (GstPipeWireSrc *pwsrc, const struct pw_properties *prop
|
|||
|
||||
GST_OBJECT_LOCK (pwsrc);
|
||||
var = pw_properties_get (props, PW_KEY_STREAM_IS_LIVE);
|
||||
is_live = pwsrc->is_live = var ? pw_properties_parse_bool(var) : FALSE;
|
||||
is_live = pwsrc->is_live = var ? pw_properties_parse_bool(var) : TRUE;
|
||||
|
||||
var = pw_properties_get (props, PW_KEY_STREAM_LATENCY_MIN);
|
||||
pwsrc->min_latency = var ? (GstClockTime) atoi (var) : 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue