ports@,

here a diff which fixes video calls between Dino <-> Monal.

I did my best to make it universal with available codecs, so, I assume other
clients should works as well.

Can anyone test it against other client? I interested did I fix something or 
broke?

Thanks.

Index: Makefile
===================================================================
RCS file: /home/cvs/ports/net/dino/Makefile,v
diff -u -p -r1.41 Makefile
--- Makefile    19 Dec 2025 13:42:07 -0000      1.41
+++ Makefile    6 Jun 2026 17:25:54 -0000
@@ -1,6 +1,6 @@
 COMMENT=       XMPP desktop client
 VERSION=       0.5.1
-REVISION=      1
+REVISION=      2
 DISTNAME=      dino-${VERSION}
 CATEGORIES=    net x11
 
@@ -22,7 +22,10 @@ MODULES=     devel/meson
 BUILD_DEPENDS= devel/gettext,-tools \
                lang/vala
 RUN_DEPENDS=   devel/desktop-file-utils \
+               multimedia/gstreamer1/libav \
+               multimedia/gstreamer1/plugins-bad \
                multimedia/gstreamer1/plugins-good \
+               multimedia/gstreamer1/plugins-ugly \
                x11/gtk+4,-guic
 LIB_DEPENDS=   audio/libcanberra,-main \
                devel/libgee \
@@ -45,7 +48,10 @@ WANTLIB += graphene-1.0 gstapp-1.0 gstba
 WANTLIB += gstvideo-1.0 gtk-4 icuuc intl m nice pango-1.0 qrencode
 WANTLIB += omemo-c soup-3.0 sqlite3 srtp2
 
-CONFIGURE_ARGS=        -Dplugin-notification-sound=enabled \
+CONFIGURE_ARGS=        -Dplugin-rtp-h264=enabled \
+               -Dplugin-rtp-vaapi=enabled \
+               -Dplugin-rtp-vp9=enabled \
+               -Dplugin-notification-sound=enabled \
                -Dplugin-rtp-webrtc-audio-processing=disabled
 
 .include <bsd.port.mk>
