[Stable] Compiling version of all boxes

This commit is contained in:
Erik Zandvliet 2011-02-08 21:00:46 +01:00
parent ff93aedb98
commit 17b3de7791
5 changed files with 31 additions and 26 deletions

View file

@ -1,4 +1,4 @@
SRC = box_avcC.cpp box.cpp box_dinf.cpp box_dref.cpp box_esds.cpp box_ftyp.cpp box_hdlr.cpp box_hmhd.cpp box_mdhd.cpp box_mdia.cpp box_minf.cpp box_moov.cpp box_mvhd.cpp box_nmhd.cpp box_smhd.cpp box_stbl.cpp box_stco.cpp box_stsc.cpp box_stsd.cpp box_stts.cpp box_tkhd.cpp box_trak.cpp box_url.cpp box_vmhd.cpp main.cpp interface.cpp box_mdat.cpp box_rtmp.cpp box_amhp.cpp box_mvex.cpp box_trex.cpp box_afra.cpp box_abst.cpp box_asrt.cpp box_afrt.cpp SRC = box_abst.cpp box_afra.cpp box_afrt.cpp box_amhp.cpp box_asrt.cpp box_avcC.cpp box.cpp box_dinf.cpp box_dref.cpp box_esds.cpp box_ftyp.cpp box_hdlr.cpp box_hmhd.cpp box_mdat.cpp box_mdhd.cpp box_mdia.cpp box_mfhd.cpp box_minf.cpp box_moof.cpp box_moov.cpp box_mvex.cpp box_mvhd.cpp box_nmhd.cpp box_rtmp.cpp box_smhd.cpp box_stbl.cpp box_stco.cpp box_stsc.cpp box_stsd.cpp box_stts.cpp box_tfhd.cpp box_tkhd.cpp box_traf.cpp box_trak.cpp box_trex.cpp box_trun.cpp box_url.cpp box_vmhd.cpp interface.cpp main.cpp
OBJ = $(SRC:.cpp=.o) OBJ = $(SRC:.cpp=.o)
OUT = Boxtest OUT = Boxtest
INCLUDES = INCLUDES =

View file

@ -1,3 +1,8 @@
#include "box_abst.h"
#include "box_afra.h"
#include "box_afrt.h"
#include "box_amhp.h"
#include "box_asrt.h"
#include "box_avcC.h" #include "box_avcC.h"
#include "box_dinf.h" #include "box_dinf.h"
#include "box_dref.h" #include "box_dref.h"
@ -5,28 +10,28 @@
#include "box_ftyp.h" #include "box_ftyp.h"
#include "box_hdlr.h" #include "box_hdlr.h"
#include "box_hmhd.h" #include "box_hmhd.h"
#include "box_mdat.h"
#include "box_mdhd.h" #include "box_mdhd.h"
#include "box_mdia.h" #include "box_mdia.h"
#include "box_mfhd.h"
#include "box_minf.h" #include "box_minf.h"
#include "box_moof.h"
#include "box_moov.h" #include "box_moov.h"
#include "box_mvex.h"
#include "box_mvhd.h" #include "box_mvhd.h"
#include "box_nmhd.h" #include "box_nmhd.h"
#include "box_rtmp.h"
#include "box_smhd.h" #include "box_smhd.h"
#include "box_stbl.h" #include "box_stbl.h"
#include "box_stco.h" #include "box_stco.h"
#include "box_stsc.h" #include "box_stsc.h"
#include "box_stsd.h" #include "box_stsd.h"
#include "box_stts.h" #include "box_stts.h"
#include "box_tfhd.h"
#include "box_tkhd.h" #include "box_tkhd.h"
#include "box_traf.h"
#include "box_trak.h" #include "box_trak.h"
#include "box_trex.h"
#include "box_trun.h"
#include "box_url.h" #include "box_url.h"
#include "box_vmhd.h" #include "box_vmhd.h"
#include "box_mdat.h"
#include "box_rtmp.h"
#include "box_amhp.h"
#include "box_mvex.h"
#include "box_trex.h"
#include "box_afra.h"
#include "box_abst.h"
#include "box_asrt.h"
#include "box_afrt.h"

View file

