[Compile-able version]
This commit is contained in:
		
							parent
							
								
									3ae7eb7c82
								
							
						
					
					
						commit
						01144b2db9
					
				
					 5 changed files with 14 additions and 11 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 | ||||
| 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 | ||||
| OBJ = $(SRC:.cpp=.o) | ||||
| OUT = Boxtest | ||||
| INCLUDES =  | ||||
|  |  | |||
|  | @ -33,7 +33,7 @@ void Box_abst::SetTimeScale( uint32_t Scale ) { | |||
| } | ||||
| 
 | ||||
| void Box_abst::SetMediaTime( uint32_t Time ) { | ||||
|   curMediaTime = Time; | ||||
|   curMediatime = Time; | ||||
| } | ||||
| 
 | ||||
| void Box_abst::SetSMPTE( uint32_t Smpte ) { | ||||
|  | @ -99,7 +99,7 @@ void Box_abst::SetDefaults( ) { | |||
|   SetMetaData( ); | ||||
| } | ||||
| 
 | ||||
| void SetReserved( ) { | ||||
| void Box_abst::SetReserved( ) { | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0)); | ||||
| } | ||||
| 
 | ||||
|  | @ -128,14 +128,14 @@ void Box_abst::WriteContent( ) { | |||
|     current=SegmentRunTables[i]; | ||||
|     if( current ) { | ||||
|       SegmentAmount ++; | ||||
|       serializedSegments.append((char*)current->GetBoxedata(),current->GetBoxedDataSize()); | ||||
|       serializedSegments.append((char*)current->GetBoxedData(),current->GetBoxedDataSize()); | ||||
|     } | ||||
|   } | ||||
|   for( uint32_t i = 0; i < FragmentRunTables.size(); i++ ) { | ||||
|     current=FragmentRunTables[i]; | ||||
|     if( current ) { | ||||
|       FragmentAmount ++; | ||||
|       serializedFragments.append((char*)current->GetBoxedata(),current->GetBoxedDataSize()); | ||||
|       serializedFragments.append((char*)current->GetBoxedData(),current->GetBoxedDataSize()); | ||||
|     } | ||||
|   } | ||||
|   uint32_t OffsetServerEntryCount = 29 + curMovieIdentifier.size() + 1; | ||||
|  | @ -146,13 +146,13 @@ void Box_abst::WriteContent( ) { | |||
|   uint32_t OffsetFragmentRuntableCount = OffsetSegmentRuntableCount + 4 + serializedSegments.size(); | ||||
| 
 | ||||
|   temp[0] = 0 & ( curProfile << 6 ) & ( (uint8_t)isLive << 7 ) & ( (uint8_t)isUpdate << 7 ); | ||||
|    | ||||
| 
 | ||||
|   Container->SetPayload((uint32_t)serializedFragments.size(),(uint8_t*)serializedFragments.c_str(),OffsetFragmentRuntableCount+4); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(FragmentAmount),OffsetFragmentRuntableCount); | ||||
|   Container->SetPayload((uint32_t)serializedSegments.size(),(uint8_t*)serializedSegments.c_str(),OffsetSegmentRuntableCount+4); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(SegmentAmount),OffsetSegmentRuntableCount); | ||||
|   Container->SetPauload((uint32_t)curMetaData.size()+1,(uint8_t*)curMetaData.c_str(),OffsetMetaData); | ||||
|   Container->SetPayload((uint32_t)curDRM.size()+1,(uint8_t*)curDRM.c_str(),OffsetDrmData);   | ||||
|   Container->SetPayload((uint32_t)curMetaData.size()+1,(uint8_t*)curMetaData.c_str(),OffsetMetaData); | ||||
|   Container->SetPayload((uint32_t)curDRM.size()+1,(uint8_t*)curDRM.c_str(),OffsetDrmData); | ||||
|   Container->SetPayload((uint32_t)serializedQualities.size(),(uint8_t*)serializedQualities.c_str(),OffsetQualityEntryCount+4); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(Qualities.size()),OffsetQualityEntryCount); | ||||
|   Container->SetPayload((uint32_t)serializedServers.size(),(uint8_t*)serializedServers.c_str(),OffsetServerEntryCount+4); | ||||
|  | @ -160,7 +160,7 @@ void Box_abst::WriteContent( ) { | |||
|   Container->SetPayload((uint32_t)curMovieIdentifier.size()+1,(uint8_t*)curMovieIdentifier.c_str(),29);//+1 for \0-terminated string...
 | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curSMPTE),25); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0),21); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curMediaTime),17); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curMediatime),17); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0),13); | ||||
|   Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(curTimeScale),9); | ||||
|   Container->SetPayload((uint32_t)1,temp,8); | ||||
|  |  | |||
|  | @ -29,6 +29,7 @@ class Box_abst { | |||
|     void AddQualityEntry( std::string Quality = "", uint32_t Offset = 0 ); | ||||
|     void AddSegmentRunTable( Box * newSegment, uint32_t Offset = 0 ); | ||||
|     void AddFragmentRunTable( Box * newFragment, uint32_t Offset = 0 ); | ||||
|     void WriteContent( ); | ||||
|   private: | ||||
|     void SetDefaults( ); | ||||
|     void SetReserved( ); | ||||
|  |  | |||
|  | @ -39,8 +39,8 @@ void Box_asrt::WriteContent( ) { | |||
|   std::string serializedQualities = ""; | ||||
|   Container->ResetPayload( ); | ||||
| 
 | ||||
|   for( uint32_t i = 0; i < Qualities.size(); i++ ) { | ||||
|     serializedQualities.append(Qualities[i].QualityModifier.c_str()); | ||||
|   for( uint32_t i = 0; i < QualitySegmentUrlModifiers.size(); i++ ) { | ||||
|     serializedQualities.append(QualitySegmentUrlModifiers[i].c_str()); | ||||
|     serializedQualities += '\0'; | ||||
|   } | ||||
| 
 | ||||
|  |  | |||
|  | @ -27,3 +27,5 @@ | |||
| #include "box_mvex.h" | ||||
| #include "box_trex.h" | ||||
| #include "box_afra.h" | ||||
| #include "box_asrt.h" | ||||
| #include "box_abst.h" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Erik Zandvliet
						Erik Zandvliet