Commit 21f3373a authored by Julian Scheel's avatar Julian Scheel Committed by Jean-Baptiste Kempf

mmal/codec: Rename mmal-zerocopy option to mmal-opaque

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: default avatarJulian Scheel <julian@jusst.de>
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3c0019d0
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment