summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2019-07-11 19:08:49 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2019-07-12 12:51:18 +0300
commite0ab5e6b815ab7a063321ce333540bac57dd5823 (patch)
tree78d8bab3bd749c85def96e562b6f6e7e1e89391d /binding
parentfb88a1aad8654810e51c04c918468b623ac9e92e (diff)
radio: gstreamer: use pwaudiosink instead of alsasinkhalibut_7.99.3halibut/7.99.37.99.3
This native pipewire sink has better performance and allows 1) properly selecting the role of the app 2) proper handling of the situation where another app with higher priority has taken over the audio stream Bug-AGL: SPEC-2634 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com> Change-Id: I9d0ea9ff475817c0944dd7c2b6d153f149abc957
Diffstat (limited to 'binding')
-rw-r--r--binding/radio_output_gstreamer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binding/radio_output_gstreamer.c b/binding/radio_output_gstreamer.c
index f492bb5..6b938fd 100644
--- a/binding/radio_output_gstreamer.c
+++ b/binding/radio_output_gstreamer.c
@@ -61,7 +61,7 @@ int radio_output_open()
queue = gst_element_factory_make("queue", "queue");
convert = gst_element_factory_make("audioconvert", "convert");
resample = gst_element_factory_make("audioresample", "resample");
- sink = gst_element_factory_make("alsasink", "sink");
+ sink = gst_element_factory_make("pwaudiosink", "sink");
if(!(pipeline && appsrc && queue && convert && resample && sink)) {
fprintf(stderr, "pipeline element construction failed!\n");
}
@@ -73,6 +73,7 @@ int radio_output_open()
"layout", G_TYPE_STRING, "interleaved",
"channel-mask", G_TYPE_UINT64, 3,
NULL), NULL);
+ gst_util_set_object_arg(sink, "stream-properties", "p,media.role=Multimedia");
if((p = getenv("RADIO_OUTPUT"))) {
fprintf(stderr, "Using output device %s\n", p);