RTP: Use VP8 wait-for-keyframe only for GStreamer 1.18+

This commit is contained in:
Marvin W 2022-01-21 15:23:38 +01:00
parent eefce3fd81
commit 37cfbd8c76
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
2 changed files with 7 additions and 3 deletions

View File

@ -16,6 +16,10 @@ if(GstRtp_VERSION VERSION_GREATER "1.16")
set(RTP_DEFINITIONS GST_1_16)
endif()
if(GstRtp_VERSION VERSION_GREATER "1.18")
set(RTP_DEFINITIONS GST_1_18)
endif()
if(Vala_VERSION VERSION_GREATER "0.50")
set(RTP_DEFINITIONS VALA_0_50)
endif()

View File

@ -132,8 +132,8 @@ 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 "video/x-raw,format=NV12 ! ";
if (encode == "vaapih264enc") return "video/x-raw,format=NV12 ! ";
if (encode == "msdkh264enc") return "capsfilter caps=video/x-raw,format=NV12 ! ";
if (encode == "vaapih264enc") return "capsfilter caps=video/x-raw,format=NV12 ! ";
return null;
}
@ -228,7 +228,7 @@ public class Dino.Plugins.Rtp.CodecUtil {
}
public static string? get_depay_args(string media, string codec, string encode, JingleRtp.PayloadType? payload_type) {
#if GST_1_16
#if GST_1_18
if (codec == "vp8") return " wait-for-keyframe=true";
#endif
return null;