[vlc-devel] [PATCH] provide the display format from the demuxer to the vout to respect cropping

Steve Lhomme robux4 at videolabs.io
Mon Mar 9 18:26:17 CET 2015


On Mon, Mar 9, 2015 at 5:27 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le lundi 09 mars 2015, 16:51:29 Steve Lhomme a écrit :
>> Fixes #13982
>>
>> The cropping is added to the user defined cropping from the GUI so that
>> parts of the video that should not be displayed are never displayed
>
> I explained why this makes no sense several times. I am not going to waste
> time doing it again.

And I explained each time why there is information missing at the vout
level. I even explained in this thread which you may have missed.

" The reason not to do this in the decoder instead of the vout is that
the vout is hackish and sets up the texture and things like that
before applying the dimensions. We need to keep the original
dimensions at that stage.

See the comment here:
http://git.videolan.org/?p=vlc.git;a=blob;f=include/vlc_vout_display.h;h=a95f98de3819fe42326a3f1947fd946fc8aab465;hb=HEAD#l256

"video source format.

Cropping is not requested while in the open function.
You cannot change it."

For other hackish reasons I could not set osys->source to the actual
size I wanted, it messes up the renderer which then overrides that
value with what is was initialized with.

See http://git.videolan.org/?p=vlc.git;a=blob;f=src/video_output/display.c;h=3e3a3d5c7a599fcc30c04f0b73a9d3c86e81d388;hb=HEAD#l1089
"

> This is obviously rejected.

You proposed no working solution nor anything close to a useful hint.
The code I saw often contradicted stuff you told me on IRC or here. If
you think this is the wrong way of doing it, they show the right way
of doing it. Adding a fix/hack for avcodec is not something I consider
correct. It just adds some inconsistent mess of top of the existing
ones.

Until the internal design is changed so that the "You cannot change
it" comment can be removed (from my tests the comment matches the code
behaviour), I don't see any other way.



More information about the vlc-devel mailing list