aboutsummaryrefslogtreecommitdiff
path: root/plugins/rtp
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2021-12-23 06:39:18 +0100
committerMarvin W <git@larma.de>2021-12-23 07:06:07 +0100
commit1c4765281443e2a184157f319825c9b68665f9f5 (patch)
treea7e76078ba8f5308abaa0bf59a87f95298afd284 /plugins/rtp
parentd02c5bc55d4325de308a592e8980139aa0634215 (diff)
downloaddino-1c4765281443e2a184157f319825c9b68665f9f5.tar.gz
dino-1c4765281443e2a184157f319825c9b68665f9f5.zip
Fix build with older Vala compilers
- Older versions seem to assume a wrong type for Nice messages - Older versions have broken bindings for Gst.Value.set_fraction
Diffstat (limited to 'plugins/rtp')
-rw-r--r--plugins/rtp/src/video_widget.vala9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/rtp/src/video_widget.vala b/plugins/rtp/src/video_widget.vala
index 3daf5284..76e4dcca 100644
--- a/plugins/rtp/src/video_widget.vala
+++ b/plugins/rtp/src/video_widget.vala
@@ -1,3 +1,8 @@
+#if !VALA_0_52
+[CCode (cheader_filename = "gst/gst.h")]
+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 {
private static uint last_id = 0;
@@ -50,7 +55,11 @@ public class Dino.Plugins.Rtp.VideoWidget : Gtk.Bin, Dino.Plugins.VideoCallWidge
Gst.Element crop = ((Gst.Bin)prepare).get_by_name(@"video_widget_$(id)_crop");
if (crop != null) {
Value ratio = new Value(typeof(Gst.Fraction));
+#if VALA_0_52
Gst.Value.set_fraction(ref ratio, allocation.width, allocation.height);
+#else
+ gst_value_set_fraction(ref ratio, allocation.width, allocation.height);
+#endif
crop.set_property("aspect-ratio", ratio);
}
}