diff --git a/MP4/box_mfhd.cpp b/MP4/box_mfhd.cpp new file mode 100644 index 00000000..79639505 --- /dev/null +++ b/MP4/box_mfhd.cpp @@ -0,0 +1,27 @@ +#include "box_mfhd.h" + +Box_mfhd::Box_mfhd( ) { + Container = new Box( 0x6D666864 ); + SetDefaults( ); + SetReserved( ) +} + +Box_mfhd::~Box_mfhd() { + delete Container; +} + +Box * Box_mfhd::GetBox() { + return Container; +} + +void Box_mfhd::SetDefaults( ) { + SetSequenceNumber( ); +} + +void Box_mfhd::SetDefaults( ) { + Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0)); +} + +void SetSequenceNumber( uint32_t SequenceNumber ); + Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(SequenceNumber),4); +} diff --git a/MP4/box_mfhd.h b/MP4/box_mfhd.h new file mode 100644 index 00000000..f33bef0c --- /dev/null +++ b/MP4/box_mfhd.h @@ -0,0 +1,14 @@ +#include "box.h" + +class Box_mfhd { + public: + Box_mfhd( ); + ~Box_mfhd(); + Box * GetBox(); + void SetSequenceNumber( uint32_t SequenceNumber = 1 ); + private: + void SetDefaults( ); + void SetReserved( ); + Box * Container; +};//Box_ftyp Class +