aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2026-10-03 16:05:51 +0200
committerMarvin W <git@larma.de>2026-10-23 16:59:59 +0200
commit2413442905e31f34cb0f77c9167003b3725760fe (patch)
treeca9b9a00f8bcc56f120743e4ae2c8d0b509bd12c
parentcd0d992b9b5d3ea29c7d4a3aab76ad53319ea162 (diff)
Drop supported for outdated dependency versions
-rw-r--r--libdino/meson.build3
-rw-r--r--libdino/src/service/stream_interactor.vala5
-rw-r--r--main/meson.build29
-rw-r--r--main/src/ui/conversation_content_view/file_transmission_progress.vala13
-rw-r--r--main/src/ui/util/helper.vala11
-rw-r--r--main/src/ui/widgets/avatar_picture.vala4
-rw-r--r--main/src/ui/widgets/fixed_ratio_picture.vala2
-rw-r--r--main/src/windows/conversation_details.vala4
-rw-r--r--meson.build29
-rw-r--r--plugins/omemo/src/ui/encryption_preferences_entry.vala5
-rw-r--r--plugins/openpgp/meson.build3
-rw-r--r--plugins/rtp/meson.build9
-rw-r--r--plugins/rtp/src/codec_util.vala2
-rw-r--r--plugins/rtp/src/plugin.vala2
-rw-r--r--plugins/rtp/src/stream.vala43
-rw-r--r--plugins/rtp/src/video_widget.vala15
-rw-r--r--xmpp-vala/meson.build3
-rw-r--r--xmpp-vala/src/core/direct_tls_xmpp_stream.vala2
-rw-r--r--xmpp-vala/src/core/module_flag.vala10
19 files changed, 22 insertions, 172 deletions
diff --git a/libdino/meson.build b/libdino/meson.build
index e680b662..a3430200 100644
--- a/libdino/meson.build
+++ b/libdino/meson.build
@@ -119,9 +119,6 @@ c_args = vala_c_args + [
vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi',
]
-if meson.get_compiler('vala').version().version_compare('=0.56.11')
- vala_args += ['-D', 'VALA_0_56_11']
-endif
lib_dino = library('libdino', sources, c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, name_prefix: '', version: '0.0', install: true, install_dir: [true, true, true], install_rpath: default_install_rpath)
dep_dino = declare_dependency(link_with: lib_dino, include_directories: include_directories('.', 'src'))
diff --git a/libdino/src/service/stream_interactor.vala b/libdino/src/service/stream_interactor.vala
index 2ac13103..2cd0c45c 100644
--- a/libdino/src/service/stream_interactor.vala
+++ b/libdino/src/service/stream_interactor.vala
@@ -100,12 +100,7 @@ public class ModuleIdentity<T> : Object {
}
public T? cast(StreamInteractionModule module) {
-#if VALA_0_56_11
- // We can't typecheck due to compiler bug
- return (T) module;
-#else
return module.get_type().is_a(typeof(T)) ? (T?) module : null;
-#endif
}
public bool matches(StreamInteractionModule module) {
diff --git a/main/meson.build b/main/meson.build
index 3c15db32..fbe78573 100644
--- a/main/meson.build
+++ b/main/meson.build
@@ -47,6 +47,7 @@ sources = files(
'src/ui/conversation_content_view/date_separator_populator.vala',
'src/ui/conversation_content_view/file_default_widget.vala',
'src/ui/conversation_content_view/file_image_widget.vala',
+ 'src/ui/conversation_content_view/file_transmission_progress.c',
'src/ui/conversation_content_view/file_transmission_progress.vala',
'src/ui/conversation_content_view/file_group_widget.vala',
'src/ui/conversation_content_view/file_widget.vala',
@@ -113,34 +114,6 @@ c_args = vala_c_args + [
vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi',
]
-if dep_gtk4.version() == 'unknown' or dep_gtk4.version().version_compare('>=4.6')
- vala_args += ['-D', 'GTK_4_6']
-endif
-if dep_gtk4.version() == 'unknown' or dep_gtk4.version().version_compare('>=4.8')
- vala_args += ['-D', 'GTK_4_8']
-endif
-if dep_gtk4.version() == 'unknown' or dep_gtk4.version().version_compare('>=4.12')
- vala_args += ['-D', 'GTK_4_12']
-endif
-if dep_gtk4.version() == 'unknown' or dep_gtk4.version().version_compare('>=4.14')
- vala_args += ['-D', 'GTK_4_14']
- sources += files('src/ui/conversation_content_view/file_transmission_progress.c')
-endif
-if dep_libadwaita.version() == 'unknown' or dep_libadwaita.version().version_compare('>=1.4')
- vala_args += ['-D', 'Adw_1_4']
-endif
-if meson.get_compiler('vala').version().version_compare('>=0.56.5') and meson.get_compiler('vala').version().version_compare('<0.58')
- vala_args += ['-D', 'VALA_0_56_GREATER_5']
-endif
-if meson.get_compiler('vala').version().version_compare('>=0.56.11') and meson.get_compiler('vala').version().version_compare('<0.58')
- vala_args += ['-D', 'VALA_0_56_GREATER_11']
-endif
-if meson.get_compiler('vala').version().version_compare('=0.56.11')
- vala_args += ['-D', 'VALA_0_56_11']
-endif
-if meson.get_compiler('vala').version().version_compare('=0.56.12')
- vala_args += ['-D', 'VALA_0_56_12']
-endif
exe_dino = executable('dino', sources, c_args: c_args, vala_args: vala_args, dependencies: dependencies, install: true, install_rpath: default_install_rpath)
install_data('data/icons/scalable/apps/im.dino.Dino-symbolic.svg', install_dir: get_option('datadir') / 'icons/hicolor/symbolic/apps')
diff --git a/main/src/ui/conversation_content_view/file_transmission_progress.vala b/main/src/ui/conversation_content_view/file_transmission_progress.vala
index 43885c1b..3d893f52 100644
--- a/main/src/ui/conversation_content_view/file_transmission_progress.vala
+++ b/main/src/ui/conversation_content_view/file_transmission_progress.vala
@@ -84,9 +84,7 @@ namespace Dino.Ui {
}
}
-#if GTK_4_14
private static extern Gsk.Path create_progress_arc(Gsk.Path circle, float percentage);
-#endif
public override void snapshot(Gtk.Snapshot snapshot) {
base.snapshot(snapshot);
@@ -97,7 +95,6 @@ namespace Dino.Ui {
float line_width = (float) LINE_WIDTH;
snapshot.translate({get_width() / 2, get_height() / 2});
-#if GTK_4_14
var fg_color = get_color();
get_style_context().lookup_color("accent_color", out fg_color);
var builder = new Gsk.PathBuilder();
@@ -107,16 +104,6 @@ namespace Dino.Ui {
stroke.set_line_cap(Gsk.LineCap.ROUND);
var arc_path = create_progress_arc(circle_path, (float) progress_animation.value);
snapshot.append_stroke(arc_path, stroke, fg_color);
-#else
- var fg_color = get_style_context().get_color();
- get_style_context().lookup_color("accent_color", out fg_color);
- var context = snapshot.append_cairo({{-radius, -radius}, {radius*2, radius*2}});
- context.set_line_cap(Cairo.LineCap.ROUND);
- context.set_line_width(line_width);
- context.set_source_rgba(fg_color.red, fg_color.green, fg_color.blue, fg_color.alpha);
- context.arc(0, 0, radius - line_width / 2, -0.5 * Math.PI, (progress_animation.value - 0.25) * 2 * Math.PI);
- context.stroke();
-#endif
}
}
diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala
index e9035be0..a126a196 100644
--- a/main/src/ui/util/helper.vala
+++ b/main/src/ui/util/helper.vala
@@ -415,18 +415,7 @@ public bool use_tooltips() {
}
public static void menu_button_set_icon_with_size(MenuButton menu_button, string icon_name, int pixel_size) {
-#if GTK_4_6 && VALA_0_52
menu_button.set_child(new Image.from_icon_name(icon_name) { pixel_size=pixel_size });
-#else
- menu_button.set_icon_name(icon_name);
- var button = menu_button.get_first_child() as Button;
- if (button == null) return;
- var box = button.child as Box;
- if (box == null) return;
- var image = box.get_first_child() as Image;
- if (image == null) return;
- image.pixel_size = pixel_size;
-#endif
}
}
diff --git a/main/src/ui/widgets/avatar_picture.vala b/main/src/ui/widgets/avatar_picture.vala
index 155c9440..12c635aa 100644
--- a/main/src/ui/widgets/avatar_picture.vala
+++ b/main/src/ui/widgets/avatar_picture.vala
@@ -455,11 +455,7 @@ public class Dino.Ui.AvatarPicture : Gtk.Widget {
label.insert_after(this, null);
label.attributes = new Pango.AttrList();
label.attributes.insert(Pango.attr_foreground_new(uint16.MAX, uint16.MAX, uint16.MAX));
-#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58)
picture.content_fit = Gtk.ContentFit.COVER;
-#elif GTK_4_8
- picture.@set("content-fit", 2);
-#endif
picture.insert_after(this, label);
this.notify["model"].connect(on_model_changed);
check_widget_leak(this);
diff --git a/main/src/ui/widgets/fixed_ratio_picture.vala b/main/src/ui/widgets/fixed_ratio_picture.vala
index 6b04ea61..1898efa7 100644
--- a/main/src/ui/widgets/fixed_ratio_picture.vala
+++ b/main/src/ui/widgets/fixed_ratio_picture.vala
@@ -8,9 +8,7 @@ class Dino.Ui.FixedRatioPicture : Gtk.Widget {
public int max_height { get; set; default = int.MAX; }
public File file { get { return inner.file; } set { inner.file = value; } }
public Gdk.Paintable paintable { get { return inner.paintable; } set { inner.paintable = value; } }
-#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58)
public Gtk.ContentFit content_fit { get { return inner.content_fit; } set { inner.content_fit = value; } }
-#endif
private Gtk.Picture inner = new Gtk.Picture();
construct {
diff --git a/main/src/windows/conversation_details.vala b/main/src/windows/conversation_details.vala
index e1f3061f..8ec3125b 100644
--- a/main/src/windows/conversation_details.vala
+++ b/main/src/windows/conversation_details.vala
@@ -160,11 +160,7 @@ namespace Dino.Ui.ConversationDetails {
}
private void create_members() {
-#if GTK_4_8 && (VALA_0_56_GREATER_5 || VALA_0_58)
if (model.members_sorted.n_items == 0) return;
-#else
- if (model.members_sorted.model.get_n_items() == 0) return;
-#endif
var selection_model = new NoSelection(model.members_sorted);
var item_factory = new BuilderListItemFactory.from_resource(null, "/im/dino/Dino/muc_member_list_row.ui");
diff --git a/meson.build b/meson.build
index ad0f7e4e..7752f7d0 100644
--- a/meson.build
+++ b/meson.build
@@ -17,6 +17,12 @@ gnome = import('gnome')
i18n = import('i18n')
cc = meson.get_compiler('c')
+vala_version_required = '0.56.14'
+vala = meson.get_compiler('vala')
+if not vala.version().version_compare('>= @0@'.format(vala_version_required))
+ error('valac >= @0@ required!'.format(vala_version_required))
+endif
+
# Trigger recomnfiguration on version change
version_stamp = configure_file(
command: [
@@ -74,23 +80,23 @@ endif
dep_gdk_pixbuf = dependency('gdk-pixbuf-2.0')
dep_gee = dependency('gee-0.8')
dep_gio = dependency('gio-2.0')
-dep_glib = dependency('glib-2.0')
+dep_glib = dependency('glib-2.0', version: '>=2.66')
dep_gmodule = dependency('gmodule-2.0')
dep_gpgme = dependency('gpgme', disabler: true, required: get_option('plugin-openpgp'))
-dep_gstreamer = dependency('gstreamer-1.0', disabler: true, required: get_option('plugin-rtp'))
-dep_gstreamer_app = dependency('gstreamer-app-1.0', disabler: true, required: get_option('plugin-rtp'))
-dep_gstreamer_audio = dependency('gstreamer-audio-1.0', disabler: true, required: get_option('plugin-rtp'))
-dep_gstreamer_rtp = dependency('gstreamer-rtp-1.0', disabler: true, required: get_option('plugin-rtp'))
-dep_gstreamer_video = dependency('gstreamer-video-1.0', disabler: true, required: get_option('plugin-rtp'))
-dep_gtk4 = dependency('gtk4')
+dep_gstreamer = dependency('gstreamer-1.0', version: '>=1.20')
+dep_gstreamer_app = dependency('gstreamer-app-1.0', version: '>=1.20')
+dep_gstreamer_audio = dependency('gstreamer-audio-1.0', version: '>=1.20')
+dep_gstreamer_rtp = dependency('gstreamer-rtp-1.0', version: '>=1.20')
+dep_gstreamer_video = dependency('gstreamer-video-1.0', version: '>=1.20')
+dep_gtk4 = dependency('gtk4', version: '>=4.14')
dep_icu_uc = dependency('icu-uc')
dep_libadwaita = dependency('libadwaita-1', version: '>=1.5')
dep_libcanberra = dependency('libcanberra', disabler: true, required: get_option('plugin-notification-sound'))
dep_libqrencode = dependency('libqrencode', disabler: true, required: get_option('plugin-omemo'))
-dep_libsrtp2 = dependency('libsrtp2', disabler: true, required: true)
+dep_libsrtp2 = dependency('libsrtp2')
dep_libomemo_c = dependency('libomemo-c', disabler: true, required: get_option('plugin-omemo'))
dep_libsoup = dependency('libsoup-3.0')
-dep_nice = dependency('nice', version: '>=0.1.15', disabler: true, required: get_option('plugin-ice'))
+dep_nice = dependency('nice', version: '>=0.1.15')
dep_m = meson.get_compiler('c').find_library('m', required: false)
dep_sqlite3 = dependency('sqlite3', version: '>=3.24')
@@ -99,10 +105,7 @@ if not dep_webrtc_audio_processing.found()
dep_webrtc_audio_processing = dependency('webrtc-audio-processing', version: ['>=0.2'], required: false)
endif
if not dep_webrtc_audio_processing.found()
- dep_webrtc_audio_processing = dependency('webrtc-audio-processing-2', required: false)
-endif
-if not dep_webrtc_audio_processing.found()
- dep_webrtc_audio_processing = disabler()
+ dep_webrtc_audio_processing = dependency('webrtc-audio-processing-2', required: false, disabler: true)
endif
default_install_rpath = ''
diff --git a/plugins/omemo/src/ui/encryption_preferences_entry.vala b/plugins/omemo/src/ui/encryption_preferences_entry.vala
index cea856bb..cb14978b 100644
--- a/plugins/omemo/src/ui/encryption_preferences_entry.vala
+++ b/plugins/omemo/src/ui/encryption_preferences_entry.vala
@@ -166,12 +166,7 @@ public class OmemoPreferencesWidget : Adw.PreferencesGroup {
// Create and set QR code popover
int sid = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id)[plugin.db.identity.device_id];
var iri_query = @"omemo-sid-$(sid)=$(fingerprint)";
-#if GLIB_2_66 && VALA_0_50
string iri = GLib.Uri.join(UriFlags.NONE, "xmpp", null, null, 0, jid.to_string(), iri_query, null);
-#else
- var iri_path_seg = escape_for_iri_path_segment(jid.to_string());
- var iri = @"xmpp:$(iri_path_seg)?$(iri_query)";
-#endif
const int QUIET_ZONE_MODULES = 4; // MUST be at least 4
const int MODULE_SIZE_PX = 4; // arbitrary
diff --git a/plugins/openpgp/meson.build b/plugins/openpgp/meson.build
index 56bc9d0c..78641012 100644
--- a/plugins/openpgp/meson.build
+++ b/plugins/openpgp/meson.build
@@ -38,9 +38,6 @@ c_args = vala_c_args + [
vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi',
]
-if dep_libadwaita.version() == 'unknown' or dep_libadwaita.version().version_compare('>=1.4')
- vala_args += ['-D', 'Adw_1_4']
-endif
lib_openpgp = shared_library('openpgp', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, install: true, install_dir: get_option('libdir') / get_option('plugindir'), install_rpath: default_install_rpath)
dep_openpgp = declare_dependency(link_with: lib_openpgp, include_directories: include_directories('.'))
summary('End-to-end encryption using PGP (openpgp)', dep_openpgp.found(), bool_yn: true, section: 'Plugins')
diff --git a/plugins/rtp/meson.build b/plugins/rtp/meson.build
index 2772ad88..f10fbc25 100644
--- a/plugins/rtp/meson.build
+++ b/plugins/rtp/meson.build
@@ -52,15 +52,6 @@ if dep_webrtc_audio_processing.found() and get_option('plugin-rtp-webrtc-audio-p
elif get_option('plugin-rtp-webrtc-audio-processing').enabled()
error('No compatible webrtc-audio-processing found, but plugin-rtp-webrtc-audio-processing option set.')
endif
-if dep_gstreamer_rtp.version() == 'unknown' or dep_gstreamer_rtp.version().version_compare('>=1.16')
- vala_args += ['-D', 'GST_1_16']
-endif
-if dep_gstreamer_rtp.version() == 'unknown' or dep_gstreamer_rtp.version().version_compare('>=1.18')
- vala_args += ['-D', 'GST_1_18']
-endif
-if dep_gstreamer_rtp.version() == 'unknown' or dep_gstreamer_rtp.version().version_compare('>=1.20')
- vala_args += ['-D', 'GST_1_20']
-endif
if meson.get_compiler('vala').version().version_compare('<0.56.1')
vala_args += ['--vapidir', meson.current_source_dir() / 'vapi']
endif
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);
diff --git a/xmpp-vala/meson.build b/xmpp-vala/meson.build
index 971f77fa..210526a5 100644
--- a/xmpp-vala/meson.build
+++ b/xmpp-vala/meson.build
@@ -147,9 +147,6 @@ c_args = vala_c_args + [
vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi',
]
-if meson.get_compiler('vala').version().version_compare('=0.56.11')
- vala_args += ['-D', 'VALA_0_56_11']
-endif
lib_xmpp_vala = library('xmpp-vala', sources, c_args: c_args, vala_args: vala_args, dependencies: dependencies, version: '0.1', install: true, install_dir: [true, true, true], install_rpath: default_install_rpath)
dep_xmpp_vala = declare_dependency(link_with: lib_xmpp_vala, include_directories: include_directories('.'))
diff --git a/xmpp-vala/src/core/direct_tls_xmpp_stream.vala b/xmpp-vala/src/core/direct_tls_xmpp_stream.vala
index 2f159ab6..55488eb5 100644
--- a/xmpp-vala/src/core/direct_tls_xmpp_stream.vala
+++ b/xmpp-vala/src/core/direct_tls_xmpp_stream.vala
@@ -19,9 +19,7 @@ public class Xmpp.DirectTlsXmppStream : TlsXmppStream {
debug("Connecting to %s:%i (tls)", host, port);
IOStream? io_stream = yield client.connect_to_host_async(host, port, cancellable);
TlsConnection tls_connection = TlsClientConnection.new(io_stream, new NetworkAddress(remote_name.to_string(), port));
-#if GLIB_2_60
tls_connection.set_advertised_protocols(ADVERTISED_PROTOCOLS);
-#endif
tls_connection.accept_certificate.connect(on_invalid_certificate);
tls_connection.accept_certificate.connect((cert, flags) => on_invalid_cert.func(cert, flags));
reset_stream(tls_connection);
diff --git a/xmpp-vala/src/core/module_flag.vala b/xmpp-vala/src/core/module_flag.vala
index 76ae4dc1..95547852 100644
--- a/xmpp-vala/src/core/module_flag.vala
+++ b/xmpp-vala/src/core/module_flag.vala
@@ -10,12 +10,7 @@ namespace Xmpp {
}
public T? cast(XmppStreamFlag flag) {
-#if VALA_0_56_11
- // We can't typecheck due to compiler bug
- return (T) module;
-#else
return flag.get_type().is_a(typeof(T)) ? (T?) flag : null;
-#endif
}
public bool matches(XmppStreamFlag module) {
@@ -39,12 +34,7 @@ namespace Xmpp {
}
public T? cast(XmppStreamModule module) {
-#if VALA_0_56_11
- // We can't typecheck due to compiler bug
- return (T) module;
-#else
return module.get_type().is_a(typeof(T)) ? (T?) module : null;
-#endif
}
public bool matches(XmppStreamModule module) {