Skip to content

vapostproc and videoflip: Use gst_video_orientation_from_tag to parse orientation

Currently vapostproc and videoflip have their own implementations for mapping tag strings to GstVideoOrientationMethod values.

This MR replaces their implementations with gst_video_orientation_from_tag, this means that the tag mappings for GST_VIDEO_ORIENTATION_UR_LL and GST_VIDEO_ORIENTATION_UL_LR are now switched.

It also fixes navigation event handling in vapostproc to use either video-direction property or direction from tags and incorrect scaling.

Tests

Rotation

gst-launch-1.0 filesrc location=Sprite%20Fright%20-%20Open%20Movie%20by%20Blender%20Studio-804p.mp4 ! parsebin ! vah264dec ! taginject tags="image-orientation=flip-rotate-90" ! {video flipper} video-direction=auto ! gtkwaylandsink
gtkwaylandsink glvideoflip vapostproc videoflip
main gtkwaylandsink_pre glvideoflip_pre vapostproc_pre videoflip_pre
this branch gtkwaylandsink_pre glvideoflip_pre vapostproc_post videoflip_post

Navigation events

gst-launch-1.0 filesrc location=/home/ckinloch/Downloads/Sprite%20Fright%20-%20Open%20Movie%20by%20Blender%20Studio-804p.mp4 ! parsebin ! vah264dec ! taginject tags="image-orientation=flip-rotate-270" ! videoconvert ! navigationtest name=prenav ! vaapipostproc video-direction=auto ! navigationtest name=midav ! vapostproc video-direction=auto ! navigationtest name=postnav ! videoconvert ! xvimagesink
main this branch
nav_main nav_now
Edited by Colin Kinloch

Merge request reports