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 313040 - jpegdec doesn't provide full caps
jpegdec doesn't provide full caps
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-09 23:09 UTC by Michael Dominic K.
Modified: 2005-08-29 15:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Dominic K. 2005-08-09 23:09:15 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
Comment 1 Tim-Philipp Müller 2005-08-10 11:17:00 UTC
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
Comment 2 Michael Dominic K. 2005-08-10 13:10:20 UTC
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? 
Comment 3 Tim-Philipp Müller 2005-08-12 16:31:16 UTC
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
Comment 4 Michael Dominic K. 2005-08-13 22:19:25 UTC
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
Comment 5 Tim-Philipp Müller 2005-08-14 06:48:38 UTC
Thanks for confirming this :)

Cheers
 -Tim