Search
SailfishOS Open Build Service
>
Projects
>
home:abranson
:
branches:nemo:devel:hw:native-common
>
gstreamer1.0-plugins-good
> _service:tar_git:0001-Set-specific-media.role-for-pulsesink-probe.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File _service:tar_git:0001-Set-specific-media.role-for-pulsesink-probe.patch of Package gstreamer1.0-plugins-good
From df357449c26cdd24e3f4ff4be1b586ec1c784fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= <juho.hamalainen@tieto.com> Date: Thu, 17 Oct 2013 15:58:04 +0300 Subject: [PATCH 1/2] Set specific media.role for pulsesink probe. Some PulseAudio modules, like module-role-ducking and module-role-cork rely on media.role for their operation. Pulsesink probe stream has the same media.role property as the resulting playback stream, which causes unneccessary and distruptive actions in aforementioned modules. Set/overwrite pulsesink probe stream's media.role property so that probe stream can be distinguished from resulting stream more easily. --- ext/pulse/pulsesink.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index c88fa96..0c17c2d 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -2078,11 +2078,21 @@ gst_pulsesink_create_probe_stream (GstPulseSink * psink, pa_format_info *formats[1] = { format }; pa_stream *stream; pa_stream_flags_t flags; + pa_proplist *probe_proplist = NULL; GST_LOG_OBJECT (psink, "Creating probe stream"); + /* Set separate media.role property for probe stream, so that it can + * be distinguished more easily from the actual playback stream. */ + if (psink->proplist) + probe_proplist = pa_proplist_copy(psink->proplist); + else + probe_proplist = pa_proplist_new(); + + pa_proplist_sets(probe_proplist, PA_PROP_MEDIA_ROLE, "format-probe"); + if (!(stream = pa_stream_new_extended (pbuf->context, "pulsesink probe", - formats, 1, psink->proplist))) + formats, 1, probe_proplist))) goto error; /* construct the flags */ @@ -2098,9 +2108,15 @@ gst_pulsesink_create_probe_stream (GstPulseSink * psink, if (!gst_pulsering_wait_for_stream_ready (psink, stream)) goto error; + if (probe_proplist) + pa_proplist_free(probe_proplist); + return stream; error: + if (probe_proplist) + pa_proplist_free(probe_proplist); + if (stream) pa_stream_unref (stream); return NULL; -- 2.8.1