diff options
Diffstat (limited to 'plugins/rtp/src')
| -rw-r--r-- | plugins/rtp/src/codec_util.vala | 2 | ||||
| -rw-r--r-- | plugins/rtp/src/plugin.vala | 2 | ||||
| -rw-r--r-- | plugins/rtp/src/stream.vala | 43 | ||||
| -rw-r--r-- | plugins/rtp/src/video_widget.vala | 15 |
4 files changed, 5 insertions, 57 deletions
diff --git a/plugins/rtp/src/codec_util.vala b/plugins/rtp/src/codec_util.vala index 12fcfed7..9f21f5a6 100644 --- a/plugins/rtp/src/codec_util.vala +++ b/plugins/rtp/src/codec_util.vala @@ -280,9 +280,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_18 if (codec == "vp8") return " wait-for-keyframe=true"; -#endif return null; } diff --git a/plugins/rtp/src/plugin.vala b/plugins/rtp/src/plugin.vala index a94c0ba0..d09b7edf 100644 --- a/plugins/rtp/src/plugin.vala +++ b/plugins/rtp/src/plugin.vala @@ -243,13 +243,11 @@ public class Dino.Plugins.Rtp.Plugin : RootInterface, VideoCallPlugin, Object { device = new Device(this, gst_device); devices.add(device); break; -#if GST_1_16 case Gst.MessageType.DEVICE_CHANGED: message.parse_device_changed(out gst_device, out old_gst_device); device = devices.first_match((it) => it.matches(old_gst_device)); if (device != null) device.update(gst_device); break; -#endif case Gst.MessageType.DEVICE_REMOVED: message.parse_device_removed(out gst_device); device = devices.first_match((it) => it.matches(gst_device)); diff --git a/plugins/rtp/src/stream.vala b/plugins/rtp/src/stream.vala index aa2b080d..9a46d9ff 100644 --- a/plugins/rtp/src/stream.vala +++ b/plugins/rtp/src/stream.vala @@ -102,9 +102,7 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { send_rtp.drop = true; send_rtp.wait_on_eos = false; send_rtp.new_sample.connect(on_new_sample); -#if GST_1_20 send_rtp.new_serialized_event.connect(on_new_event); -#endif send_rtp.connect("signal::eos", on_eos_static, this); pipe.add(send_rtp); @@ -299,7 +297,7 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { bool flip = false; uint8 rotation = 0; -#if GST_1_20 + private bool on_new_event(Gst.App.Sink sink) { if (sink == null || sink != send_rtp) { return false; @@ -349,7 +347,7 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { } return false; } -#endif + private Gst.FlowReturn on_new_sample(Gst.App.Sink sink) { if (sink == null) { @@ -373,14 +371,11 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { next_timestamp_offset_stamp = get_monotonic_time(); rtp_buffer.unmap(); } -#if GLIB_2_64 if (our_ssrc != buffer_ssrc) { warning_once("Sending RTP %s buffer seq %u with SSRC %u when our ssrc is %u", media, buffer_seq, buffer_ssrc, our_ssrc); } -#endif } -#if GST_1_20 if (sink == send_rtp) { Xmpp.Xep.JingleRtp.HeaderExtension? ext = header_extensions.first_match((it) => it.uri == "urn:3gpp:video-orientation"); if (ext != null) { @@ -396,7 +391,6 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { } } } -#endif prepare_local_crypto(); @@ -574,18 +568,7 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { on_recv_rtcp_data(bytes); return; } -#if GST_1_16 - { - Gst.Buffer buffer = new Gst.Buffer.wrapped_bytes(bytes); - Gst.RTP.Buffer rtp_buffer; - uint buffer_ssrc = 0, buffer_seq = 0; - if (Gst.RTP.Buffer.map(buffer, Gst.MapFlags.READ, out rtp_buffer)) { - buffer_ssrc = rtp_buffer.get_ssrc(); - buffer_seq = rtp_buffer.get_seq(); - rtp_buffer.unmap(); - } - } -#endif + if (push_recv_data) { prepare_remote_crypto(); @@ -598,15 +581,13 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { return; } } else { -#if GST_1_16 buffer = new Gst.Buffer.wrapped_bytes(bytes); -#else - buffer = new Gst.Buffer.wrapped(bytes.get_data()); -#endif } Gst.RTP.Buffer rtp_buffer; if (Gst.RTP.Buffer.map(buffer, Gst.MapFlags.READ, out rtp_buffer)) { + uint buffer_ssrc = rtp_buffer.get_ssrc(); + uint buffer_seq = rtp_buffer.get_seq(); if (rtp_buffer.get_extension()) { Xmpp.Xep.JingleRtp.HeaderExtension? ext = header_extensions.first_match((it) => it.uri == "urn:3gpp:video-orientation"); if (ext != null) { @@ -632,12 +613,7 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { rtp_buffer.unmap(); } -#if VALA_0_50 recv_rtp.push_buffer((owned) buffer); -#else - Gst.FlowReturn ret; - GLib.Signal.emit_by_name(recv_rtp, "push-buffer", buffer, out ret); -#endif } } @@ -654,19 +630,10 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { return; } } else { -#if GST_1_16 buffer = new Gst.Buffer.wrapped_bytes(bytes); -#else - buffer = new Gst.Buffer.wrapped(bytes.get_data()); -#endif } -#if VALA_0_50 recv_rtcp.push_buffer((owned) buffer); -#else - Gst.FlowReturn ret; - GLib.Signal.emit_by_name(recv_rtcp, "push-buffer", buffer, out ret); -#endif } } diff --git a/plugins/rtp/src/video_widget.vala b/plugins/rtp/src/video_widget.vala index 5557ec76..af6eb14e 100644 --- a/plugins/rtp/src/video_widget.vala +++ b/plugins/rtp/src/video_widget.vala @@ -75,17 +75,10 @@ public class Dino.Plugins.Rtp.Sink : Gst.Video.Sink { set_drop_out_of_segment(false); } -#if GST_1_20 public override bool set_info(Gst.Caps caps, Gst.Video.Info info) { this.info = info; return true; } -#else - public override bool set_caps(Gst.Caps caps) { - base.set_caps(caps); - return info.from_caps(caps); - } -#endif public override void get_times(Gst.Buffer buffer, out Gst.ClockTime start, out Gst.ClockTime end) { if (buffer.pts != -1) { @@ -250,21 +243,13 @@ public class Dino.Plugins.Rtp.VideoWidget : Gtk.Widget, Dino.Plugins.VideoCallWi if (connected_device == null) return; plugin.pause(); pipe.add(sink); -#if GST_1_20 prepare = Gst.parse_bin_from_description(@"videoflip video-direction=auto name=video_widget_$(id)_orientation ! videoflip method=horizontal-flip name=video_widget_$(id)_flip ! videoconvert name=video_widget_$(id)_convert", true); -#else - prepare = Gst.parse_bin_from_description(@"videoflip method=horizontal-flip name=video_widget_$(id)_flip ! videoconvert name=video_widget_$(id)_convert", true); -#endif prepare.name = @"video_widget_$(id)_prepare"; -#if GST_1_20 if (prepare is Gst.Bin) { ((Gst.Bin) prepare).get_by_name(@"video_widget_$(id)_flip").get_static_pad("sink").notify["caps"].connect(input_caps_changed); } else { -#endif prepare.get_static_pad("sink").notify["caps"].connect(input_caps_changed); -#if GST_1_20 } -#endif pipe.add(prepare); connected_device_element = connected_device.link_source(); connected_device_element.link(prepare); |
