diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..1124add --- /dev/null +++ b/Android.bp @@ -0,0 +1,22 @@ +// +// Copyright (c) 2009-2018, Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +// Recursively call sub-folder Android.mk diff --git a/Android.mk b/Android.mk.bak similarity index 100% rename from Android.mk rename to Android.mk.bak diff --git a/common/Android.bp b/common/Android.bp new file mode 100644 index 0000000..0adf3f5 --- /dev/null +++ b/common/Android.bp @@ -0,0 +1,77 @@ +// +// Copyright (c) 2009-2018, Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +cc_library_static { + name: "libhdcpcommon", + + cppflags: [ + "-DANDROID", + "-DANDROID_VERSION=800", + "-DLOG_TAG=\"HDCPCOMMON\"", + ] + ["-DLOG_CONSOLE"] + ["-Wno-error"], // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(TARGET_BUILD_VARIANT),userdebug) + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + // For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32 + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(ENABLE_DEBUG),1) + + // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG + // LOCAL_CPPFLAG += -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(ENABLE_DEBUG),1) + + // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG + // LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + //WA + + //local_include_dirs: [ + include_dirs: [ + "hardware/intel/external/media/hdcp/sdk", + "hardware/intel/external/media/hdcp/common", + ], + + shared_libs: [ + "libutils", + "liblog", + ], + + srcs: [ + "clientsock.cpp", + "gensock.cpp", + "servsock.cpp", + "socketdata.cpp", + ], + + proprietary: true, + +} diff --git a/common/Android.mk b/common/Android.mk.bak similarity index 100% rename from common/Android.mk rename to common/Android.mk.bak diff --git a/daemon/Android.bp b/daemon/Android.bp new file mode 100644 index 0000000..c2a03f7 --- /dev/null +++ b/daemon/Android.bp @@ -0,0 +1,89 @@ +// +// Copyright (c) 2009-2018, Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +cc_binary { + name: "hdcpd", + + cppflags: [ + "-DANDROID", + "-DUSES_IA_HWCOMPOSER", + "-DANDROID_VERSION=800", + "-DLOG_TAG=\"HDCPD\"", + ] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(TARGET_BUILD_VARIANT),userdebug) + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + // For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32 + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(ENABLE_DEBUG),1) + + // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG + // LOCAL_CPPFLAG += -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(ENABLE_DEBUG),1) + + // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG + // LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + //WA + "-Wno-unused-parameter", + "-Wno-error", + ], + + shared_libs: [ + "libutils", + "libbinder", + "liblog", + "libcrypto", + "libdrm", + "libssl", + "libhwcservice", + ], + + static_libs: ["libhdcpcommon"], + + srcs: [ + "main.cpp", + "daemon.cpp", + "port.cpp", + "srm.cpp", + "portmanager.cpp", + "portmanager_android.cpp", + ], + + include_dirs: ["."] + [ + "hardware/intel/external/media/hdcp/sdk", + "hardware/intel/external/media/hdcp/common", + ], + + proprietary: true, + +} diff --git a/daemon/Android.mk b/daemon/Android.mk.bak similarity index 100% rename from daemon/Android.mk rename to daemon/Android.mk.bak diff --git a/sdk/Android.bp b/sdk/Android.bp new file mode 100644 index 0000000..8dc2464 --- /dev/null +++ b/sdk/Android.bp @@ -0,0 +1,84 @@ +// +// Copyright (c) 2009-2018, Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +cc_library_shared { + name: "libhdcpsdk", + + // For ALOGV and enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32 + cppflags: [ + "-DANDROID", + "-DANDROID_VERSION=800", + "-DLOG_TAG=\"HDCPSDK\"", + ] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(TARGET_BUILD_VARIANT),userdebug) + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + // For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32 + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(ENABLE_DEBUG),1) + "-DHDCP_USE_VERBOSE_LOGGING", + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + "-DHDCP_USE_FUNCTION_LOGGING", + // endif + "-DHDCP_USE_LINK_FUNCTION_LOGGING", + + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + ] + [ // ifeq ($(ENABLE_DEBUG),1) + + // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG + // LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + //WA + "-Wno-unused-parameter", + "-Wno-error", + ], + + include_dirs: [ + "hardware/intel/external/media/hdcp/sdk", + "hardware/intel/external/media/hdcp/daemon", + "hardware/intel/external/media/hdcp/common", + ], + + srcs: [ + "hdcpapi.cpp", + "sessionmanager.cpp", + "session.cpp", + ], + + shared_libs: [ + "libutils", + "liblog", + ], + + static_libs: ["libhdcpcommon"], + + export_include_dirs: [""], + + proprietary: true, + +} diff --git a/sdk/Android.mk b/sdk/Android.mk.bak similarity index 100% rename from sdk/Android.mk rename to sdk/Android.mk.bak diff --git a/test/Android.bp b/test/Android.bp new file mode 100644 index 0000000..1124add --- /dev/null +++ b/test/Android.bp @@ -0,0 +1,22 @@ +// +// Copyright (c) 2009-2018, Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +// Recursively call sub-folder Android.mk diff --git a/test/Android.mk b/test/Android.mk.bak similarity index 100% rename from test/Android.mk rename to test/Android.mk.bak diff --git a/test/hdcpTestUtility/Android.bp.bak b/test/hdcpTestUtility/Android.bp.bak new file mode 100644 index 0000000..4545df3 --- /dev/null +++ b/test/hdcpTestUtility/Android.bp.bak @@ -0,0 +1,78 @@ +// +// Copyright (c) 2009-2018, Intel Corporation +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. + +cc_binary { + name: "hdcpTestUtility", + + // For ALOGV and enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32 + cppflags: [ + "-DANDROID", + "-DANDROID_VERSION=800", + "-DLOG_TAG=\\\"HDCPTESTUTILITY\\\"", + ] + ["-DLOG_CONSOLE"] + [ // LOG_CONSOLE will print ALOGI, ALOGE, ALOGW in Android. Enable on debug build + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(TARGET_BUILD_VARIANT),userdebug) + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + // For ALOGV and function enter/exit log, set ENABLE_DEBUG=1 during compilation e.g. mm ENABLE_DEBUG=1 -j32 + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + // ifeq ($(ENABLE_DEBUG),1) + "-DHDCP_USE_VERBOSE_LOGGING", + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + "-DHDCP_USE_FUNCTION_LOGGING", + // endif + "-DHDCP_USE_LINK_FUNCTION_LOGGING", + + // ANDROIDMK TRANSLATION ERROR: unsupported conditional + ] + [ // ifeq ($(ENABLE_DEBUG),1) + + // ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_CPPFLAG + // LOCAL_CPPFLAG += -DLOG_CONSOLE -DHDCP_USE_VERBOSE_LOGGING -DHDCP_USE_FUNCTION_LOGGING -DHDCP_USE_LINK_FUNCTION_LOGGING + + // ANDROIDMK TRANSLATION ERROR: endif from unsupported conditional + // endif + + //WA + "-Wno-unused-parameter", + "-Wno-error", + ], + + local_include_dirs: [ + "../../sdk", + "../../test/hdcpTestUtility", + ], + + srcs: ["hdcpTestUtility.cpp"], + + shared_libs: [ + "libutils", + "liblog", + "libhdcpsdk", + ], + + export_include_dirs: [""], + + proprietary: true, + +} diff --git a/test/hdcpTestUtility/androidmk b/test/hdcpTestUtility/androidmk new file mode 100755 index 0000000..02bc5b1 Binary files /dev/null and b/test/hdcpTestUtility/androidmk differ