diff --git a/MP4/interface.cpp b/MP4/interface.cpp index f1381cf4..c09f5000 100644 --- a/MP4/interface.cpp +++ b/MP4/interface.cpp @@ -114,3 +114,14 @@ void Interface::link( ) { moov->AddContent(trak_vide->GetBox(),1); moov->AddContent(mvhd->GetBox()); } + +uint32_t Interface::GetContentSize( ) { + return ftyp->GetBoxedDataSize( ) + moov->GetBoxedDataSize( ); +} + +uint8_t * Interface::GetContents( ) { + uint8_t * Result = new uint8_t[GetContentSize( )]; + memcpy(Result,ftyp->GetBoxedData( ),ftyp->GetBoxedDataSize( )); + memcpy(&Result[ftyp->GetBoxedDataSize( )],moov->GetBoxedData( ),moov->GetBoxedDataSize( )); + return Result; +} diff --git a/MP4/interface.h b/MP4/interface.h index 5607e8da..0125ddf4 100644 --- a/MP4/interface.h +++ b/MP4/interface.h @@ -5,11 +5,13 @@ class Interface { Interface(); ~Interface(); void link(); + uint32_t GetContentSize(); + uint8_t * GetContents(); private: + void UpdateContents(); Box_ftyp * ftyp; Box_moov * moov; Box_mvhd * mvhd; - Box_trak * trak_vide; Box_tkhd * tkhd_vide; Box_mdia * mdia_vide; @@ -26,7 +28,6 @@ class Interface { Box_stco * stco_vide; Box_stsd * stsd_vide; Box_avcC * avcC_vide; - Box_trak * trak_soun; Box_tkhd * tkhd_soun; Box_mdia * mdia_soun;