@ -3,7 +3,7 @@
Box_mfhd::Box_mfhd( ) { Box_mfhd::Box_mfhd( ) {
Container = new Box( 0x6D666864 ); Container = new Box( 0x6D666864 );
SetDefaults( ); SetDefaults( );
SetReserved( ) SetReserved( );
} }
Box_mfhd::~Box_mfhd() { Box_mfhd::~Box_mfhd() {
@ -18,10 +18,10 @@ void Box_mfhd::SetDefaults( ) {
SetSequenceNumber( ); SetSequenceNumber( );
} }
void Box_mfhd::SetDefaults( ) { void Box_mfhd::SetReserved( ) {
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0)); Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0));
} }
void SetSequenceNumber( uint32_t SequenceNumber ); void Box_mfhd::SetSequenceNumber( uint32_t SequenceNumber ) {
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(SequenceNumber),4); Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(SequenceNumber),4);
} }

View file

@ -13,19 +13,19 @@ Box * Box_tfhd::GetBox() {
return Container; return Container;
} }
void Box_tfhd::SetTrackID( uint32_t TrackID = 0 ) { void Box_tfhd::SetTrackID( uint32_t TrackID ) {
curTrackID = TrackID curTrackID = TrackID;
} }
void Box_tfhd::SetBaseDataOffset( uint32_t Offset = 0 ) { void Box_tfhd::SetBaseDataOffset( uint32_t Offset ) {
curBaseDataOffset = Offset; curBaseDataOffset = Offset;
} }
void Box_tfhd::SetSampleDescriptionIndex( uint32_t Index = 0 ) { void Box_tfhd::SetSampleDescriptionIndex( uint32_t Index ) {
curSampleDescriptionIndex = Index ); curSampleDescriptionIndex = Index;
} }
void Box_tfhd::SetDefaultSampleDuration( uint32_t Duration = 0 ) { void Box_tfhd::SetDefaultSampleDuration( uint32_t Duration ) {
curDefaultSampleDuration = Duration; curDefaultSampleDuration = Duration;
} }
@ -35,9 +35,9 @@ void Box_tfhd::SetDefaultSampleSize( uint32_t Size ) {
void Box_tfhd::WriteContent( ) { void Box_tfhd::WriteContent( ) {
uint32_t curoffset; uint32_t curoffset;
uint32_t flags = 0 & ( curBaseDataOffset ? 0x1 : 0 ) & ( curSampleDesciptionIndex ? 0x2 : 0 ) & ( curDefaultSampleDuration ? 0x8 : 0 ) & ( curDefaultSampleSize ? 0x10 : 0 ); uint32_t flags = 0 & ( curBaseDataOffset ? 0x1 : 0 ) & ( curSampleDescriptionIndex ? 0x2 : 0 ) & ( curDefaultSampleDuration ? 0x8 : 0 ) & ( curDefaultSampleSize ? 0x10 : 0 );
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(flags)); Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(flags));
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curTrackId),4); Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curTrackID),4);
curoffset = 8; curoffset = 8;
if( curBaseDataOffset ) { if( curBaseDataOffset ) {
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0),curoffset); Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0),curoffset);
@ -55,7 +55,7 @@ void Box_tfhd::WriteContent( ) {
if( curDefaultSampleSize ) { if( curDefaultSampleSize ) {
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curDefaultSampleSize),curoffset); Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curDefaultSampleSize),curoffset);
curoffset += 8; curoffset += 8;
] }
} }
void Box_tfhd::SetDefaults( ) { void Box_tfhd::SetDefaults( ) {

View file

@ -4,12 +4,12 @@
struct trun_sampleinformationstructure { struct trun_sampleinformationstructure {
uint32_t SampleDuration; uint32_t SampleDuration;
uint32_t SampleSize; uint32_t SampleSize;
} };
class Box_tfhd { class Box_trun {
public: public:
Box_tfhd( ); Box_trun( );
~Box_tfhd(); ~Box_trun();
Box * GetBox(); Box * GetBox();
void SetDataOffset( uint32_t Offset = 0 ); void SetDataOffset( uint32_t Offset = 0 );
void AddSampleInformation( uint32_t SampleDuration = 0, uint32_t SampleSize = 0, uint32_t Offset = 0 ); void AddSampleInformation( uint32_t SampleDuration = 0, uint32_t SampleSize = 0, uint32_t Offset = 0 );