Commit 286fa11d authored by Thomas Guillem's avatar Thomas Guillem

mediacodec: add NDK module

The JNI module is now a submodule.
parent cae9e8d8
......@@ -398,7 +398,7 @@ libiomx_plugin_la_LIBADD = $(libomxil_plugin_la_LIBADD)
libmediacodec_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/codec/omxil
libmediacodec_plugin_la_SOURCES = codec/omxil/mediacodec.c codec/omxil/mediacodec.h \
codec/omxil/mediacodec_jni.c codec/omxil/utils.c \
codec/omxil/mediacodec_jni.c codec/omxil/mediacodec_ndk.c codec/omxil/utils.c \
video_chroma/copy.c codec/omxil/android_opaque.c codec/omxil/android_opaque.h \
packetizer/h264_nal.c packetizer/h264_nal.h
packetizer/hevc_nal.c packetizer/hevc_nal.h
......
......@@ -173,6 +173,7 @@ struct decoder_sys_t
* Local prototypes
*****************************************************************************/
static int OpenDecoderJni(vlc_object_t *);
static int OpenDecoderNdk(vlc_object_t *);
static void CloseDecoder(vlc_object_t *);
static picture_t *DecodeVideo(decoder_t *, block_t **);
......@@ -197,6 +198,10 @@ vlc_module_begin ()
set_capability( "decoder", 0 ) /* Only enabled via commandline arguments */
add_bool(CFG_PREFIX "dr", true,
DIRECTRENDERING_TEXT, DIRECTRENDERING_LONGTEXT, true)
set_callbacks( OpenDecoderNdk, CloseDecoder )
add_shortcut( "mediacodec_ndk" )
add_submodule ()
set_capability( "decoder", 0 )
set_callbacks( OpenDecoderJni, CloseDecoder )
add_shortcut( "mediacodec_jni" )
vlc_module_end ()
......@@ -542,6 +547,11 @@ static int OpenDecoder(vlc_object_t *p_this, pf_MediaCodecApi_init pf_init)
return StartMediaCodec(p_dec);
}
static int OpenDecoderNdk(vlc_object_t *p_this)
{
return OpenDecoder(p_this, MediaCodecNdk_Init);
}
static int OpenDecoderJni(vlc_object_t *p_this)
{
return OpenDecoder(p_this, MediaCodecJni_Init);
......
......@@ -30,6 +30,7 @@ typedef struct mc_api_out mc_api_out;
typedef int (*pf_MediaCodecApi_init)(mc_api*);
int MediaCodecJni_Init(mc_api*);
int MediaCodecNdk_Init(mc_api*);
struct mc_api_out
{
......
This diff is collapsed.
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