mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
api: Use fakesink when PipeWire enabled but unavailable
Instead of misleading users that they are using PipeWire after enabling it, use fakesink in order to not output any sound at all
This commit is contained in:
10
lib/gst/clapper/gstclapper.c
vendored
10
lib/gst/clapper/gstclapper.c
vendored
@@ -3158,8 +3158,14 @@ gst_clapper_main (gpointer data)
|
||||
if (pipewiresink) {
|
||||
g_object_set (self->playbin, "audio-sink", pipewiresink, NULL);
|
||||
} else {
|
||||
g_warning ("GstClapper: pipewiresink element not available. "
|
||||
"Default audio sink will be used instead.");
|
||||
GstElement *fakesink;
|
||||
|
||||
g_warning ("GstClapper: pipewiresink element not available");
|
||||
fakesink = gst_element_factory_make ("fakesink", "fakeaudiosink");
|
||||
if (fakesink)
|
||||
g_object_set (self->playbin, "audio-sink", fakesink, NULL);
|
||||
else
|
||||
g_warning ("GstClapper: default audio sink will be used instead");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user