From 9490ffed6b5a2b17426d3aabcb3d4fa4c8e53625 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sat, 25 Dec 2021 18:25:13 +0100 Subject: Fixes for older valac versions --- plugins/ice/src/transport_parameters.vala | 7 ++++--- plugins/rtp/CMakeLists.txt | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/ice/src/transport_parameters.vala b/plugins/ice/src/transport_parameters.vala index 73cf6166..fdeebb82 100644 --- a/plugins/ice/src/transport_parameters.vala +++ b/plugins/ice/src/transport_parameters.vala @@ -43,13 +43,14 @@ public class Dino.Plugins.Ice.TransportParameters : JingleIceUdp.IceUdpTransport if (dtls_srtp_handler != null) { uint8[] encrypted_data = dtls_srtp_handler.process_outgoing_data(component_id, datagram.get_data()); if (encrypted_data == null) return; - // TODO: Nonblocking might require certain libnice versions? - GLib.OutputVector[] vectors = {{ encrypted_data, encrypted_data.length }}; + GLib.OutputVector vector = { encrypted_data, encrypted_data.length }; + GLib.OutputVector[] vectors = { vector }; Nice.OutputMessage message = { vectors }; Nice.OutputMessage[] messages = { message }; agent.send_messages_nonblocking(stream_id, component_id, messages); } else { - GLib.OutputVector[] vectors = {{ datagram.get_data(), datagram.get_size() }}; + GLib.OutputVector vector = { datagram.get_data(), datagram.get_size() }; + GLib.OutputVector[] vectors = { vector }; Nice.OutputMessage message = { vectors }; Nice.OutputMessage[] messages = { message }; agent.send_messages_nonblocking(stream_id, component_id, messages); diff --git a/plugins/rtp/CMakeLists.txt b/plugins/rtp/CMakeLists.txt index fa4f367c..3a121a13 100644 --- a/plugins/rtp/CMakeLists.txt +++ b/plugins/rtp/CMakeLists.txt @@ -20,6 +20,10 @@ if(Vala_VERSION VERSION_GREATER "0.50") set(RTP_DEFINITIONS VALA_0_50) endif() +if(Vala_VERSION VERSION_GREATER "0.52") + set(RTP_DEFINITIONS VALA_0_52) +endif() + if(WebRTCAudioProcessing_VERSION GREATER "0.4") message(STATUS "Ignoring WebRTCAudioProcessing, only versions < 0.4 supported so far") unset(WebRTCAudioProcessing_FOUND) -- cgit v1.2.3-54-g00ecf