aboutsummaryrefslogtreecommitdiff
path: root/Src/libvp6/include/DRMInfo.hpp
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/libvp6/include/DRMInfo.hpp
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/libvp6/include/DRMInfo.hpp')
-rw-r--r--Src/libvp6/include/DRMInfo.hpp85
1 files changed, 85 insertions, 0 deletions
diff --git a/Src/libvp6/include/DRMInfo.hpp b/Src/libvp6/include/DRMInfo.hpp
new file mode 100644
index 00000000..b933c8b3
--- /dev/null
+++ b/Src/libvp6/include/DRMInfo.hpp
@@ -0,0 +1,85 @@
+#if !defined(DRMINFO_HPP)
+#define DRMINFO_HPP
+//______________________________________________________________________________
+//
+// DRMInfo.hpp
+//
+
+//______________________________________________________________________________
+// Include Files and Forward Declarations
+
+#include <string>
+#include <exception>
+#include <iosfwd>
+#include "FourCC.hpp"
+
+namespace on2vp
+{
+
+//______________________________________________________________________________
+// Macro, Enumeration, and Constant Definitions
+
+//______________________________________________________________________________
+// Type, Struct, and Class Definitions
+
+ //--------------------------------------
+ class DRMInfo
+ {
+ friend std::ostream& operator<<(std::ostream& os, const DRMInfo& drmi);
+
+ public:
+ class Exception : public std::exception
+ {
+ public:
+ Exception(const std::string& strText);
+ ~Exception() throw();
+ const char* what() const throw();
+ private:
+ std::string m_strText;
+ };
+ DRMInfo();
+ DRMInfo(const DRMInfo& drmi);
+ ~DRMInfo();
+
+ DRMInfo& operator=(const DRMInfo& drmi);
+
+ const FourCC scheme() const;
+ long scope() const;
+ long amount() const;
+ const unsigned char* data() const;
+ long dataSize() const;
+ const unsigned char* drmx() const;
+ long drmxSize() const;
+
+ void scheme(FourCC fccScheme);
+ void scope(long lScope);
+ void amount(long lAmount);
+ void data(const unsigned char* pData, long lDataSize);
+
+ void init(FourCC fccScheme, long lScope, long lAmount, const unsigned char* pData, long lDataSize);
+ void drmx(const unsigned char* pDRMX, long lDRMXSize);
+
+ private:
+ enum
+ {
+ DRMXHeaderSize = 16
+ };
+
+ FourCC m_fccScheme;
+ long m_lScope;
+ long m_lAmount;
+ unsigned char* m_pData;
+ long m_lDataSize;
+ mutable unsigned char* m_pDRMX;
+ long m_lDRMXSize;
+ };
+
+//______________________________________________________________________________
+// Object and Function Declarations
+
+//______________________________________________________________________________
+// Object and Function Definitions
+
+} // namespace on2vp
+
+#endif // DRMINFO_HPP