GNOME Bugzilla – Bug 761117
videodecoder: Handle multi-resolution videos (pool caps != caps in caps event)
Last modified: 2016-03-24 16:31:45 UTC
Is there any way to set the src caps from decoder-subcalss with out negotiating the pool? Unlike other software decoders gstreamer-vaapi is not doing the cropping in decoder, instead we only attach the crop rectangle to the buffers. So The pool size should be the actual un-corpped surface size. Which means we need a way to set cropped dimension in src caps and at the same time we have to keep the pool having un-cropped dimension. I wonder whether it is possible with the current gstvideodecoder implementation,,??
theoradec (or was that removed a while ago?) and mpeg2dec are doing exactly the same. If downstream supports the CROP meta, they don't crop themselves but a) configure the pool for the uncropped resolution and b) put CROP meta on the buffers, and c) have the cropped resolution in the caps. Take a look at that code :)
(In reply to Sebastian Dröge (slomo) from comment #1) > theoradec (or was that removed a while ago?) and mpeg2dec are doing exactly > the same. If downstream supports the CROP meta, they don't crop themselves > but a) configure the pool for the uncropped resolution and b) put CROP meta > on the buffers, and c) have the cropped resolution in the caps. > > Take a look at that code :) Thanks , checking :), mpeg2dec doesn't have cropmeta, but theoradec has...
(In reply to Sebastian Dröge (slomo) from comment #1) > theoradec (or was that removed a while ago?) and mpeg2dec are doing exactly > the same. If downstream supports the CROP meta, they don't crop themselves > but a) configure the pool for the uncropped resolution and b) put CROP meta > on the buffers, and c) have the cropped resolution in the caps. > > Take a look at that code :) Should be enough i guess... but need some rewrites in gstreamer-vaapi.. thanks, closing....
I ported mpeg2dec to use VideoAlignment last year.
(For that you need aligned crop, theora can in theory be encoded with free form crop, even if no one does that, I never seen an h264 crop that wasn't aligned with the sub-sampling)