Index: patches/patch-plugins_rtp_src_codec_util_vala
===================================================================
RCS file: patches/patch-plugins_rtp_src_codec_util_vala
diff -N patches/patch-plugins_rtp_src_codec_util_vala
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-plugins_rtp_src_codec_util_vala       6 Jun 2026 17:28:55 
-0000
@@ -0,0 +1,144 @@
+Enable codecs which exists in OpenBSD
+
+Based on:
+ - https://github.com/dino/dino/pull/1742
+ - https://github.com/dino/dino/pull/1781
+
+Index: plugins/rtp/src/codec_util.vala
+--- plugins/rtp/src/codec_util.vala.orig
++++ plugins/rtp/src/codec_util.vala
+@@ -102,7 +102,8 @@ public class Dino.Plugins.Rtp.CodecUtil {
+                         "msdkh264enc",
+ #endif
+ #if ENABLE_VAAPI
+-                        "vaapih264enc",
++                        "vah264lpenc",
++                        "vah264enc",
+ #endif
+                         "x264enc"
+                     };
+@@ -112,7 +113,7 @@ public class Dino.Plugins.Rtp.CodecUtil {
+                         "msdkvp9enc",
+ #endif
+ #if ENABLE_VAAPI
+-                        "vaapivp9enc",
++                        "vavp9enc",
+ #endif
+                         "vp9enc"
+                     };
+@@ -122,7 +123,7 @@ public class Dino.Plugins.Rtp.CodecUtil {
+                         "msdkvp8enc",
+ #endif
+ #if ENABLE_VAAPI
+-                        "vaapivp8enc",
++                        "vavp8enc",
+ #endif
+                         "vp8enc"
+                     };
+@@ -153,10 +154,10 @@ public class Dino.Plugins.Rtp.CodecUtil {
+ #if ENABLE_MSDK
+                         "msdkh264dec",
+ #endif
++                        "avdec_h264",
+ #if ENABLE_VAAPI
+-                        "vaapih264dec",
++                        "vah264dec",
+ #endif
+-                        null
+                     };
+                 case "vp9":
+                     return new string[] {
+@@ -164,7 +165,7 @@ public class Dino.Plugins.Rtp.CodecUtil {
+                         "msdkvp9dec",
+ #endif
+ #if ENABLE_VAAPI
+-                        "vaapivp9dec",
++                        "vavp9dec",
+ #endif
+                         "vp9dec"
+                     };
+@@ -174,7 +175,7 @@ public class Dino.Plugins.Rtp.CodecUtil {
+                         "msdkvp8dec",
+ #endif
+ #if ENABLE_VAAPI
+-                        "vaapivp8dec",
++                        "vavp8dec",
+ #endif
+                         "vp8dec"
+                     };
+@@ -185,22 +186,22 @@ public class Dino.Plugins.Rtp.CodecUtil {
+ 
+     public static string? get_encode_prefix(string media, string codec, 
string encode, JingleRtp.PayloadType? payload_type) {
+         if (encode == "msdkh264enc") return "capsfilter 
caps=video/x-raw,format=NV12 ! ";
+-        if (encode == "vaapih264enc") return "capsfilter 
caps=video/x-raw,format=NV12 ! ";
++        if (encode == "vah264lpenc" || encode == "vah264enc") return 
"capsfilter caps=video/x-raw,format=NV12 ! ";
+         return null;
+     }
+ 
+     public static string? get_encode_args(string media, string codec, string 
encode, JingleRtp.PayloadType? payload_type) {
+         // H264
+         if (encode == "msdkh264enc") return @" rate-control=vbr";
+-        if (encode == "vaapih264enc") return @" rate-control=vbr";
++        if (encode == "vah264lpenc" || encode == "vah264enc") return @" 
rate-control=vbr";
+         if (encode == "x264enc") return @" byte-stream=1 
speed-preset=ultrafast tune=zerolatency bframes=0 cabac=false dct8x8=false";
+ 
+         // VP8
+-        if (encode == "vaapivp8enc" || encode == "msdkvp8enc") return " 
rate-control=vbr target-percentage=90";
++        if (encode == "vavp8enc" || encode == "msdkvp8enc") return " 
rate-control=vbr target-percentage=90";
+         if (encode == "vp8enc") return " deadline=1 error-resilient=3 
lag-in-frames=0 resize-allowed=true threads=8 dropframe-threshold=30 
end-usage=vbr cpu-used=4";
+ 
+         // VP9
+-        if (encode == "msdkvp9enc" || encode == "vaapivp9enc") return " 
rate-control=vbr target-percentage=90";
++        if (encode == "msdkvp9enc" || encode == "vavp9enc") return " 
rate-control=vbr target-percentage=90";
+         if (encode == "vp9enc") return " deadline=1 error-resilient=3 
lag-in-frames=0 resize-allowed=true threads=8 dropframe-threshold=30 
end-usage=vbr cpu-used=4";
+ 
+         // OPUS
+@@ -229,12 +230,13 @@ public class Dino.Plugins.Rtp.CodecUtil {
+ 
+         switch (encode_name) {
+             case "msdkh264enc":
+-            case "vaapih264enc":
++            case "vah264lpenc":
++            case "vah264enc":
+             case "x264enc":
+             case "msdkvp9enc":
+-            case "vaapivp9enc":
++            case "vavp9enc":
+             case "msdkvp8enc":
+-            case "vaapivp8enc":
++            case "vavp8enc":
+                 bitrate = uint.min(2048000, bitrate);
+                 encode.set("bitrate", bitrate);
+                 return bitrate;
+@@ -265,12 +267,13 @@ public class Dino.Plugins.Rtp.CodecUtil {
+     }
+ 
+     public static string? get_decode_prefix(string media, string codec, 
string decode, JingleRtp.PayloadType? payload_type) {
++        if (decode == "vah264dec" || decode == "avdec_h264") return 
"h264parse ! ";
+         return null;
+     }
+ 
+     public static string? get_decode_args(string media, string codec, string 
decode, JingleRtp.PayloadType? payload_type) {
+         if (decode == "opusdec" && payload_type != null && 
payload_type.parameters.has("useinbandfec", "1")) return " use-inband-fec=true";
+-        if (decode == "vaapivp9dec" || decode == "vaapivp8dec" || decode == 
"vaapih264dec") return " max-errors=100";
++        if (decode == "vavp9dec" || decode == "vavp8dec" || decode == 
"vah264dec") return " max-errors=100";
+         if (decode == "vp8dec" || decode == "vp9dec") return " threads=8";
+         return null;
+     }
+@@ -280,6 +283,7 @@ public class Dino.Plugins.Rtp.CodecUtil {
+     }
+ 
+     public static string? get_depay_args(string media, string codec, string 
encode, JingleRtp.PayloadType? payload_type) {
++        if (codec == "h264") return " request-keyframe=true 
wait-for-keyframe=true";
+ #if GST_1_18
+         if (codec == "vp8") return " wait-for-keyframe=true";
+ #endif
+@@ -295,7 +299,7 @@ public class Dino.Plugins.Rtp.CodecUtil {
+             supported_elements.add(element_name);
+             return true;
+         } else {
+-            warning("%s is not installed or supported on this system", 
element_name);
++            info("%s is not installed or supported on this system", 
element_name);
+             unsupported_elements.add(element_name);
+             return false;
+         }


-- 
wbr, Kirill

Reply via email to