gst_omx_video_enc_set_format: code should not be reached

Sebastian Dröge sebastian at centricular.com
Tue Feb 23 12:29:09 UTC 2016


On Di, 2016-02-23 at 13:06 +0100, Peter Maersk-Moller wrote:
> 
> >  The template caps are supposed to be configured by the gstomx.conf
> > to be exactly what *your hardware* supports.
> As it does not report any formats (and only works for I420), can we
> agree that we have a bug here?

Yes, it should only report all formats that it can theoretically
handle. Not all possible formats someone might ever invent.

> > > gst-launch-1.0 -v videotestsrc is-live=1 ! \
> > > 'video/x-raw,format=I420' ! queue ! omxh264enc ! fakesink
> > 
> Works. RGB, BGR, ARGB, ABGR, RGBA, BGRA does not.
> I believe at least some of them ought to work. Don't you?

https://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomxvideoenc.c#n1018
https://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomxvideoenc.c#n1309

Only I420 and NV12 are supported currently, so all the ones you listed
are not supported and will fail. You'll have to add some code for them
in these two places.

> Apparently there are many ways/methods (and libraries) to interface
> to the BCM2835/BCM2836 hardware encoders, and some of them are
> getting obsolete or left behind maintenance wise. Do you have a link
> to the documentation you used for interfacing to the
> encoders/decoders to make it a little bit easier to find the bug and
> create a patch?

See above for the links to the code. The only relevant documentation
that exists is the OpenMAX IL spec:
https://www.khronos.org/registry/omxil/

And there's this for the RPi, not sure if there's anything official
somewhere:
http://home.nouwen.name/RaspberryPi/documentation/ilcomponents/video_encode.html

The latter says that the RPi only accepts I420 on its video_encode
component. You can probably tunnel a image_fx or resize component in
front of the encoder to support more formats.

> Currently I'm using MMAL writing a modified version of RaspVidYUV (a
> variant of RaspiVid as used for rpicamsrc) to output various formats
> as a GStreamer shmsink able to interface to GStreamer shmsrc. It
> works fine and will be release for free. Just an example og using
> another library/layer than used the one used for gst-omx package,

Sounds useful indeed, however MMAL is also just a small layer on top
of OpenMAX IL. All you can do with it, can also be done with OpenMAX
IL.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160223/062769a6/attachment.sig>


More information about the gstreamer-devel mailing list