Default values added
This commit is contained in:
parent
755fcd00c6
commit
c633734d07
8 changed files with 28 additions and 17 deletions
|
@ -55,7 +55,7 @@ void Box_avcC::SetReserved( ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Box_avcC::SetDefaults( ) {
|
void Box_avcC::SetDefaults( ) {
|
||||||
SetResolution ( );
|
|
||||||
SetFrameCount ( );
|
|
||||||
SetDepth ( );
|
SetDepth ( );
|
||||||
|
SetFrameCount ( );
|
||||||
|
SetResolution ( );
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,16 @@ class Box_avcC {
|
||||||
Box_avcC( );
|
Box_avcC( );
|
||||||
~Box_avcC();
|
~Box_avcC();
|
||||||
Box * GetBox();
|
Box * GetBox();
|
||||||
void SetReserved( );
|
void SetDataReferenceIndex( uint16_t DataReferenceIndex = 0 );
|
||||||
void SetDataReferenceIndex( uint16_t DataReferenceIndex );
|
void SetDimensions ( uint16_t Width = 0, uint16_t Height = 0);
|
||||||
void SetDimensions ( uint16_t Width, uint16_t Height );
|
|
||||||
void SetResolution ( uint32_t Horizontal = 0x00480000, uint32_t Vertical = 0x00480000 );
|
void SetResolution ( uint32_t Horizontal = 0x00480000, uint32_t Vertical = 0x00480000 );
|
||||||
void SetFrameCount ( uint16_t FrameCount = 1 );
|
void SetFrameCount ( uint16_t FrameCount = 1 );
|
||||||
void SetCompressorName ( std::string CompressorName );
|
void SetCompressorName ( std::string CompressorName = "");
|
||||||
void SetDepth ( uint16_t Depth = 0x0018 );
|
void SetDepth ( uint16_t Depth = 0x0018 );
|
||||||
void SetDefaults( );
|
|
||||||
private:
|
private:
|
||||||
Box * Container;
|
Box * Container;
|
||||||
|
|
||||||
|
void SetReserved( );
|
||||||
|
void SetDefaults( );
|
||||||
};//Box_ftyp Class
|
};//Box_ftyp Class
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
#include "box_ftyp.h"
|
#include "box_ftyp.h"
|
||||||
|
|
||||||
Box_ftyp::Box_ftyp( uint32_t MajorBrand, uint32_t MinorBrand ) {
|
Box_ftyp::Box_ftyp( ) {
|
||||||
Container = new Box( 0x66747970 );
|
Container = new Box( 0x66747970 );
|
||||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(MajorBrand));
|
|
||||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(MinorBrand),4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Box_ftyp::~Box_ftyp() {
|
Box_ftyp::~Box_ftyp() {
|
||||||
|
@ -21,3 +19,8 @@ void Box_ftyp::SetMajorBrand( uint32_t MajorBrand ) {
|
||||||
void Box_ftyp::SetMinorBrand( uint32_t MinorBrand ) {
|
void Box_ftyp::SetMinorBrand( uint32_t MinorBrand ) {
|
||||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(MinorBrand),4);
|
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(MinorBrand),4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Box_ftyp::SetDefaults( ) {
|
||||||
|
SetMinorBrand( );
|
||||||
|
SetMajorBrand( );
|
||||||
|
}
|
||||||
|
|
|
@ -2,12 +2,13 @@
|
||||||
|
|
||||||
class Box_ftyp {
|
class Box_ftyp {
|
||||||
public:
|
public:
|
||||||
Box_ftyp( uint32_t MajorBrand = 0x66347620, uint32_t MinorBrand = 0x1);
|
Box_ftyp( );
|
||||||
~Box_ftyp();
|
~Box_ftyp();
|
||||||
Box * GetBox();
|
Box * GetBox();
|
||||||
void SetMajorBrand( uint32_t MajorBrand );
|
void SetMajorBrand( uint32_t MajorBrand = 0x66347620 );
|
||||||
void SetMinorBrand( uint32_t MinorBrand );
|
void SetMinorBrand( uint32_t MinorBrand = 0x1 );
|
||||||
private:
|
private:
|
||||||
|
void SetDefaults( );
|
||||||
Box * Container;
|
Box * Container;
|
||||||
};//Box_ftyp Class
|
};//Box_ftyp Class
|
||||||
|
|
||||||
|
|
|
@ -37,3 +37,8 @@ void Box_hdlr::SetName ( std::string Name ) {
|
||||||
SetHandlerType(0);
|
SetHandlerType(0);
|
||||||
Container->SetPayload((uint32_t)strlen(tmp)+1,(uint8_t*)tmp,24);
|
Container->SetPayload((uint32_t)strlen(tmp)+1,(uint8_t*)tmp,24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Box_hdlr::SetDefaults( ) {
|
||||||
|
SetName( );
|
||||||
|
SetHandlerType( );
|
||||||
|
}
|
||||||
|
|
|
@ -6,11 +6,12 @@ class Box_hdlr {
|
||||||
Box_hdlr( );
|
Box_hdlr( );
|
||||||
~Box_hdlr();
|
~Box_hdlr();
|
||||||
Box * GetBox();
|
Box * GetBox();
|
||||||
void SetHandlerType( uint32_t HandlerType );
|
void SetHandlerType( uint32_t HandlerType = 0 );
|
||||||
void SetName ( std::string Name );
|
void SetName ( std::string Name = "" );
|
||||||
private:
|
private:
|
||||||
Box * Container;
|
Box * Container;
|
||||||
void SetReserved( );
|
void SetReserved( );
|
||||||
|
void SetDefaults( );
|
||||||
uint32_t CurrentHandlerType;
|
uint32_t CurrentHandlerType;
|
||||||
};//Box_ftyp Class
|
};//Box_ftyp Class
|
||||||
|
|
||||||
|
|
|
@ -7,12 +7,12 @@ class Box_stco {
|
||||||
Box_stco( );
|
Box_stco( );
|
||||||
~Box_stco();
|
~Box_stco();
|
||||||
Box * GetBox();
|
Box * GetBox();
|
||||||
void SetReserved( );
|
|
||||||
void AddOffset( uint32_t DataOffset, uint32_t Offset = 0 );
|
void AddOffset( uint32_t DataOffset, uint32_t Offset = 0 );
|
||||||
private:
|
private:
|
||||||
Box * Container;
|
Box * Container;
|
||||||
|
|
||||||
void WriteOffsets( );
|
void WriteOffsets( );
|
||||||
|
void SetReserved( );
|
||||||
std::vector<uint32_t> Offsets;
|
std::vector<uint32_t> Offsets;
|
||||||
};//Box_ftyp Class
|
};//Box_ftyp Class
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ class Box_stsc {
|
||||||
~Box_stsc();
|
~Box_stsc();
|
||||||
Box * GetBox();
|
Box * GetBox();
|
||||||
void SetReserved( );
|
void SetReserved( );
|
||||||
void AddEntry( uint32_t FirstChunk, uint32_t SamplesPerChunk, uint32_t SampleDescIndex, uint32_t Offset = 0 );
|
void AddEntry( uint32_t FirstChunk = 0, uint32_t SamplesPerChunk = 0, uint32_t SampleDescIndex = 0, uint32_t Offset = 0 );
|
||||||
private:
|
private:
|
||||||
Box * Container;
|
Box * Container;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue