avcC box namespace fixed
This commit is contained in:
parent
525a651b70
commit
c7bd07d660
2 changed files with 16 additions and 16 deletions
|
@ -1,49 +1,49 @@
|
|||
#include "box_h264.h"
|
||||
#include "box_avcC.h"
|
||||
|
||||
Box_h264::Box_h264( ) {
|
||||
Container = new Box( 0x68323634 );
|
||||
Box_avcC::Box_avcC( ) {
|
||||
Container = new Box( 0x61766343 );
|
||||
SetReserved();
|
||||
SetDefaults();
|
||||
}
|
||||
|
||||
Box_h264::~Box_h264() {
|
||||
Box_avcC::~Box_avcC() {
|
||||
delete Container;
|
||||
}
|
||||
|
||||
Box * Box_h264::GetBox() {
|
||||
Box * Box_avcC::GetBox() {
|
||||
return Container;
|
||||
}
|
||||
|
||||
void Box_h264::SetDataReferenceIndex( uint16_t DataReferenceIndex ) {
|
||||
void Box_avcC::SetDataReferenceIndex( uint16_t DataReferenceIndex ) {
|
||||
Container->SetPayload((uint32_t)2,Box::uint16_to_uint8( DataReferenceIndex ),6);
|
||||
}
|
||||
|
||||
void Box_h264::SetDimensions ( uint16_t Width, uint16_t Height ) {
|
||||
void Box_avcC::SetDimensions ( uint16_t Width, uint16_t Height ) {
|
||||
Container->SetPayload((uint32_t)2,Box::uint16_to_uint8( Height ),26);
|
||||
Container->SetPayload((uint32_t)2,Box::uint16_to_uint8( Width ),24);
|
||||
}
|
||||
|
||||
void Box_h264::SetResolution ( uint32_t Horizontal, uint32_t Vertical ) {
|
||||
void Box_avcC::SetResolution ( uint32_t Horizontal, uint32_t Vertical ) {
|
||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8( Vertical ),32);
|
||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8( Horizontal ),28);
|
||||
}
|
||||
|
||||
void Box_h264::SetFrameCount ( uint16_t FrameCount ) {
|
||||
void Box_avcC::SetFrameCount ( uint16_t FrameCount ) {
|
||||
Container->SetPayload((uint32_t)2,Box::uint16_to_uint8( FrameCount ),40);
|
||||
}
|
||||
|
||||
void Box_h264::SetCompressorName ( std::string CompressorName ) {
|
||||
void Box_avcC::SetCompressorName ( std::string CompressorName ) {
|
||||
uint8_t * Printable = new uint8_t[1];
|
||||
Printable[0] = std::min( (unsigned int)31, CompressorName.size() );
|
||||
Container->SetPayload((uint32_t)Printable[0],(uint8_t*)CompressorName.c_str(),43);
|
||||
Container->SetPayload((uint32_t)1, Printable ,42);
|
||||
}
|
||||
|
||||
void Box_h264::SetDepth ( uint16_t Depth ) {
|
||||
void Box_avcC::SetDepth ( uint16_t Depth ) {
|
||||
Container->SetPayload((uint32_t)2,Box::uint16_to_uint8( Depth ),74);
|
||||
}
|
||||
|
||||
void Box_h264::SetReserved( ) {
|
||||
void Box_avcC::SetReserved( ) {
|
||||
Container->SetPayload((uint32_t)2,Box::uint16_to_uint8( (uint16_t)-1 ),76);
|
||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0),36);
|
||||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0),20);
|
||||
|
@ -54,7 +54,7 @@ void Box_h264::SetReserved( ) {
|
|||
Container->SetPayload((uint32_t)4,Box::uint32_to_uint8(0));
|
||||
}
|
||||
|
||||
void Box_h264::SetDefaults( ) {
|
||||
void Box_avcC::SetDefaults( ) {
|
||||
SetResolution ( );
|
||||
SetFrameCount ( );
|
||||
SetDepth ( );
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "box.h"
|
||||
#include <string>
|
||||
|
||||
class Box_h264 {
|
||||
class Box_avcC {
|
||||
public:
|
||||
Box_h264( );
|
||||
~Box_h264();
|
||||
Box_avcC( );
|
||||
~Box_avcC();
|
||||
Box * GetBox();
|
||||
void SetReserved( );
|
||||
void SetDataReferenceIndex( uint16_t DataReferenceIndex );
|
||||
|
|
Loading…
Add table
Reference in a new issue