JeffyCN / rockchip_mirrors

Mirrors of a few Rockchip BSP repositories, some others in https://github.com/JeffyCN/mirrors.
Other
10 stars 2 forks source link

Add mppjpegdecodebin element #18

Closed julianbouzas closed 1 year ago

julianbouzas commented 1 year ago

The new mppjpegdecodebin is essentially a bin with jpegparse and mppjpegdec elements. This allows atoplugging to work with mppjpegdec as input buffers always need to be parsed for mppjpegdec to work. The following pipeline now works if only mppjpegdec decoder is available:

gst-launch-1.0 filesrc location=image.jpg ! decodebin ! fakesink
JeffyCN commented 1 year ago

we do have a patch in jpegparse to make it available for autoplug: https://github.com/JeffyCN/rockchip_mirrors/blob/buildroot/package/gstreamer1/gst1-plugins-bad/0012-gstjpegparse-Allow-parsebin-to-use-it-for-autopluggi.patch

it's been lowered for a long time in: commit a60d54c4e24f473eedc2acb7b46291b54299e2ed Author: Tim-Philipp Müller tim.muller@collabora.co.uk Date: Sun Feb 7 10:19:06 2010 +0100

jpegparse: lower rank to NONE so it is not autoplugged for decoding

This element is too new and too untested to have it autoplugged.

maybe it's time to ask upstream to bring it back.

julianbouzas commented 1 year ago

I see, thanks for the information. I will close the MR and just increase the rank of jpegparse.

I suppose most of the jpeg decoders have their own way of parsing jpeg buffers, so increasing the rank of jpegparse is a bit risky if one has multiple jpeg decoders installed, which is probably why upstream don't want it to autoplug.