MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
mp4_adobe.h
Go to the documentation of this file.
1 #pragma once
2 #include "mp4.h"
3 #include <stdint.h>
4 
5 namespace MP4 {
6  //class Box;
7 
8  struct afrt_runtable {
9  uint32_t firstFragment;
10  uint64_t firstTimestamp;
11  uint32_t duration;
12  uint32_t discontinuity;
13  };
14  //fragmentRun
15 
17  class AFRT: public Box {
18  public:
19  AFRT();
20  void setVersion(char newVersion);
21  uint32_t getVersion();
22  void setUpdate(uint32_t newUpdate);
23  uint32_t getUpdate();
24  void setTimeScale(uint32_t newScale);
25  uint32_t getTimeScale();
26  uint32_t getQualityEntryCount();
27  void setQualityEntry(std::string & newQuality, uint32_t no);
28  const char * getQualityEntry(uint32_t no);
29  uint32_t getFragmentRunCount();
30  void setFragmentRun(afrt_runtable newRun, uint32_t no);
31  afrt_runtable getFragmentRun(uint32_t no);
32  std::string toPrettyString(uint32_t indent = 0);
33  };
34  //AFRT Box
35 
36  struct asrt_runtable {
37  uint32_t firstSegment;
39  };
40 
42  class ASRT: public Box {
43  public:
44  ASRT();
45  void setVersion(char newVersion);
46  uint32_t getVersion();
47  void setUpdate(uint32_t newUpdate);
48  uint32_t getUpdate();
49  uint32_t getQualityEntryCount();
50  void setQualityEntry(std::string & newQuality, uint32_t no);
51  const char * getQualityEntry(uint32_t no);
52  uint32_t getSegmentRunEntryCount();
53  void setSegmentRun(uint32_t firstSegment, uint32_t fragmentsPerSegment, uint32_t no);
54  asrt_runtable getSegmentRun(uint32_t no);
55  std::string toPrettyString(uint32_t indent = 0);
56  };
57  //ASRT Box
58 
60  class ABST: public Box {
61  public:
62  ABST();
63  void setVersion(char newVersion);
64  char getVersion();
65  void setFlags(uint32_t newFlags);
66  uint32_t getFlags();
67  void setBootstrapinfoVersion(uint32_t newVersion);
68  uint32_t getBootstrapinfoVersion();
69  void setProfile(char newProfile);
70  char getProfile();
71  void setLive(bool newLive);
72  bool getLive();
73  void setUpdate(bool newUpdate);
74  bool getUpdate();
75  void setTimeScale(uint32_t newTimeScale);
76  uint32_t getTimeScale();
77  void setCurrentMediaTime(uint64_t newTime);
78  uint64_t getCurrentMediaTime();
79  void setSmpteTimeCodeOffset(uint64_t newTime);
80  uint64_t getSmpteTimeCodeOffset();
81  void setMovieIdentifier(std::string & newIdentifier);
82  char * getMovieIdentifier();
83  uint32_t getServerEntryCount();
84  void setServerEntry(std::string & entry, uint32_t no);
85  const char * getServerEntry(uint32_t no);
86  uint32_t getQualityEntryCount();
87  void setQualityEntry(std::string & entry, uint32_t no);
88  const char * getQualityEntry(uint32_t no);
89  void setDrmData(std::string newDrm);
90  char * getDrmData();
91  void setMetaData(std::string newMetaData);
92  char * getMetaData();
93  uint32_t getSegmentRunTableCount();
94  void setSegmentRunTable(ASRT & table, uint32_t no);
95  ASRT & getSegmentRunTable(uint32_t no);
96  uint32_t getFragmentRunTableCount();
97  void setFragmentRunTable(AFRT & table, uint32_t no);
98  AFRT & getFragmentRunTable(uint32_t no);
99  std::string toPrettyString(uint32_t indent = 0);
100  };
101  //ABST Box
102 
103  struct afraentry {
104  uint64_t time;
105  uint64_t offset;
106  };
108  uint64_t time;
109  uint32_t segment;
110  uint32_t fragment;
111  uint64_t afraoffset;
112  uint64_t offsetfromafra;
113  };
114  class AFRA: public Box {
115  public:
116  AFRA();
117  void setVersion(uint32_t newVersion);
118  uint32_t getVersion();
119  void setFlags(uint32_t newFlags);
120  uint32_t getFlags();
121  void setLongIDs(bool newVal);
122  bool getLongIDs();
123  void setLongOffsets(bool newVal);
124  bool getLongOffsets();
125  void setGlobalEntries(bool newVal);
126  bool getGlobalEntries();
127  void setTimeScale(uint32_t newVal);
128  uint32_t getTimeScale();
129  uint32_t getEntryCount();
130  void setEntry(afraentry newEntry, uint32_t no);
131  afraentry getEntry(uint32_t no);
132  uint32_t getGlobalEntryCount();
133  void setGlobalEntry(globalafraentry newEntry, uint32_t no);
134  globalafraentry getGlobalEntry(uint32_t no);
135  std::string toPrettyString(uint32_t indent = 0);
136  };
137 
138 }
139 
uint64_t firstTimestamp
Definition: mp4_adobe.h:10
Definition: mp4_adobe.h:36
uint64_t offset
Definition: mp4_adobe.h:105
Contains all MP4 format related code.
Definition: mp4.cpp:15
uint32_t firstSegment
Definition: mp4_adobe.h:37
Definition: mp4_adobe.h:114
Definition: mp4_adobe.h:8
ABST Box class.
Definition: mp4_adobe.h:60
ASRT Box class.
Definition: mp4_adobe.h:42
AFRT Box class.
Definition: mp4_adobe.h:17
uint32_t segment
Definition: mp4_adobe.h:109
Definition: mp4_adobe.h:107
uint64_t time
Definition: mp4_adobe.h:104
uint64_t offsetfromafra
Definition: mp4_adobe.h:112
uint32_t duration
Definition: mp4_adobe.h:11
Definition: mp4.h:22
uint32_t firstFragment
Definition: mp4_adobe.h:9
uint64_t afraoffset
Definition: mp4_adobe.h:111
uint64_t time
Definition: mp4_adobe.h:108
uint32_t fragmentsPerSegment
Definition: mp4_adobe.h:38
uint32_t fragment
Definition: mp4_adobe.h:110
uint32_t discontinuity
Definition: mp4_adobe.h:12
Definition: mp4_adobe.h:103