[vlc-devel] [PATCH 08/14] mmal/codec: Rename mmal-zerocopy option to mmal-opaque

Julian Scheel julian at jusst.de
Wed Jun 3 09:50:33 CEST 2015


The option named mmal-zerocopy until now is used to configure the codec to
generate pictures with MMAL_ENCODING_OPAQUE which in fact is a fake payload
format that just contains handles for pictures allocated on the GPU side.
While this in effect causes a zerocopy mode of pixel data the naming is
potentially misleading because mmal supports another mode called zero_copy. In
this mode the GPU and CPU use shared buffers via the vc_sm kernel module, so
that the buffer data is actually accessible from userspace but no copies are
required when transferring from or to mmal components.

Signed-off-by: Julian Scheel <julian at jusst.de>
---
 modules/hw/mmal/codec.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c
index ae03dec..7f20a17 100644
--- a/modules/hw/mmal/codec.c
+++ b/modules/hw/mmal/codec.c
@@ -46,9 +46,9 @@
 
 #define MIN_NUM_BUFFERS_IN_TRANSIT 2
 
-#define MMAL_ZEROCOPY_NAME "mmal-zerocopy"
-#define MMAL_ZEROCOPY_TEXT N_("Decode frames directly into RPI VideoCore instead of host memory.")
-#define MMAL_ZEROCOPY_LONGTEXT N_("Decode frames directly into RPI VideoCore instead of host memory. This option must only be used with the MMAL video output plugin.")
+#define MMAL_OPAQUE_NAME "mmal-opaque"
+#define MMAL_OPAQUE_TEXT N_("Decode frames directly into RPI VideoCore instead of host memory.")
+#define MMAL_OPAQUE_LONGTEXT N_("Decode frames directly into RPI VideoCore instead of host memory. This option must only be used with the MMAL video output plugin.")
 
 static int OpenDecoder(decoder_t *dec);
 static void CloseDecoder(decoder_t *dec);
@@ -58,7 +58,7 @@ vlc_module_begin()
     set_description(N_("MMAL-based decoder plugin for Raspberry Pi"))
     set_capability("decoder", 90)
     add_shortcut("mmal_decoder")
-    add_bool(MMAL_ZEROCOPY_NAME, true, MMAL_ZEROCOPY_TEXT, MMAL_ZEROCOPY_LONGTEXT, false)
+    add_bool(MMAL_OPAQUE_NAME, true, MMAL_OPAQUE_TEXT, MMAL_OPAQUE_LONGTEXT, false)
     set_callbacks(OpenDecoder, CloseDecoder)
 vlc_module_end()
 
@@ -115,7 +115,7 @@ static int OpenDecoder(decoder_t *dec)
     dec->p_sys = sys;
     dec->b_need_packetized = true;
 
-    sys->opaque = var_InheritBool(dec, MMAL_ZEROCOPY_NAME);
+    sys->opaque = var_InheritBool(dec, MMAL_OPAQUE_NAME);
     bcm_host_init();
 
     status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_DECODER, &sys->component);
-- 
2.4.0





More information about the vlc-devel mailing list