Raspi 4: omxdec to EGLImage decoding

Gert Glass gst at zevv.nl
Thu Aug 1 07:47:18 UTC 2019


Hi,

I'm trying to port my application from the Raspberry Pi 3 (raspbian
jesse, gst 1.10.4) to the recently introduced Pi 4 (raspbian buster, gst
1.14.4).

The gst-launch equivalent of my apps pipeline is something like this:

  filesrc ... ! h264parse ! omxh264dec ! glupload ! glimagesink

Note that my app explictly needs the decoded frames rendered to EGLImages.

For some reason this stopped working with the new setup, I am not yet
sure if this is related to drivers or changes in gstreamer itself, I now
get the following non-helpful errors:

ERROR                    omx gstomx.c:1154:gst_omx_component_set_parameter:<omxh264dec-omxh264dec0> Set video_decode parameter at index 0x02000001: Bad parameter (0x80001005)
ERROR                    omx gstomx.c:1333:gst_omx_port_update_port_definition:<omxh264dec-omxh264dec0> Updated video_decode port 130 definition: Bad parameter (0x80001005)
WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<omxh264dec-omxh264dec0> Subclass refused caps
ERROR                    omx gstomx.c:1154:gst_omx_component_set_parameter:<omxh264dec-omxh264dec0> Set video_decode parameter at index 0x02000001: Bad parameter (0x80001005)
ERROR                    omx gstomx.c:1333:gst_omx_port_update_port_definition:<omxh264dec-omxh264dec0> Updated video_decode port 130 definition: Bad parameter (0x80001005)
WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<omxh264dec-omxh264dec0> Subclass refused caps
ERROR                    omx gstomx.c:1154:gst_omx_component_set_parameter:<omxh264dec-omxh264dec0> Set video_decode parameter at index 0x02000001: Bad parameter (0x80001005)
ERROR                    omx gstomx.c:1333:gst_omx_port_update_port_definition:<omxh264dec-omxh264dec0> Updated video_decode port 130 definition: Bad parameter (0x80001005)
WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<omxh264dec-omxh264dec0> Subclass refused caps
ERROR                    omx gstomx.c:1154:gst_omx_component_set_parameter:<omxh264dec-omxh264dec0> Set video_decode parameter at index 0x02000001: Bad parameter (0x80001005)
ERROR                    omx gstomx.c:1333:gst_omx_port_update_port_definition:<omxh264dec-omxh264dec0> Updated video_decode port 130 definition: Bad parameter (0x80001005)
WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<omxh264dec-omxh264dec0> Subclass refused caps
WARN               baseparse gstbaseparse.c:3611:gst_base_parse_loop:<h264parse0> error: Internal data stream error.
WARN               baseparse gstbaseparse.c:3611:gst_base_parse_loop:<h264parse0> error: streaming stopped, reason not-negotiated (-4)

I have found that the v4l2h264dec seems to be able to create a similar
pipeline, the following now works:
  
  filesrc ... ! h264parse ! v4l2h264dec ! glupload ! glimagesink

My remaining problem is that the v4l2h264dec/glupload pair do not use EGLImages from the 
GstGLMemoryEGLAllocator, but instead uses the GstGLMemoryAllocator - I assume these are
GL textures instead of EGLImages.

I noticed gstupload.c has significatly changed from 1.10 to 1.14, but there still seems to be
a path available doing GST_GL_HAVE_PLATFORM_EGL.

I would be much obliged if someone could answer my questions:

- Is omxdec still supposed to be functional on the rpi4, and if so, what can be the cause of
  the above erros?

- If omxdec is not the right way to go, should I megrate to v4l2dec, and if so, how do I get it
  to use EGLImage buffers?

Thank you,

Gert




More information about the gstreamer-devel mailing list