V18.4.0 CAS plugin
Note that this version does not have Widevine Provisioning 4.0 support. It is only suitable for device upgrades. A new patch with provisioning 4.0 support will be made later.
This commit is contained in:
59
plugin/include/widevine_media_cas.h
Normal file
59
plugin/include/widevine_media_cas.h
Normal file
@@ -0,0 +1,59 @@
|
||||
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
// source code may only be used and distributed under the Widevine Master
|
||||
// License Agreement.
|
||||
|
||||
#ifndef WIDEVINE_MEDIA_CAS_H
|
||||
#define WIDEVINE_MEDIA_CAS_H
|
||||
|
||||
#include "media/cas/CasAPI.h"
|
||||
|
||||
using android::CasFactory;
|
||||
using android::CasPlugin;
|
||||
using android::CasPluginCallback;
|
||||
using android::CasPluginCallbackExt;
|
||||
using android::CasPluginDescriptor;
|
||||
using android::status_t;
|
||||
using android::String8;
|
||||
|
||||
extern "C" {
|
||||
android::CasFactory* createCasFactory();
|
||||
}
|
||||
|
||||
namespace wvcas {
|
||||
|
||||
// WidevineCasFactory implements the android::CasFactory interface.
|
||||
class WidevineCasFactory : public CasFactory {
|
||||
public:
|
||||
// Implements android::CasFactory* createCasFactory(). This method is used
|
||||
// by the MediaCas framework to construct our factory.
|
||||
static WidevineCasFactory* createCasFactory();
|
||||
~WidevineCasFactory() override {}
|
||||
|
||||
// Test the input |CA_system_id| and return true if it is supported.
|
||||
// We only support the Widevine CA ID.
|
||||
bool isSystemIdSupported(int32_t CA_system_id) const override;
|
||||
|
||||
// Add a descriptor to the vector |descriptors| for each CA ID we support.
|
||||
// We only support the Widevine CA ID.
|
||||
status_t queryPlugins(
|
||||
std::vector<CasPluginDescriptor>* descriptors) const override;
|
||||
|
||||
// Construct an instance of our CAS API plugin.
|
||||
status_t createPlugin(int32_t CA_system_id, void* appData,
|
||||
CasPluginCallback callback,
|
||||
CasPlugin** plugin) override;
|
||||
|
||||
// Construct a new extend instance of a CasPlugin given a CA_system_id
|
||||
status_t createPlugin(int32_t CA_system_id, void* appData,
|
||||
CasPluginCallbackExt callback,
|
||||
CasPlugin** plugin) override;
|
||||
|
||||
private:
|
||||
WidevineCasFactory() {}
|
||||
WidevineCasFactory(const WidevineCasFactory&);
|
||||
WidevineCasFactory& operator=(const WidevineCasFactory&);
|
||||
};
|
||||
|
||||
} // namespace wvcas
|
||||
|
||||
#endif // WIDEVINE_MEDIA_CAS_H
|
||||
Reference in New Issue
Block a user