| Index: content_decryption_module.h
|
| diff --git a/content_decryption_module.h b/content_decryption_module.h
|
| index 28be27b88813893270777d2552c78bfaf976feb1..958c5534536394907261818bb68c94702dfb04c2 100644
|
| --- a/content_decryption_module.h
|
| +++ b/content_decryption_module.h
|
| @@ -14,24 +14,19 @@ typedef __int64 int64_t;
|
| #include <stdint.h>
|
| #endif
|
|
|
| -// Define CDM_EXPORT so that functionality implemented by the CDM module
|
| -// can be exported to consumers.
|
| +// Define CDM_API so that functionality implemented by the CDM module
|
| +// can be exported to consumers. Note: the implementation lives in
|
| +// a dynamic library even in a non-component build.
|
| #if defined(WIN32)
|
|
|
| #if defined(CDM_IMPLEMENTATION)
|
| -#define CDM_EXPORT __declspec(dllexport)
|
| +#define CDM_API __declspec(dllexport)
|
| #else
|
| -#define CDM_EXPORT __declspec(dllimport)
|
| +#define CDM_API __declspec(dllimport)
|
| #endif // defined(CDM_IMPLEMENTATION)
|
|
|
| #else // defined(WIN32)
|
| -
|
| -#if defined(CDM_IMPLEMENTATION)
|
| -#define CDM_EXPORT __attribute__((visibility("default")))
|
| -#else
|
| -#define CDM_EXPORT
|
| -#endif
|
| -
|
| +#define CDM_API __attribute__((visibility("default")))
|
| #endif // defined(WIN32)
|
|
|
| // The version number must be rolled when the exported functions are updated!
|
| @@ -48,9 +43,9 @@ typedef __int64 int64_t;
|
| #define BUILD_ENTRYPOINT_NO_EXPANSION(name, version) name##_##version
|
|
|
| extern "C" {
|
| -CDM_EXPORT void INITIALIZE_CDM_MODULE();
|
| +CDM_API void INITIALIZE_CDM_MODULE();
|
|
|
| -CDM_EXPORT void DeinitializeCdmModule();
|
| +CDM_API void DeinitializeCdmModule();
|
|
|
| // Returns a pointer to the requested CDM Host interface upon success.
|
| // Returns NULL if the requested CDM Host interface is not supported.
|
| @@ -65,12 +60,12 @@ typedef void* (*GetCdmHostFunc)(int host_interface_version, void* user_data);
|
| // |cdm_interface_version|.
|
| // Caller retains ownership of arguments and must call Destroy() on the returned
|
| // object.
|
| -CDM_EXPORT void* CreateCdmInstance(
|
| +CDM_API void* CreateCdmInstance(
|
| int cdm_interface_version,
|
| const char* key_system, uint32_t key_system_size,
|
| GetCdmHostFunc get_cdm_host_func, void* user_data);
|
|
|
| -CDM_EXPORT const char* GetCdmVersion();
|
| +CDM_API const char* GetCdmVersion();
|
| }
|
|
|
| namespace cdm {
|
| @@ -384,7 +379,7 @@ enum MessageType {
|
| // Note to implementors of this interface:
|
| // Per-origin storage and the ability for users to clear it are important.
|
| // See http://www.w3.org/TR/encrypted-media/#privacy-storedinfo.
|
| -class FileIO {
|
| +class CDM_API FileIO {
|
| public:
|
| // Opens the file with |file_name| for read and write.
|
| // FileIOClient::OnOpenComplete() will be called after the opening
|
| @@ -424,7 +419,7 @@ class FileIO {
|
| // When kError is returned, the FileIO object could be in an error state. All
|
| // following calls (other than Close()) could return kError. The CDM should
|
| // still call Close() to destroy the FileIO object.
|
| -class FileIOClient {
|
| +class CDM_API FileIOClient {
|
| public:
|
| enum Status {
|
| kSuccess = 0,
|
| @@ -465,7 +460,7 @@ class FileIOClient {
|
| // provided in CreateCdmInstance() to allocate any Buffer that needs to
|
| // be passed back to the caller. Implementations must call Buffer::Destroy()
|
| // when a Buffer is created that will never be returned to the caller.
|
| -class ContentDecryptionModule_7 {
|
| +class CDM_API ContentDecryptionModule_7 {
|
| public:
|
| static const int kVersion = 7;
|
| typedef Host_7 Host;
|
| @@ -644,7 +639,7 @@ class ContentDecryptionModule_7 {
|
| // provided in CreateCdmInstance() to allocate any Buffer that needs to
|
| // be passed back to the caller. Implementations must call Buffer::Destroy()
|
| // when a Buffer is created that will never be returned to the caller.
|
| -class ContentDecryptionModule_8 {
|
| +class CDM_API ContentDecryptionModule_8 {
|
| public:
|
| static const int kVersion = 8;
|
| typedef Host_8 Host;
|
| @@ -829,7 +824,7 @@ class ContentDecryptionModule_8 {
|
| typedef ContentDecryptionModule_8 ContentDecryptionModule;
|
|
|
| // Represents a buffer created by Allocator implementations.
|
| -class Buffer {
|
| +class CDM_API Buffer {
|
| public:
|
| // Destroys the buffer in the same context as it was created.
|
| virtual void Destroy() = 0;
|
| @@ -848,7 +843,7 @@ class Buffer {
|
| void operator=(const Buffer&);
|
| };
|
|
|
| -class Host_7 {
|
| +class CDM_API Host_7 {
|
| public:
|
| static const int kVersion = 7;
|
|
|
| @@ -985,7 +980,7 @@ class Host_7 {
|
| virtual ~Host_7() {}
|
| };
|
|
|
| -class Host_8 {
|
| +class CDM_API Host_8 {
|
| public:
|
| static const int kVersion = 8;
|
|
|
| @@ -1123,7 +1118,7 @@ class Host_8 {
|
| };
|
|
|
| // Represents a decrypted block that has not been decoded.
|
| -class DecryptedBlock {
|
| +class CDM_API DecryptedBlock {
|
| public:
|
| virtual void SetDecryptedBuffer(Buffer* buffer) = 0;
|
| virtual Buffer* DecryptedBuffer() = 0;
|
| @@ -1138,7 +1133,7 @@ class DecryptedBlock {
|
| virtual ~DecryptedBlock() {}
|
| };
|
|
|
| -class VideoFrame {
|
| +class CDM_API VideoFrame {
|
| public:
|
| enum VideoPlane {
|
| kYPlane = 0,
|
| @@ -1181,7 +1176,7 @@ class VideoFrame {
|
| //
|
| // |<----------------- AudioFrames ------------------>|
|
| // | audio buffer 0 | audio buffer 1 | audio buffer 2 |
|
| -class AudioFrames {
|
| +class CDM_API AudioFrames {
|
| public:
|
| virtual void SetFrameBuffer(Buffer* buffer) = 0;
|
| virtual Buffer* FrameBuffer() = 0;
|
|
|