New skeleton for box code
This commit is contained in:
parent
43cd6311ea
commit
2c7edafc42
1 changed files with 19 additions and 17 deletions
36
lib/mp4.h
36
lib/mp4.h
|
@ -10,27 +10,29 @@ namespace MP4{
|
||||||
class Box {
|
class Box {
|
||||||
public:
|
public:
|
||||||
Box();
|
Box();
|
||||||
Box(uint32_t BoxType);
|
Box(char* boxType);
|
||||||
Box(uint8_t * Content, uint32_t length);
|
Box(std::string & newData);
|
||||||
~Box();
|
~Box();
|
||||||
void SetBoxType(uint32_t BoxType);
|
std::string getType();
|
||||||
uint32_t GetBoxType();
|
bool isType( char* boxType );
|
||||||
void SetPayload(uint32_t Size, uint8_t * Data, uint32_t Index = 0);
|
bool read(std::string & newData);
|
||||||
uint32_t GetPayloadSize();
|
size_t boxedSize();
|
||||||
uint8_t * GetPayload();
|
size_t payloadSize();
|
||||||
uint8_t * GetPayload(uint32_t Index, uint32_t & Size);
|
std::string & asBox();
|
||||||
uint32_t GetBoxedDataSize();
|
void clear();
|
||||||
uint8_t * GetBoxedData( );
|
|
||||||
static uint8_t * uint32_to_uint8( uint32_t data );
|
|
||||||
static uint8_t * uint16_to_uint8( uint16_t data );
|
|
||||||
static uint8_t * uint8_to_uint8( uint8_t data );
|
|
||||||
void ResetPayload( );
|
|
||||||
std::string toPrettyString(int indent = 0);
|
std::string toPrettyString(int indent = 0);
|
||||||
private:
|
protected:
|
||||||
uint8_t * Payload;
|
void setInt8( char data, size_t index = 0);
|
||||||
uint32_t PayloadSize;
|
void setInt16( short data, size_t index = 0);
|
||||||
|
void setInt32( long data, size_t index = 0);
|
||||||
|
void setInt64( long long int data, size_t index = 0);
|
||||||
|
void setString(std::string data, size_t index = 0);
|
||||||
|
void setString(char* data, size_t size, size_t index = 0);
|
||||||
|
std::string data;
|
||||||
};//Box Class
|
};//Box Class
|
||||||
|
|
||||||
|
//Tot hier rewritten
|
||||||
|
|
||||||
struct abst_serverentry {
|
struct abst_serverentry {
|
||||||
std::string ServerBaseUrl;
|
std::string ServerBaseUrl;
|
||||||
};//abst_serverentry
|
};//abst_serverentry
|
||||||
|
|
Loading…
Add table
Reference in a new issue