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

Commit 2fdf283c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add Flag for Enabling 64-bit Media DRM Server" into oc-dev

parents 1cbe62c8 e9fec545
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ LOCAL_SRC_FILES := \
LOCAL_SRC_FILES += \
    CasImpl.cpp \
    DescramblerImpl.cpp \
    DrmPluginPath.cpp \
    DrmSessionManager.cpp \
    ICrypto.cpp \
    IDrm.cpp \
+2 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@

#include <binder/IMemory.h>
#include <media/Crypto.h>
#include <media/DrmPluginPath.h>
#include <media/hardware/CryptoAPI.h>
#include <media/stagefright/foundation/ADebug.h>
#include <media/stagefright/foundation/AString.h>
@@ -102,7 +103,7 @@ void Crypto::findFactoryForScheme(const uint8_t uuid[16]) {
    }

    // no luck, have to search
    String8 dirPath("/vendor/lib/mediadrm");
    String8 dirPath(getDrmPluginPath());
    String8 pluginPath;

    DIR* pDir = opendir(dirPath.string());
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <dirent.h>
#include <dlfcn.h>

#include <media/DrmPluginPath.h>
#include <media/DrmSessionClientInterface.h>
#include <media/DrmSessionManager.h>
#include <media/Drm.h>
@@ -220,7 +221,7 @@ void Drm::findFactoryForScheme(const uint8_t uuid[16]) {
    }

    // no luck, have to search
    String8 dirPath("/vendor/lib/mediadrm");
    String8 dirPath(getDrmPluginPath());
    DIR* pDir = opendir(dirPath.string());

    if (pDir == NULL) {
+35 −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.
 */

//#define LOG_NDEBUG 0
#define LOG_TAG "DrmPluginPath"
#include <utils/Log.h>

#include <cutils/properties.h>
#include <media/DrmPluginPath.h>

namespace android {

const char* getDrmPluginPath() {
    char value[PROPERTY_VALUE_MAX];
    if (property_get("drm.64bit.enabled", value, NULL) == 0) {
        return "/vendor/lib/mediadrm";
    } else {
        return "/vendor/lib64/mediadrm";
    }
}

}  // namespace android
+1 −0
Original line number Diff line number Diff line
../../media/libmedia/include/DrmPluginPath.h
 No newline at end of file
Loading