]> git.sesse.net Git - vlc/commit
omxil: Split omx core management to a separate file
authorMartin Storsjö <martin@martin.st>
Mon, 11 Mar 2013 14:51:41 +0000 (16:51 +0200)
committerMartin Storsjö <martin@martin.st>
Mon, 18 Mar 2013 16:14:51 +0000 (18:14 +0200)
commit369a7322f8f64e84532667a5686cf5e36f3eee20
treed63ef1c93c86eb6231b04c7f9c972e328ac16574
parentd5dd32552f9c675eb943720a2b48b2778f26f3ef
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@martin.st>
modules/codec/Modules.am
modules/codec/omxil/omxil.c
modules/codec/omxil/omxil.h
modules/codec/omxil/omxil_core.c [new file with mode: 0644]
modules/codec/omxil/omxil_core.h [new file with mode: 0644]