After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761117 - videodecoder: Handle multi-resolution videos (pool caps != caps in caps event)
videodecoder: Handle multi-resolution videos (pool caps != caps in caps event)
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-26 07:14 UTC by sreerenj
Modified: 2016-03-24 16:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description sreerenj 2016-01-26 07:14:47 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,,??
Comment 1 Sebastian Dröge (slomo) 2016-01-26 07:51:13 UTC
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 :)
Comment 2 sreerenj 2016-01-26 10:30:50 UTC
(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...
Comment 3 sreerenj 2016-01-26 12:28:26 UTC
(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....
Comment 4 Nicolas Dufresne (ndufresne) 2016-01-26 15:42:19 UTC
I ported mpeg2dec to use VideoAlignment last year.
Comment 5 Nicolas Dufresne (ndufresne) 2016-01-26 15:45:48 UTC
(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)