diff options
author | Marvin W <git@larma.de> | 2023-04-21 17:38:15 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2023-04-22 17:04:28 +0200 |
commit | dbb8abc1178720020ca872361e23b2e941b874f4 (patch) | |
tree | 7936a8fc9d59c866d20c53ddb21967224c14e645 /plugins/rtp/src/video_widget.vala | |
parent | cad066628a9dc53d18288478ee74f5b3be28c7ee (diff) | |
download | dino-dbb8abc1178720020ca872361e23b2e941b874f4.tar.gz dino-dbb8abc1178720020ca872361e23b2e941b874f4.zip |
Fix video for cameras with rotated image
Diffstat (limited to 'plugins/rtp/src/video_widget.vala')
-rw-r--r-- | plugins/rtp/src/video_widget.vala | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/rtp/src/video_widget.vala b/plugins/rtp/src/video_widget.vala index 0d66476b..20123c68 100644 --- a/plugins/rtp/src/video_widget.vala +++ b/plugins/rtp/src/video_widget.vala @@ -227,9 +227,21 @@ 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"; - prepare.get_static_pad("sink").notify["caps"].connect(input_caps_changed); +#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); |