[Stable] Compiling version of all boxes
This commit is contained in:
parent
ff93aedb98
commit
17b3de7791
5 changed files with 31 additions and 26 deletions
|
@ -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)
|
||||
OUT = Boxtest
|
||||
INCLUDES =
|
||||
|
|
|
@ -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_dinf.h"
|
||||
#include "box_dref.h"
|
||||
|
@ -5,28 +10,28 @@
|
|||
#include "box_ftyp.h"
|
||||
#include "box_hdlr.h"
|
||||
#include "box_hmhd.h"
|
||||
#include "box_mdat.h"
|
||||
#include "box_mdhd.h"
|
||||
#include "box_mdia.h"
|
||||
#include "box_mfhd.h"
|
||||
#include "box_minf.h"
|
||||
#include "box_moof.h"
|
||||
#include "box_moov.h"
|
||||
#include "box_mvex.h"
|
||||
#include "box_mvhd.h"
|
||||
#include "box_nmhd.h"
|
||||
#include "box_rtmp.h"
|
||||
#include "box_smhd.h"
|
||||
#include "box_stbl.h"
|
||||
#include "box_stco.h"
|
||||
#include "box_stsc.h"
|
||||
#include "box_stsd.h"
|
||||
#include "box_stts.h"
|
||||
#include "box_tfhd.h"
|
||||
#include "box_tkhd.h"
|
||||
#include "box_traf.h"
|
||||
#include "box_trak.h"
|
||||
#include "box_trex.h"
|
||||
#include "box_trun.h"
|
||||
#include "box_url.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"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Box_mfhd::Box_mfhd( ) {
|
||||
Container = new Box( 0x6D666864 );
|
||||
SetDefaults( );
|
||||
SetReserved( )
|
||||
SetReserved( );
|
||||
}
|
||||
|
||||
Box_mfhd::~Box_mfhd() {
|
||||
|
@ -18,10 +18,10 @@ void Box_mfhd::SetDefaults( ) {
|
|||
SetSequenceNumber( );
|
||||
}
|
||||
|
||||
void Box_mfhd::SetDefaults( ) {
|
||||
void Box_mfhd::SetReserved( ) {
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -13,19 +13,19 @@ Box * Box_tfhd::GetBox() {
|
|||
return Container;
|
||||
}
|
||||
|
||||
void Box_tfhd::SetTrackID( uint32_t TrackID = 0 ) {
|
||||
curTrackID = TrackID
|
||||
void Box_tfhd::SetTrackID( uint32_t TrackID ) {
|
||||
curTrackID = TrackID;
|
||||
}
|
||||
|
||||
void Box_tfhd::SetBaseDataOffset( uint32_t Offset = 0 ) {
|
||||
void Box_tfhd::SetBaseDataOffset( uint32_t Offset ) {
|
||||
curBaseDataOffset = Offset;
|
||||
}
|
||||
|
||||
void Box_tfhd::SetSampleDescriptionIndex( uint32_t Index = 0 ) {
|
||||
curSampleDescriptionIndex = Index );
|
||||
void Box_tfhd::SetSampleDescriptionIndex( uint32_t Index ) {
|
||||
curSampleDescriptionIndex = Index;
|
||||
}
|
||||
|
||||
void Box_tfhd::SetDefaultSampleDuration( uint32_t Duration = 0 ) {
|
||||
void Box_tfhd::SetDefaultSampleDuration( uint32_t Duration ) {
|
||||
curDefaultSampleDuration = Duration;
|
||||
}
|
||||
|
||||
|
@ -35,9 +35,9 @@ void Box_tfhd::SetDefaultSampleSize( uint32_t Size ) {
|
|||
|
||||
void Box_tfhd::WriteContent( ) {
|
||||
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(curTrackId),4);
|
||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curTrackID),4);
|
||||
curoffset = 8;
|
||||
if( curBaseDataOffset ) {
|
||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0),curoffset);
|
||||
|
@ -55,7 +55,7 @@ void Box_tfhd::WriteContent( ) {
|
|||
if( curDefaultSampleSize ) {
|
||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curDefaultSampleSize),curoffset);
|
||||
curoffset += 8;
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
void Box_tfhd::SetDefaults( ) {
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
struct trun_sampleinformationstructure {
|
||||
uint32_t SampleDuration;
|
||||
uint32_t SampleSize;
|
||||
}
|
||||
};
|
||||
|
||||
class Box_tfhd {
|
||||
class Box_trun {
|
||||
public:
|
||||
Box_tfhd( );
|
||||
~Box_tfhd();
|
||||
Box_trun( );
|
||||
~Box_trun();
|
||||
Box * GetBox();
|
||||
void SetDataOffset( uint32_t Offset = 0 );
|
||||
void AddSampleInformation( uint32_t SampleDuration = 0, uint32_t SampleSize = 0, uint32_t Offset = 0 );
|
||||
|
|
Loading…
Add table
Reference in a new issue