vout: add Fill display fit mode
On Android there's a fit mode where the whole video area is filled with the video, stretching if necessary.
Merge request reports
Activity
changed milestone to %4.0
added Component::Core: Video output label
mentioned in merge request libvlcjni!100
added MRStatus::Reviewable label
added MRStatus::NotCompliant label and removed MRStatus::Reviewable label
added MRStatus::Reviewable label and removed MRStatus::NotCompliant label
The way it's done in Android does allow to tweak the aspect ratio: libvlcjni!100 (ed69d76a)
I can give this a try but that seems hackish compared to a "fitting" mode which in this case really means the video placement should be have no offset and use the whole display width/height. Hijacking a special aspect ratio in the source format so it's placed that way seems odd. This will get even worse when the source video has cropping inside its original format.
It could also be an aspect ratio we change every time the window dimension changes. But that means micro-managing the aspect ratio, setting the value every time a pixel is added/removed and it may not be handled right away since they are handled in different threads.
However it's true that the fitting and aspect-ratio are in contradiction in this case. If a user wants a video to be considered as 16:9 and yet wants to fit it the whole display area, the 16:9 won't be respected (when the display area is not 16:9).
Not sure what a special value could be. For now the integer values are unsigned in the string. And 0:0 means the display aspect ratio is not forced.
As expected, it seems hackish. For this to work, that means all display modules must use
vd->source
to place the video inside the display area. That's where the final aspect ratio will be passed to the display module, which will compensate for the window size.Looking at all the display modules, some don't call
vout_display_PlacePicture()
withvd->source
but with a custom format. d3d11 in particular only uses it on startup but not later. I should fix that. But that means we need a pass onvout_display_PlacePicture()
to make sure they all handle aspect ratio changes in the source properly.This is also a problem when the filling mode is set in the
vout_display_placement
because some modules like MMAL force the fitting mode (probably wrong).
added MRStatus::InReview label and removed MRStatus::Reviewable label
mentioned in merge request !6042
Closing in favor of !6042