dbusServices/screencast: Check for all require elements
Instead of assuming that gst-plugins-good has been compiled with all the plugins we need enabled, explicitly check for the ones we use. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5710 Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2519>
This commit is contained in:
parent
f266c2ca15
commit
3cdcd075ef
@ -259,9 +259,13 @@ var Recorder = class {
|
|||||||
|
|
||||||
var ScreencastService = class extends ServiceImplementation {
|
var ScreencastService = class extends ServiceImplementation {
|
||||||
static canScreencast() {
|
static canScreencast() {
|
||||||
|
const elements = [
|
||||||
|
'pipewiresrc',
|
||||||
|
'filesink',
|
||||||
|
...DEFAULT_PIPELINE.split('!').map(e => e.trim().split(' ').at(0)),
|
||||||
|
];
|
||||||
return Gst.init_check(null) &&
|
return Gst.init_check(null) &&
|
||||||
Gst.ElementFactory.find('pipewiresrc') &&
|
elements.every(e => Gst.ElementFactory.find(e) != null);
|
||||||
Gst.ElementFactory.find('filesink');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user