Removing Non-HIDL Widevine DRM Plugin for Android
[ Merge of http://go/wvgerrit/138089 ] Non-hidl code is no longer needed in the widevine android plugin. By doing work this cleanup will save the team from having to keep maintaining code that isn't needed anymore. Clean up steps taken as follows: 1. Remove non-hidl code but keep commonly used code 2. Remove legacy test code 3. Remove legacy test build and test entry Bug: 69573078 Bug: 172285246 Test: unit tests, GtsMediaTestCases, CtsMediaDrmTestCases Change-Id: I75938d69413c631ef6be82da3d885ba173efc581
This commit is contained in:
committed by
Kyle Zhang
parent
2046fc05fa
commit
0b02296014
@@ -1,55 +1,5 @@
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Builds libwvdrmengine_test
|
||||
#
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
legacy_src/WVCreatePluginFactories_test.cpp \
|
||||
legacy_src/WVCryptoFactory_test.cpp \
|
||||
legacy_src/WVDrmFactory_test.cpp \
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
frameworks/av/include \
|
||||
frameworks/native/include \
|
||||
vendor/widevine/libwvdrmengine/include \
|
||||
vendor/widevine/libwvdrmengine/mediadrm/include \
|
||||
vendor/widevine/libwvdrmengine/oemcrypto/include \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libgtest \
|
||||
libgtest_main \
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libcrypto \
|
||||
libdl \
|
||||
liblog \
|
||||
libutils \
|
||||
libwvdrmengine \
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := \
|
||||
libstagefright_headers \
|
||||
libstagefright_foundation_headers \
|
||||
|
||||
LOCAL_MODULE := libwvdrmengine_test
|
||||
LOCAL_LICENSE_KINDS := legacy_by_exception_only
|
||||
LOCAL_LICENSE_CONDITIONS := by_exception_only
|
||||
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
LOCAL_MODULE_OWNER := widevine
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
# When built, explicitly put it in the DATA/nativetest directory.
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
|
||||
|
||||
ifneq ($(TARGET_ENABLE_MEDIADRM_64), true)
|
||||
LOCAL_MODULE_TARGET_ARCH := arm x86 mips
|
||||
endif
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Builds libwvdrmengine_hidl_test
|
||||
#
|
||||
@@ -66,7 +16,6 @@ LOCAL_C_INCLUDES := \
|
||||
vendor/widevine/libwvdrmengine/include_hidl \
|
||||
vendor/widevine/libwvdrmengine/include \
|
||||
vendor/widevine/libwvdrmengine/mediadrm/include_hidl \
|
||||
vendor/widevine/libwvdrmengine/mediadrm/include \
|
||||
vendor/widevine/libwvdrmengine/oemcrypto/include \
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
//
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine License
|
||||
// Agreement.
|
||||
//
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "WVCreatePluginFactories.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace android;
|
||||
|
||||
TEST(CreatePluginFactoriesTest, CreatesDrmFactory) {
|
||||
std::unique_ptr<DrmFactory> factory(createDrmFactory());
|
||||
|
||||
EXPECT_NE((DrmFactory*)NULL, factory.get()) <<
|
||||
"createDrmFactory() returned null";
|
||||
}
|
||||
|
||||
TEST(CreatePluginFactoriesTest, CreatesCryptoFactory) {
|
||||
std::unique_ptr<CryptoFactory> factory(createCryptoFactory());
|
||||
|
||||
EXPECT_NE((CryptoFactory*)NULL, factory.get()) <<
|
||||
"createCryptoFactory() returned null";
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
* source code may only be used and distributed under the Widevine License
|
||||
* Agreement.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "WVCryptoFactory.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
using namespace wvdrm;
|
||||
|
||||
const uint8_t kWidevineUUID[16] = {
|
||||
0xED,0xEF,0x8B,0xA9,0x79,0xD6,0x4A,0xCE,
|
||||
0xA3,0xC8,0x27,0xDC,0xD5,0x1D,0x21,0xED
|
||||
};
|
||||
|
||||
const uint8_t kOldNetflixWidevineUUID[16] = {
|
||||
0x29,0x70,0x1F,0xE4,0x3C,0xC7,0x4A,0x34,
|
||||
0x8C,0x5B,0xAE,0x90,0xC7,0x43,0x9A,0x47
|
||||
};
|
||||
|
||||
const uint8_t kUnknownUUID[16] = {
|
||||
0x6A,0x7F,0xAA,0xB0,0x83,0xC7,0x9E,0x20,
|
||||
0x08,0xBC,0xEF,0x32,0x34,0x1A,0x9A,0x26
|
||||
};
|
||||
|
||||
TEST(WVCryptoFactoryTest, SupportsSupportedCryptoSchemes) {
|
||||
std::unique_ptr<WVCryptoFactory> factory(new WVCryptoFactory());
|
||||
|
||||
EXPECT_TRUE(factory->isCryptoSchemeSupported(kWidevineUUID)) <<
|
||||
"WVPluginFactory does not support Widevine's UUID";
|
||||
|
||||
EXPECT_TRUE(factory->isCryptoSchemeSupported(kOldNetflixWidevineUUID)) <<
|
||||
"WVPluginFactory does not support the old Netflix Widevine UUID";
|
||||
}
|
||||
|
||||
TEST(WVCryptoFactoryTest, DoesNotSupportUnsupportedCryptoSchemes) {
|
||||
std::unique_ptr<WVCryptoFactory> factory(new WVCryptoFactory());
|
||||
|
||||
EXPECT_FALSE(factory->isCryptoSchemeSupported(kUnknownUUID)) <<
|
||||
"WVPluginFactory incorrectly claims to support an unknown UUID";
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
* source code may only be used and distributed under the Widevine License
|
||||
* Agreement.
|
||||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "WVDrmFactory.h"
|
||||
|
||||
using namespace wvdrm;
|
||||
using namespace android;
|
||||
|
||||
const uint8_t kWidevineUUID[16] = {
|
||||
0xED,0xEF,0x8B,0xA9,0x79,0xD6,0x4A,0xCE,
|
||||
0xA3,0xC8,0x27,0xDC,0xD5,0x1D,0x21,0xED
|
||||
};
|
||||
|
||||
const uint8_t kOldNetflixWidevineUUID[16] = {
|
||||
0x29,0x70,0x1F,0xE4,0x3C,0xC7,0x4A,0x34,
|
||||
0x8C,0x5B,0xAE,0x90,0xC7,0x43,0x9A,0x47
|
||||
};
|
||||
|
||||
const uint8_t kUnknownUUID[16] = {
|
||||
0x6A,0x7F,0xAA,0xB0,0x83,0xC7,0x9E,0x20,
|
||||
0x08,0xBC,0xEF,0x32,0x34,0x1A,0x9A,0x26
|
||||
};
|
||||
|
||||
TEST(WVDrmFactoryTest, SupportsSupportedCryptoSchemes) {
|
||||
WVDrmFactory factory;
|
||||
|
||||
EXPECT_TRUE(factory.isCryptoSchemeSupported(kWidevineUUID)) <<
|
||||
"WVPluginFactory does not support Widevine's UUID";
|
||||
|
||||
EXPECT_TRUE(factory.isCryptoSchemeSupported(kOldNetflixWidevineUUID)) <<
|
||||
"WVPluginFactory does not support the old Netflix Widevine UUID";
|
||||
}
|
||||
|
||||
TEST(WVDrmFactoryTest, DoesNotSupportUnsupportedCryptoSchemes) {
|
||||
WVDrmFactory factory;
|
||||
|
||||
EXPECT_FALSE(factory.isCryptoSchemeSupported(kUnknownUUID)) <<
|
||||
"WVPluginFactory incorrectly claims to support an unknown UUID";
|
||||
}
|
||||
|
||||
TEST(WVDrmFactoryTest, SupportsSupportedContainerFormats) {
|
||||
WVDrmFactory factory;
|
||||
|
||||
EXPECT_TRUE(factory.isContentTypeSupported(String8("video/mp4"))) <<
|
||||
"WVPluginFactory does not support ISO-BMFF video";
|
||||
|
||||
EXPECT_TRUE(factory.isContentTypeSupported(String8("audio/mp4"))) <<
|
||||
"WVPluginFactory does not support ISO-BMFF audio";
|
||||
|
||||
EXPECT_TRUE(factory.isContentTypeSupported(String8("video/webm"))) <<
|
||||
"WVPluginFactory does not support WebM video";
|
||||
|
||||
EXPECT_TRUE(factory.isContentTypeSupported(String8("audio/webm"))) <<
|
||||
"WVPluginFactory does not support WebM audio";
|
||||
}
|
||||
|
||||
TEST(WVDrmFactoryTest, DoesNotSupportUnsupportedContainerFormats) {
|
||||
WVDrmFactory factory;
|
||||
|
||||
// Taken from Encoding.com's list of the most common internet video MIME-types
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/x-matroska"))) <<
|
||||
"WVPluginFactory incorrectly claims to support Matroska";
|
||||
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/x-flv"))) <<
|
||||
"WVPluginFactory incorrectly claims to support Flash Video";
|
||||
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("application/x-mpegURL"))) <<
|
||||
"WVPluginFactory incorrectly claims to support m3u8 Indexes";
|
||||
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/MP2T"))) <<
|
||||
"WVPluginFactory incorrectly claims to support MPEG-2 TS";
|
||||
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/3gpp"))) <<
|
||||
"WVPluginFactory incorrectly claims to support 3GP Mobile";
|
||||
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/quicktime"))) <<
|
||||
"WVPluginFactory incorrectly claims to support Quicktime";
|
||||
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/x-msvideo"))) <<
|
||||
"WVPluginFactory incorrectly claims to support AVI";
|
||||
|
||||
EXPECT_FALSE(factory.isContentTypeSupported(String8("video/x-ms-wmv"))) <<
|
||||
"WVPluginFactory incorrectly claims to support WMV";
|
||||
}
|
||||
Reference in New Issue
Block a user