[vlc-commits] omxil: Set the module priority to 0 for iomx

Martin Storsjö git at videolan.org
Wed Jan 25 17:48:12 CET 2012


vlc/vlc-2.0 | branch: master | Martin Storsjö <martin at martin.st> | Wed Jan 25 11:22:17 2012 +0200| [136d91e8ed648c12faf6be18226e88f3696616fb] | committer: Jean-Baptiste Kempf

omxil: Set the module priority to 0 for iomx

The iomx module is only enabled when the user has requested it
(via settings). Currently, when the iomx module has priority 80,
it is always preferred over avcodec.

For other platforms, where one would only enable omxil if one
explicitly wants to use it, this is ok, but for android, we
ship the iomx module but allow users to enable it at runtime
if they want to.

If it isn't enabled, the priorities are currently overridden by
adding "--codec avcodec,all" to the command line, but this makes
avcodec have precedence over other decoder modules that otherwise
would have higher priority (e.g. a52).

By setting the priority to 0 for the iomx version of this
module, we can more easily enable it only when asked for,
by adding "--codec iomx,all", without affecting the relative
priorities of all other codec modules.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit d64ca8acaa6f2bd9db57b4b25446656a30bcba2f)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=136d91e8ed648c12faf6be18226e88f3696616fb
---

 modules/codec/omxil/omxil.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index 3c13a73..ab81196 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -109,7 +109,14 @@ vlc_module_begin ()
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_VCODEC )
     set_section( N_("Decoding") , NULL )
+#if defined(USE_IOMX)
+    /* For IOMX, don't enable it automatically via priorities,
+     * enable it only via the --codec iomx command line parameter when
+     * wanted. */
+    set_capability( "decoder", 0 )
+#else
     set_capability( "decoder", 80 )
+#endif
     set_callbacks( OpenDecoder, CloseGeneric )
 
     add_submodule ()



More information about the vlc-commits mailing list