clutter-gst-aspectratio does not take pixel aspect ratio into account
The frame aspect ratio calculation in clutter-gst-aspectratio.c is currently as follows:
frame_aspect = (gdouble) frame->resolution.width / (gdouble) frame->resolution.height;
This works fine for the majority of video with square (1:1) pixel aspect ratios, but video with a pixel aspect ratio of 4:3 for example displays squashed. Different pixel aspect ratios are commonly used for anamorphic footage.
For a video file with a resolution of 1920x1080 (16:9) and a pixel aspect ratio of 4:3 instead of the usual 1:1, I would expect the ratio of the displayed video to be 2.37:1 (multiple of 2560x1080).
I'd be happy to write the necessary code to support this, but first some questions:
- Which branch should this merge request be proposed against?
- Should this stretching be done by default for non-square video, as it would have no effect on square pixel footage, or should it be put behind another boolean in clutter-gst-aspectratio and be disabled by default?