[Bug 785114] New: omx: add support for backward compatibility

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jul 19 10:13:39 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=785114

            Bug ID: 785114
           Summary: omx: add support for backward compatibility
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-omx
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: julien.isorce at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

For example we might want to compile gst-omx with omx-il-1.2.0 headers but
still be able to load Bellagio components which are 1.1.2

But currently in gst-omx/omx/gstomx.h there is:

#define GST_OMX_INIT_STRUCT(st) G_STMT_START { \
  memset ((st), 0, sizeof (*(st))); \
  (st)->nSize = sizeof (*(st)); \
  (st)->nVersion.s.nVersionMajor = OMX_VERSION_MAJOR; \
  (st)->nVersion.s.nVersionMinor = OMX_VERSION_MINOR; \
  (st)->nVersion.s.nRevision = OMX_VERSION_REVISION; \
  (st)->nVersion.s.nStep = OMX_VERSION_STEP; \
} G_STMT_END

which prevents the use the same libgstomx.so binary to load OpenMAX components
with different versions. For example Bellagio returns OMX_ErrorVersionMismatch
if nVersionMajor and nVersionMinor are not set to exactly 1 and 1

One solution is to call OMX_GetComponentVersion(&gstomxcomp->nVersion) when
loading a component, and change GST_OMX_INIT_STRUCT to:

#define GST_OMX_INIT_STRUCT(st,comp) G_STMT_START { \
  memset ((st), 0, sizeof (*(st))); \
  (st)->nSize = sizeof (*(st)) + sizeof(OMX_STRING); \
  (st)->nVersion = comp->nVersion; \
} G_STMT_END

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list