31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
diff --git a/content_decryption_module.h b/content_decryption_module.h
|
|
--- a/content_decryption_module.h
|
|
+++ b/content_decryption_module.h
|
|
@@ -18,6 +18,8 @@ typedef __int64 int64_t;
|
|
#include <stdint.h>
|
|
#endif
|
|
|
|
+#include "mozilla/DefineEnum.h"
|
|
+
|
|
// The version number must be rolled when the exported functions are updated!
|
|
// If the CDM and the adapter use different versions of these functions, the
|
|
// adapter will fail to load or crash!
|
|
@@ -75,15 +77,15 @@ CDM_API const char* GetCdmVersion();
|
|
|
|
namespace cdm {
|
|
|
|
-enum Status : uint32_t {
|
|
- kSuccess = 0,
|
|
+MOZ_DEFINE_ENUM_WITH_BASE_AND_TOSTRING(Status, uint32_t, (
|
|
+ kSuccess,
|
|
kNeedMoreData, // Decoder needs more data to produce a decoded frame/sample.
|
|
kNoKey, // The required decryption key is not available.
|
|
kInitializationError, // Initialization error.
|
|
kDecryptError, // Decryption failed.
|
|
kDecodeError, // Error decoding audio or video.
|
|
kDeferredInitialization // Decoder is not ready for initialization.
|
|
-};
|
|
+));
|
|
CHECK_TYPE(Status, 4, 4);
|
|
|
|
// Exceptions used by the CDM to reject promises.
|