Bijna klaar!
This commit is contained in:
parent
5ca7a72b86
commit
a3fd7a5a43
84 changed files with 879 additions and 969 deletions
43
util/MP4/box_dinf.cpp
Normal file
43
util/MP4/box_dinf.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include "box.cpp"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
class Box_dinf {
|
||||
public:
|
||||
Box_dinf();
|
||||
~Box_dinf();
|
||||
Box * GetBox();
|
||||
void AddContent( Box * newcontent );
|
||||
void WriteContent( );
|
||||
private:
|
||||
Box * Container;
|
||||
|
||||
Box * Content;
|
||||
};//Box_ftyp Class
|
||||
|
||||
Box_dinf::Box_dinf( ) {
|
||||
Container = new Box( 0x64696E66 );
|
||||
}
|
||||
|
||||
Box_dinf::~Box_dinf() {
|
||||
delete Container;
|
||||
}
|
||||
|
||||
Box * Box_dinf::GetBox() {
|
||||
return Container;
|
||||
}
|
||||
|
||||
void Box_dinf::AddContent( Box * newcontent ) {
|
||||
if(Content) {
|
||||
delete Content;
|
||||
Content = NULL;
|
||||
}
|
||||
Content = newcontent;
|
||||
}
|
||||
|
||||
void Box_dinf::WriteContent( ) {
|
||||
Container->ResetPayload( );
|
||||
std::string serializedbox = "";
|
||||
serializedbox.append((char*)Content->GetBoxedData(),Content->GetBoxedDataSize());
|
||||
Container->SetPayload((uint32_t)serializedbox.size(),(uint8_t*)serializedbox.c_str());
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue