Commit ae06cb91 authored by Martin Storsjö's avatar Martin Storsjö

Enable iomx direct rendering if "full acceleration" is chosen

The "auto" option doesn't enable any acceleration at all until
4.3, so this is quite safe - only people who intentionally enable
it will get it. (And for older vlc.git versions, such as the
vlc-2.2 branch, it won't have any effect.)
Signed-off-by: Martin Storsjö's avatarMartin Storsjö <martin@martin.st>
parent 7d491229
......@@ -54,6 +54,9 @@ endif
ifeq ($(ARCH), armeabi-v7a)
LOCAL_CFLAGS += -DHAVE_ARMEABI_V7A
endif
ifneq (,$(wildcard $(LOCAL_PATH)/../$(VLC_SRC_DIR)/modules/codec/omxil/iomx_hwbuffer.c))
LOCAL_CFLAGS += -DHAVE_IOMX_DR
endif
LOCAL_LDLIBS := -L$(VLC_CONTRIB)/lib \
$(VLC_MODULES) \
$(VLC_BUILD_DIR)/lib/.libs/libvlc.a \
......
......@@ -50,6 +50,12 @@
#define LOG_TAG "VLC/JNI/main"
#include "log.h"
#ifdef HAVE_IOMX_DR
#define NO_IOMX_DR "--no-omxil-dr"
#else
#define NO_IOMX_DR ""
#endif
libvlc_media_t *new_media(jlong instance, JNIEnv *env, jobject thiz, jstring fileLocation, bool noOmx, bool noVideo)
{
libvlc_instance_t *libvlc = (libvlc_instance_t*)(intptr_t)instance;
......@@ -293,6 +299,7 @@ void Java_org_videolan_libvlc_LibVLC_nativeInit(JNIEnv *env, jobject thiz)
"--androidsurface-chroma", chromastr != NULL && chromastr[0] != 0 ? chromastr : "RV32",
/* XXX: we can't recover from direct rendering failure */
(hardwareAcceleration == HW_ACCELERATION_FULL) ? "" : "--no-mediacodec-dr",
(hardwareAcceleration == HW_ACCELERATION_FULL) ? "" : NO_IOMX_DR,
};
libvlc_instance_t *instance = libvlc_new(sizeof(argv) / sizeof(*argv), argv);
......
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