1e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce/*
2e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * Copyright (C) 2017 The Android Open Source Project
3e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce *
4e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * Licensed under the Apache License, Version 2.0 (the "License");
5e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * you may not use this file except in compliance with the License.
6e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * You may obtain a copy of the License at
7e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce *
8e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce *      http://www.apache.org/licenses/LICENSE-2.0
9e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce *
10e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * Unless required by applicable law or agreed to in writing, software
11e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * distributed under the License is distributed on an "AS IS" BASIS,
12e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * See the License for the specific language governing permissions and
14e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce * limitations under the License.
15e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce */
16e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce
17e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce//#define LOG_NDEBUG 0
18e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce#define LOG_TAG "DrmPluginPath"
19e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce#include <utils/Log.h>
20e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce
21e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce#include <cutils/properties.h>
227d2c6e8be2c9a4f3c1364d243856a345f17f851eJeff Tinker#include <mediadrm/DrmPluginPath.h>
23e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce
24e9fec5451704893412c8e707940483a6bdb5f238John W. Brucenamespace android {
25e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce
26e9fec5451704893412c8e707940483a6bdb5f238John W. Bruceconst char* getDrmPluginPath() {
27e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce    char value[PROPERTY_VALUE_MAX];
28e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce    if (property_get("drm.64bit.enabled", value, NULL) == 0) {
29e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce        return "/vendor/lib/mediadrm";
30e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce    } else {
31e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce        return "/vendor/lib64/mediadrm";
32e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce    }
33e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce}
34e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce
35e9fec5451704893412c8e707940483a6bdb5f238John W. Bruce}  // namespace android
36