Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0030de50 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Convert mediacas plugins to Soong"

parents 39ec5a7a 16a11159
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

cc_library_shared {
    name: "libclearkeycasplugin",

    srcs: [
        "ClearKeyCasPlugin.cpp",
        "ClearKeyFetcher.cpp",
        "ClearKeyLicenseFetcher.cpp",
        "ClearKeySessionLibrary.cpp",
        "ecm.cpp",
        "ecm_generator.cpp",
        "JsonAssetLoader.cpp",
        "protos/license_protos.proto",
    ],

    proprietary: true,
    relative_install_path: "mediacas",

    shared_libs: [
        "libutils",
        "liblog",
        "libcrypto",
        "libstagefright_foundation",
        "libprotobuf-cpp-lite",
    ],

    header_libs: ["media_plugin_headers"],

    static_libs: ["libjsmn"],

    proto: {
        type: "full",
        export_proto_headers: true,
    },

    include_dirs: [
        "frameworks/av/include",
        "frameworks/native/include/media",
    ],
}
+0 −71
Original line number Diff line number Diff line
#
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_SRC_FILES:= \
    ClearKeyCasPlugin.cpp \
    ClearKeyFetcher.cpp \
    ClearKeyLicenseFetcher.cpp \
    ClearKeySessionLibrary.cpp \
    ecm.cpp \
    ecm_generator.cpp \
    JsonAssetLoader.cpp \
    protos/license_protos.proto \

LOCAL_MODULE := libclearkeycasplugin

LOCAL_PROPRIETARY_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := mediacas

LOCAL_SHARED_LIBRARIES := \
    libutils \
    liblog \
    libcrypto \
    libstagefright_foundation \
    libprotobuf-cpp-lite \

LOCAL_HEADER_LIBRARIES := \
    media_plugin_headers

LOCAL_STATIC_LIBRARIES := \
    libjsmn \

LOCAL_MODULE_CLASS := SHARED_LIBRARIES

LOCAL_PROTOC_OPTIMIZE_TYPE := full

define proto_includes
$(call local-generated-sources-dir)/proto/$(LOCAL_PATH)
endef

LOCAL_C_INCLUDES += \
    external/jsmn \
    frameworks/av/include \
    frameworks/native/include/media \
    $(call proto_includes)

LOCAL_EXPORT_C_INCLUDE_DIRS := \
    $(call proto_includes)

LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)

#########################################################################
# Build unit tests

include $(LOCAL_PATH)/tests/Android.mk
+45 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

cc_test {
    name: "ClearKeyFetcherTest",

    srcs: ["ClearKeyFetcherTest.cpp"],

    vendor: true,

    // LOCAL_LDFLAGS is needed here for the test to use the plugin, because
    // the plugin is not in standard library search path. Without this .so
    // loading fails at run-time (linking is okay).
    ldflags: [
        "-Wl,--rpath,${ORIGIN}/../../../system/vendor/lib/mediacas",
        "-Wl,--enable-new-dtags",
    ],

    shared_libs: [
        "libutils",
        "libclearkeycasplugin",
        "libstagefright_foundation",
        "libprotobuf-cpp-lite",
        "liblog",
    ],

    include_dirs: [
        "frameworks/av/drm/mediacas/plugins/clearkey",
        "frameworks/av/include",
        "frameworks/native/include/media",
    ],
}
+0 −45
Original line number Diff line number Diff line
#
# Copyright (C) 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
    ClearKeyFetcherTest.cpp

LOCAL_MODULE := ClearKeyFetcherTest
LOCAL_VENDOR_MODULE := true

# LOCAL_LDFLAGS is needed here for the test to use the plugin, because
# the plugin is not in standard library search path. Without this .so
# loading fails at run-time (linking is okay).
LOCAL_LDFLAGS := \
    -Wl,--rpath,\$${ORIGIN}/../../../system/vendor/lib/mediacas -Wl,--enable-new-dtags

LOCAL_SHARED_LIBRARIES := \
    libutils libclearkeycasplugin libstagefright_foundation libprotobuf-cpp-lite liblog

LOCAL_C_INCLUDES += \
    $(TOP)/frameworks/av/drm/mediacas/plugins/clearkey \
    $(TOP)/frameworks/av/include \
    $(TOP)/frameworks/native/include/media \

LOCAL_MODULE_TAGS := tests

include $(BUILD_NATIVE_TEST)


+39 −0
Original line number Diff line number Diff line
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

cc_library_shared {
    name: "libmockcasplugin",

    srcs: [
        "MockCasPlugin.cpp",
        "MockSessionLibrary.cpp",
    ],

    proprietary: true,
    relative_install_path: "mediacas",

    shared_libs: [
        "libutils",
        "liblog",
    ],

    header_libs: ["media_plugin_headers"],

    include_dirs: [
        "frameworks/av/include",
        "frameworks/native/include/media",
    ],
}
Loading