Skip to content
Snippets Groups Projects
Commit eb810de1 authored by David Stevens's avatar David Stevens
Browse files

Bump c2_e2e_test ndk to 28

This bumps c2_e2e_test ndk version to 28, in preparation for using the
async media codec APIs. Due to the dependence on the static gtest
library, this involves a pretty big hack around __dso_handle.

This change also deletes some unnecessary cruft in the mk files.

Test: compiles
Bug: 146030443

Change-Id: I7b1d94b89101d8ee6376508e803b65efb4bf9775
(cherry picked from commit 81e404720e5083cffa1da53a554cc8e1a6796ccc)
parent 542a4c0d
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,6 @@ LOCAL_PACKAGE_NAME := C2E2ETest
LOCAL_JNI_SHARED_LIBRARIES := libcodectest
LOCAL_MODULE_TAGS := tests
LOCAL_CXX_STL := libc++_static
include $(BUILD_PACKAGE)
include $(call all-makefiles-under,$(LOCAL_PATH))
......@@ -8,8 +8,6 @@ include $(CLEAR_VARS)
LOCAL_C_INCLUDES := \
system/core/include \
LOCAL_MULTILIB := both
LOCAL_SRC_FILES := \
video_decoder_e2e_test.cpp \
e2e_test_jni.cpp \
......@@ -28,10 +26,10 @@ LOCAL_SHARED_LIBRARIES := \
libmediandk \
libandroid \
LOCAL_SDK_VERSION := 21
LOCAL_SDK_VERSION := 28
LOCAL_NDK_STL_VARIANT := c++_static
LOCAL_STATIC_LIBRARIES := libgtest_ndk_c++ libgtest_main_ndk_c++
LOCAL_STATIC_LIBRARIES := libgtest_ndk_c++
LOCAL_MODULE := libcodectest
......
......@@ -106,4 +106,11 @@ JNIEXPORT void JNICALL Java_org_chromium_c2_test_E2eTestActivity_stopDecoderLoop
UNUSED(thiz);
reinterpret_cast<android::MediaCodecDecoder*>(decoderPtr)->StopLooping();
}
// Gtest only provides a static library, but the build system doesn't like including
// that in a shared library. In particular, __dso_handle is not exposed for shared
// libraries, but static libraries expect to find it. Manually providing the symbol
// can cause some problems with global destructors, but that doesn't currently cause
// problems for us. This approach should *not* be copied to other places.
void* __dso_handle;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment