Do not hold gtkglsink as a prop

It was remembered only to later access its ignore_textures property, but it is also available on the widget itself, so use that instead
This commit is contained in:
Rafostar
2021-01-04 22:18:20 +01:00
parent 16f26d3207
commit d6ef29c17e

View File

@@ -45,7 +45,7 @@ class ClapperPlayerBase extends GstPlayer.Player
video_renderer: renderer video_renderer: renderer
}); });
this.gtkglsink = gtkglsink; this.widget = gtkglsink.widget;
this.widget.vexpand = true; this.widget.vexpand = true;
this.widget.hexpand = true; this.widget.hexpand = true;
@@ -66,11 +66,6 @@ class ClapperPlayerBase extends GstPlayer.Player
this.ref(); this.ref();
} }
get widget()
{
return this.gtkglsink.widget;
}
set_and_bind_settings() set_and_bind_settings()
{ {
let settingsToSet = [ let settingsToSet = [
@@ -159,7 +154,7 @@ class ClapperPlayerBase extends GstPlayer.Player
draw_black(isEnabled) draw_black(isEnabled)
{ {
this.gtkglsink.ignore_textures = isEnabled; this.widget.ignore_textures = isEnabled;
if(this.state !== GstPlayer.PlayerState.PLAYING) if(this.state !== GstPlayer.PlayerState.PLAYING)
this.widget.queue_render(); this.widget.queue_render();