GNOME Bugzilla – Bug 690639
pngdec: decoded frames are not pushed out
Last modified: 2013-02-12 22:08:41 UTC
pngdec is not producing any output frames if read from file. This pipeline works: gst-launch-1.0 videotestsrc num-buffers=1 ! pngenc ! pngdec ! filesink location=frame.raw This does not work: gst-launch-1.0 videotestsrc num-buffers=1 ! pngenc ! filesink location=img.png gst-launch-1.0 filesrc location=img.png ! pngdec ! filesink location=frame.raw
Does this also fail if you use a large enough blocksize to include the complete file in a single buffer? pngdec requires one png image per buffer.
It does work if the block size is increased to the file size. pngdec is indeed overwriting the current video frame on every incoming "frame".
Ok, that's expected and not a bug then. You must pass exactly one image per buffer to pngdec. For your use case a png parser would be useful.
I don't know if this is expected behaviour, I believe this belongs to the element itself. With the GstVideoDecoder base class it could be in the parse vfunction and/or libpng already does this internally too...
I think a patch for pngdec would be desirable.
Yea, we need a parser... filesrc ! typefind ! pngdec fails.. this is pretty bad
Created attachment 234695 [details] [review] videoparsers: Add png file parser
Created attachment 234696 [details] [review] videoparsers: Add png file parser Little oops in last iteration
Review of attachment 234696 [details] [review]: Looks good after a short look ::: gst/videoparsers/gstpngparse.c @@ +108,3 @@ + goto beach; + + if (startcode != G_GUINT64_CONSTANT (0x89504E470D0A1A0A)) { Maybe use constants for this? @@ +125,3 @@ + goto beach; + + if (startcode == G_GUINT64_CONSTANT (0x89504E470D0A1A0A)) { ...and this
Review of attachment 234696 [details] [review]: ::: gst/videoparsers/gstpngparse.c @@ +33,3 @@ +GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, + GST_PAD_ALWAYS, + GST_STATIC_CAPS ("image/png, width = (int)[1, MAX], height = (int)[1, MAX]") You should add parsed = TRUE
Comment on attachment 234696 [details] [review] videoparsers: Add png file parser Modified per comments and comitted
commit 41afff88e01bf54d6c6386deb3d173a22a1a87e2 Author: Olivier Crête <olivier.crete@collabora.com> Date: Mon Jan 28 22:42:44 2013 -0500 videoparsers: Add png file parser https://bugzilla.gnome.org/show_bug.cgi?id=690639