/gst-omx

OpenMAX IL wrapper plugin for GStreamer that uses Android hardware codecs through libhybris

GStreamer OpenMAX IL wrapper plugin

This plugin wraps available OpenMAX IL components and makes them available as standard GStreamer elements. This build patches the upstream version with Sailfish OS changes to support libhybris adaptations, including support for Android native buffers, metadata in buffers, and I420 colour conversion.

The gstomx.conf file is not generated by the hybris build, as it is device-specific. It must be manually created using the hardware codecs given in /system/etc/media_codecs.xml in the Android BSP for each devices. This file is similar to the rpi file that can be found in the config/rpi directory of the gst-omx submodule, but with some changes. Here is an example entry:

[omxh264dec]
type-name=GstOMXH264Dec
core-name=/system/lib/libmm-omxcore.so
component-name=OMX.qcom.video.decoder.avc
rank=257
in-port-index=0
out-port-index=1
hacks=hybris;no-disable-outport;implicit-format-change;i420-color-conversion

'type-name' should be the name of the relevant class to use from the upstream/omx dir. 'core-name' needs to give the path of the OMX library in your Android system directory. 'component-name' comes from the Android media_codecs.xml.

Hacks added for Sailfish:

  • hybris - needed to call Android OMX libraries
  • implicit-format-change - needed for h264/avc decoding.
  • i420-color-conversion - uses the faster libI420colorconvert.so for video decoding on devices that have that blob present.

Note the port indices and the hacks. component-name should point to your omx lib in /system. Components that use the I420 colour conversion should have the 'i420-color-conversion' hack added.

Known issues:

  • i420-color-conversion segfaults somewhere under hybris. It's not essential though, so just leave it out for now.
  • Android native buffers aren't being used with the gst-droid EGL sink, as it's no longer compatible.