Flatpak: add more black rendering improvements to patch

This commit is contained in:
Rafostar
2020-11-17 13:20:03 +01:00
parent 7159bf3d5a
commit 6788f234aa
5 changed files with 421 additions and 12 deletions

View File

@@ -39,6 +39,7 @@ class ClapperPlayerBase extends GstPlayer.Player
+ ' Do you have gstreamer-plugins-good-gtk4 installed?'
));
}
gtkglsink.show_preroll_frame = false;
let glsinkbin = Gst.ElementFactory.make('glsinkbin', null);
glsinkbin.sink = gtkglsink;
@@ -59,10 +60,11 @@ class ClapperPlayerBase extends GstPlayer.Player
video_renderer: renderer
});
this.widget = gtkglsink.widget;
this.gtkglsink = gtkglsink;
this.widget.vexpand = true;
this.widget.hexpand = true;
this.state = GstPlayer.PlayerState.STOPPED;
this.visualization_enabled = false;
this.set_all_plugins_ranks();
@@ -72,6 +74,11 @@ class ClapperPlayerBase extends GstPlayer.Player
settings.connect('changed', this._onSettingsKeyChanged.bind(this));
}
get widget()
{
return this.gtkglsink.widget;
}
set_and_bind_settings()
{
let settingsToSet = [
@@ -160,6 +167,14 @@ class ClapperPlayerBase extends GstPlayer.Player
debug(`changed rank: ${oldRank} -> ${rank} for ${name}`);
}
draw_black(isEnabled)
{
this.gtkglsink.ignore_textures = isEnabled;
if(this.state !== GstPlayer.PlayerState.PLAYING)
this.widget.queue_render();
}
_onSettingsKeyChanged(settings, key)
{
switch(key) {