diff options
author | fiaxh <git@lightrise.org> | 2022-02-14 14:55:59 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-07-27 20:34:20 +0200 |
commit | 7e7dcedaf31ee35499875491c9f569c575d28435 (patch) | |
tree | 0c5fee2b28baf320775fbc92b3c252e97d9d054f /plugins/rtp | |
parent | f25bfb00969a7e09996da2d5500e6718f4cc0148 (diff) | |
download | dino-7e7dcedaf31ee35499875491c9f569c575d28435.tar.gz dino-7e7dcedaf31ee35499875491c9f569c575d28435.zip |
Port from GTK3 to GTK4
Diffstat (limited to 'plugins/rtp')
-rw-r--r-- | plugins/rtp/CMakeLists.txt | 2 | ||||
-rw-r--r-- | plugins/rtp/src/plugin.vala | 2 | ||||
-rw-r--r-- | plugins/rtp/src/video_widget.vala | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/rtp/CMakeLists.txt b/plugins/rtp/CMakeLists.txt index c8652c54..61d53c97 100644 --- a/plugins/rtp/CMakeLists.txt +++ b/plugins/rtp/CMakeLists.txt @@ -7,7 +7,7 @@ find_packages(RTP_PACKAGES REQUIRED GModule GnuTLS GObject - GTK3 + GTK4 Gst GstApp GstAudio diff --git a/plugins/rtp/src/plugin.vala b/plugins/rtp/src/plugin.vala index dc446530..aefe41ff 100644 --- a/plugins/rtp/src/plugin.vala +++ b/plugins/rtp/src/plugin.vala @@ -297,7 +297,7 @@ public class Dino.Plugins.Rtp.Plugin : RootInterface, VideoCallPlugin, Object { public VideoCallWidget? create_widget(WidgetType type) { init_call_pipe(); - if (type == WidgetType.GTK) { + if (type == WidgetType.GTK4) { return new VideoWidget(this); } return null; diff --git a/plugins/rtp/src/video_widget.vala b/plugins/rtp/src/video_widget.vala index 82693b09..7a56f787 100644 --- a/plugins/rtp/src/video_widget.vala +++ b/plugins/rtp/src/video_widget.vala @@ -3,7 +3,7 @@ private static extern void gst_value_set_fraction(ref GLib.Value value, int numerator, int denominator); #endif -public class Dino.Plugins.Rtp.VideoWidget : Gtk.Bin, Dino.Plugins.VideoCallWidget { +public class Dino.Plugins.Rtp.VideoWidget : Gtk.Widget, Dino.Plugins.VideoCallWidget { private const int RECAPS_AFTER_CHANGE = 5; private static uint last_id = 0; @@ -29,7 +29,7 @@ public class Dino.Plugins.Rtp.VideoWidget : Gtk.Bin, Dino.Plugins.VideoCallWidge this.plugin = plugin; id = last_id++; - sink = Gst.ElementFactory.make("gtksink", @"video_widget_$id") as Gst.Base.Sink; +// sink = Gst.ElementFactory.make("gtksink", @"video_widget_$id") as Gst.Base.Sink; if (sink != null) { Gtk.Widget widget; sink.@get("widget", out widget); @@ -37,13 +37,13 @@ public class Dino.Plugins.Rtp.VideoWidget : Gtk.Bin, Dino.Plugins.VideoCallWidge sink.@set("sync", true); sink.@set("ignore-alpha", false); this.widget = widget; - this.widget.draw.connect_after(fix_caps_issues); - add(widget); - widget.visible = true; +// this.widget.draw.connect_after(fix_caps_issues); + this.widget.insert_after(this, null); + this.widget.visible = true; } else { warning("Could not create GTK video sink. Won't display videos."); } - size_allocate.connect_after(after_size_allocate); +// size_allocate.connect_after(after_size_allocate); } public void input_caps_changed(GLib.Object pad, ParamSpec spec) { |