GNOME Bugzilla – Bug 313040
jpegdec doesn't provide full caps
Last modified: 2005-08-29 15:43:03 UTC
Distribution/Version: archlinux 1. Take an AVI MJPEG file 2. Setup a pipeline to decode the AVI using jpegdec element (ie using decodebin) 3. Change the pipeline state to GST_STATE_PAUSED to preroll it 4. Take a look at the caps of the jpegdec src pad. It'll look something like: video/x-raw-yuv, format=(fourcc)I420, width=(int)[ 16, 4096 ], height=(int)[ 16, 4096 ], framerate=(double)[ 0, 1.7976931348623157e+308 ] Note, that the information about width, height and fps is not filled properly. On the contrary -- using ffdec_mjpeg for the same task will fill up the caps just right. State of: Wed, 10 Aug 2005 01:15:50 +0200
Are you using gst_pad_get_negotiated_caps()? If not, please try that. I don't think this is a bug. ffdec_mjpeg probably just uses gst_pad_use_fixed_caps() and gst_pad_set_caps(), which jpegdec could do as well, but doesn't have to. The caps jpegdec attaches to buffers are always fixed as far as I can tell. Cheers -Tim
gst_pad_get_negotiated_caps() returns NULL since at this point caps are not negotiated. I believe that caps attached to buffers are ok, since the whole things works. But the point is that one would like to check the video resolution (ie) before actually streaming any buffers. Video resolution/framerate isn't something that's really negotiable, is it?
When the pipeline is in PAUSED state, the pad should most definitively be negotiated and gst_pad_get_negotiated_caps() should return non-NULL caps. Actually works for me as well (using up to date CVS HEAD). It's right that for mjpeg films, video resolution and framerate aren't really negotiable,but I'd like jpegdec to handle input in form of multiple consecutive still .jpg images as well, and those might have different dimensions. I still suspect this is a bug in your code somewhere. Can you attach some code? Cheers -Tim
You're right, it's a bug in my code. But I got fooled by a different bug (?) I just filled: http://bugzilla.gnome.org/show_bug.cgi?id=313424
Thanks for confirming this :) Cheers -Tim