Default values added

This commit is contained in:
Erik Zandvliet 2011-01-22 20:36:28 +01:00
parent 755fcd00c6
commit c633734d07
8 changed files with 28 additions and 17 deletions

View file

@ -55,7 +55,7 @@ void Box_avcC::SetReserved( ) {
}
void Box_avcC::SetDefaults( ) {
SetResolution ( );
SetFrameCount ( );
SetDepth ( );
SetFrameCount ( );
SetResolution ( );
}

View file

@ -6,15 +6,16 @@ class Box_avcC {
Box_avcC( );
~Box_avcC();
Box * GetBox();
void SetReserved( );
void SetDataReferenceIndex( uint16_t DataReferenceIndex );
void SetDimensions ( uint16_t Width, uint16_t Height );
void SetDataReferenceIndex( uint16_t DataReferenceIndex = 0 );
void SetDimensions ( uint16_t Width = 0, uint16_t Height = 0);
void SetResolution ( uint32_t Horizontal = 0x00480000, uint32_t Vertical = 0x00480000 );
void SetFrameCount ( uint16_t FrameCount = 1 );
void SetCompressorName ( std::string CompressorName );
void SetCompressorName ( std::string CompressorName = "");
void SetDepth ( uint16_t Depth = 0x0018 );
void SetDefaults( );
private:
Box * Container;
void SetReserved( );
void SetDefaults( );
};//Box_ftyp Class

View file

@ -1,9 +1,7 @@
#include "box_ftyp.h"
Box_ftyp::Box_ftyp( uint32_t MajorBrand, uint32_t MinorBrand ) {
Box_ftyp::Box_ftyp( ) {
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() {
@ -21,3 +19,8 @@ void Box_ftyp::SetMajorBrand( uint32_t MajorBrand ) {
void Box_ftyp::SetMinorBrand( uint32_t MinorBrand ) {
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(MinorBrand),4);
}
void Box_ftyp::SetDefaults( ) {
SetMinorBrand( );
SetMajorBrand( );
}

View file

@ -2,12 +2,13 @@
class Box_ftyp {
public:
Box_ftyp( uint32_t MajorBrand = 0x66347620, uint32_t MinorBrand = 0x1);
Box_ftyp( );
~Box_ftyp();
Box * GetBox();
void SetMajorBrand( uint32_t MajorBrand );
void SetMinorBrand( uint32_t MinorBrand );
void SetMajorBrand( uint32_t MajorBrand = 0x66347620 );
void SetMinorBrand( uint32_t MinorBrand = 0x1 );
private:
void SetDefaults( );
Box * Container;
};//Box_ftyp Class

View file

@ -37,3 +37,8 @@ void Box_hdlr::SetName ( std::string Name ) {
SetHandlerType(0);
Container->SetPayload((uint32_t)strlen(tmp)+1,(uint8_t*)tmp,24);
}
void Box_hdlr::SetDefaults( ) {
SetName( );
SetHandlerType( );
}

View file

@ -6,11 +6,12 @@ class Box_hdlr {
Box_hdlr( );
~Box_hdlr();
Box * GetBox();
void SetHandlerType( uint32_t HandlerType );
void SetName ( std::string Name );
void SetHandlerType( uint32_t HandlerType = 0 );
void SetName ( std::string Name = "" );
private:
Box * Container;
void SetReserved( );
void SetDefaults( );
uint32_t CurrentHandlerType;
};//Box_ftyp Class

View file

@ -7,12 +7,12 @@ class Box_stco {
Box_stco( );
~Box_stco();
Box * GetBox();
void SetReserved( );
void AddOffset( uint32_t DataOffset, uint32_t Offset = 0 );
private:
Box * Container;
void WriteOffsets( );
void SetReserved( );
std::vector<uint32_t> Offsets;
};//Box_ftyp Class

View file

@ -14,7 +14,7 @@ class Box_stsc {
~Box_stsc();
Box * GetBox();
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:
Box * Container;