MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
mp4_encryption.h
Go to the documentation of this file.
1 #include "mp4.h"
2 #include "mp4_ms.h"
3 
4 namespace MP4 {
5 
6  struct UUID_SampleEncryption_Sample_Entry {
7  uint32_t BytesClear;
8  uint32_t BytesEncrypted;
9  };
10 
11  struct UUID_SampleEncryption_Sample {
12  std::string InitializationVector;
13  uint32_t NumberOfEntries;
14  std::vector<UUID_SampleEncryption_Sample_Entry> Entries;
15  };
16 
17  class UUID_SampleEncryption: public UUID {
18  public:
19  UUID_SampleEncryption();
20  void setVersion(uint32_t newVersion);
21  uint32_t getVersion();
22  void setFlags(uint32_t newFlags);
23  uint32_t getFlags();
24  void setAlgorithmID(uint32_t newAlgorithmID);
25  uint32_t getAlgorithmID();
26  void setIVSize(uint32_t newIVSize);
27  uint32_t getIVSize();
28  void setKID(std::string newKID);
29  std::string getKID();
30  uint32_t getSampleCount();
31  void setSample(UUID_SampleEncryption_Sample newSample, size_t index);
32  UUID_SampleEncryption_Sample getSample(size_t index);
33  std::string toPrettyString(uint32_t indent = 0);
34  };
35 
36  class UUID_TrackEncryption: public UUID {
37  public:
38  UUID_TrackEncryption();
39  void setVersion(uint32_t newVersion);
40  uint32_t getVersion();
41  void setFlags(uint32_t newFlags);
42  uint32_t getFlags();
43  void setDefaultAlgorithmID(uint32_t newAlgorithmID);
44  uint32_t getDefaultAlgorithmID();
45  void setDefaultIVSize(uint8_t newIVSize);
46  uint8_t getDefaultIVSize();
47  void setDefaultKID(std::string newKID);
48  std::string getDefaultKID();
49  std::string toPrettyString(uint32_t indent = 0);
50  };
51 
52  class UUID_ProtectionSystemSpecificHeader: public UUID {
53  public:
54  UUID_ProtectionSystemSpecificHeader();
55  void setVersion(uint32_t newVersion);
56  uint32_t getVersion();
57  void setFlags(uint32_t newFlags);
58  uint32_t getFlags();
59  void setSystemID(std::string newID);
60  std::string getSystemID();
61  void setDataSize(uint32_t newDataSize);
62  uint32_t getDataSize();
63  void setData(std::string newData);
64  std::string getData();
65  std::string toPrettyString(uint32_t indent = 0);
66  };
67 
68  class SINF: public Box {
69  public:
70  SINF();
71  void setEntry(Box & newEntry, uint32_t no);
72  Box & getEntry(uint32_t no);
73  std::string toPrettyString(uint32_t indent = 0);
74  };
75 
76  class FRMA: public Box {
77  public:
78  FRMA();
79  void setOriginalFormat(std::string newFormat);
80  std::string getOriginalFormat();
81  std::string toPrettyString(uint32_t indent = 0);
82  };
83 
84  class SCHM: public fullBox {
85  public:
86  SCHM();
87  void setSchemeType(uint32_t newType);
88  uint32_t getSchemeType();
89  void setSchemeVersion(uint32_t newVersion);
90  uint32_t getSchemeVersion();
91  void setSchemeURI(std::string newURI);
92  std::string getSchemeURI();
93  std::string toPrettyString(uint32_t indent = 0);
94  };
95 
96  class SCHI: public Box {
97  public:
98  SCHI();
99  void setContent(Box & newContent);
100  Box & getContent();
101  std::string toPrettyString(uint32_t indent = 0);
102  };
103 
104 }
uint32_t BytesClear
Definition: mp4_encryption.h:7
Contains all MP4 format related code.
Definition: mp4.cpp:15
uint32_t BytesEncrypted
Definition: mp4_encryption.h:8