Interface - Adding functionality for getting the compelete filedata
This commit is contained in:
parent
71aa481017
commit
b0f74fbd9e
2 changed files with 14 additions and 2 deletions
|
@ -114,3 +114,14 @@ void Interface::link( ) {
|
||||||
moov->AddContent(trak_vide->GetBox(),1);
|
moov->AddContent(trak_vide->GetBox(),1);
|
||||||
moov->AddContent(mvhd->GetBox());
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -5,11 +5,13 @@ class Interface {
|
||||||
Interface();
|
Interface();
|
||||||
~Interface();
|
~Interface();
|
||||||
void link();
|
void link();
|
||||||
|
uint32_t GetContentSize();
|
||||||
|
uint8_t * GetContents();
|
||||||
private:
|
private:
|
||||||
|
void UpdateContents();
|
||||||
Box_ftyp * ftyp;
|
Box_ftyp * ftyp;
|
||||||
Box_moov * moov;
|
Box_moov * moov;
|
||||||
Box_mvhd * mvhd;
|
Box_mvhd * mvhd;
|
||||||
|
|
||||||
Box_trak * trak_vide;
|
Box_trak * trak_vide;
|
||||||
Box_tkhd * tkhd_vide;
|
Box_tkhd * tkhd_vide;
|
||||||
Box_mdia * mdia_vide;
|
Box_mdia * mdia_vide;
|
||||||
|
@ -26,7 +28,6 @@ class Interface {
|
||||||
Box_stco * stco_vide;
|
Box_stco * stco_vide;
|
||||||
Box_stsd * stsd_vide;
|
Box_stsd * stsd_vide;
|
||||||
Box_avcC * avcC_vide;
|
Box_avcC * avcC_vide;
|
||||||
|
|
||||||
Box_trak * trak_soun;
|
Box_trak * trak_soun;
|
||||||
Box_tkhd * tkhd_soun;
|
Box_tkhd * tkhd_soun;
|
||||||
Box_mdia * mdia_soun;
|
Box_mdia * mdia_soun;
|
||||||
|
|
Loading…
Add table
Reference in a new issue