Files
android/libwvdrmengine/include_hidl/WVCryptoFactory.h
Edwin Wong 2dc53442e7 Implement Widevine drm HIDL HAL service.
Modify Android mediadrm and mediacrypto glue layer to use
HIDL interface.

Test: Play Movies (streaming and offline playback)

Test: ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed
run gts -m GtsMediaTestCases

Test:
adb shell /system/bin/libwvdrmengine_hidl_test

Test:
adb shell /system/bin/libwvdrmmediacrypto_hidl_test

Test:
adb shell /system/bin/libwvdrmdrmplugin_hidl_test

bug: 34628973
Change-Id: Icd5f2dd556acb9874697963b4d7d62cb7c943e74
2017-03-02 13:46:11 -08:00

48 lines
1.1 KiB
C++

//
// Copyright 2017 Google Inc. All Rights Reserved.
//
#ifndef WV_CRYPTO_FACTORY_H_
#define WV_CRYPTO_FACTORY_H_
#include <android/hardware/drm/1.0/ICryptoFactory.h>
#include "WVTypes.h"
namespace wvdrm {
namespace hardware {
namespace drm {
namespace V1_0 {
namespace widevine {
using ::android::hardware::drm::V1_0::ICryptoFactory;
using ::android::hardware::drm::V1_0::ICryptoPlugin;
using ::android::hardware::hidl_array;
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
struct WVCryptoFactory : public ICryptoFactory {
public:
WVCryptoFactory() {}
virtual ~WVCryptoFactory() {}
Return<bool> isCryptoSchemeSupported(const hidl_array<uint8_t, 16>& uuid)
override;
Return<void> createPlugin(
const hidl_array<uint8_t, 16>& uuid,
const hidl_vec<uint8_t>& initData,
createPlugin_cb _hidl_cb) override;
private:
WVDRM_DISALLOW_COPY_AND_ASSIGN(WVCryptoFactory);
};
} // namespace widevine
} // namespace V1_0
} // namespace drm
} // namespace hardware
} // namespace wvdrm
#endif // WV_CRYPTO_FACTORY_H_