[vlc-commits] omxil: Split omx core management to a separate file

Martin Storsjö git at videolan.org
Mon Mar 18 17:41:14 CET 2013


vlc | branch: master | Martin Storsjö <martin at martin.st> | Mon Mar 11 16:51:41 2013 +0200| [369a7322f8f64e84532667a5686cf5e36f3eee20] | committer: Martin Storsjö

omxil: Split omx core management to a separate file

The point of the omx core management is to try to load and init the
OMX core once, even if there's multiple e.g. decoder instances. The
reason for this is that there are OMX cores where the deinit function
will deinitialize the whole core on the first deinit call, even if
init has been called twice.

If this file is to be built as part of multiple separate shared
plugins, each of the plugins will initialize the OMX core separately,
which could cause issues with such OMX cores.

Since the second plugin that uses the OMX core, an OMX vout plugin,
isn't used automatically, and the only OMX implementation it currently
is tested to actually work with (the Broadcom OMX core on Raspberry
Pi) doesn't have issues with being uninitialized multiple times,
there's no need to jump through hoops to fix this theoretical issue
right now though.

For reference, if we really want to make sure the omx core is loaded
and initialized only once, the plugins need to be loaded with
RTLD_GLOBAL and all the variables in omxil_core.c need to be marked
with __attribute__ ((visibility ("default"))). But that's generally
not an option, and shouldn't be necessary right now at least.

Signed-off-by: Martin Storsjö <martin at martin.st>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=369a7322f8f64e84532667a5686cf5e36f3eee20
---

 modules/codec/Modules.am         |    2 +-
 modules/codec/omxil/omxil.c      |  172 ++-----------------------------
 modules/codec/omxil/omxil.h      |    7 +-
 modules/codec/omxil/omxil_core.c |  210 ++++++++++++++++++++++++++++++++++++++
 modules/codec/omxil/omxil_core.h |   42 ++++++++
 5 files changed, 263 insertions(+), 170 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=369a7322f8f64e84532667a5686cf5e36f3eee20


More information about the vlc-commits mailing list