本文整理汇总了C++中Header_Fill_Code函数的典型用法代码示例。如果您正苦于以下问题:C++ Header_Fill_Code函数的具体用法?C++ Header_Fill_Code怎么用?C++ Header_Fill_Code使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Header_Fill_Code函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Header_Fill_Code
//---------------------------------------------------------------------------
void File_Exr::Header_Parse()
{
//Header
if (CC4(Buffer+Buffer_Offset)==0x762F3101) //"v/1"+1
{
//Filling
Header_Fill_Code(0, "File header");
Header_Fill_Size(12);
return;
}
//Image data
if (name_End==0)
{
//Filling
Header_Fill_Code(0, "Image data");
Header_Fill_Size(ImageData_End-(File_Offset+Buffer_Offset));
return;
}
int32u size;
Get_String(name_End, name, "name");
Element_Offset++; //Null byte
Get_String(type_End, type, "type");
Element_Offset++; //Null byte
Get_L4 (size, "size");
//Filling
Header_Fill_Code(0, Ztring().From_Local(name.c_str()));
Header_Fill_Size(name_End+1+type_End+1+4+size);
}
示例2: Get_B1
//---------------------------------------------------------------------------
void File_DvbSubtitle::Header_Parse()
{
//Parsing
int8u sync_byte;
Get_B1 (sync_byte, "sync_byte");
switch (sync_byte)
{
case 0xFF : //Stuffing
MustFindDvbHeader=true;
//Filling
Header_Fill_Code(0xFF, "end of PES data field marker");
Header_Fill_Size(1);
return;
default : ; //Normal (0x0F)
}
int16u segment_length;
int8u segment_type;
Get_B1 (segment_type, "segment_type");
Get_B2 (page_id, "page_id");
Get_B2 (segment_length, "segment_length");
//Filling
Header_Fill_Code(segment_type);
Header_Fill_Size(Element_Offset+segment_length);
}
示例3: Header_Fill_Code
//---------------------------------------------------------------------------
void File_Lyrics3v2::Header_Parse()
{
if (TotalSize<=15) //First 10 is minimum size of a tag, Second 10 is ID3v2 header size
{
//Place for footer
Header_Fill_Code((int64u)-1, "File Footer");
Header_Fill_Size(TotalSize);
return;
}
//Parsing
Ztring SizeT;
int64u Size;
int32u Field;
Get_C3 (Field, "Field");
Get_Local(5, SizeT, "Size");
Size=8+SizeT.To_int64u();
//Filling
if (Size+15>TotalSize)
Size=TotalSize-15;
Header_Fill_Code(Field, Ztring().From_CC3(Field));
Header_Fill_Size(Size);
TotalSize-=Size;
}
示例4: Peek_B1
//---------------------------------------------------------------------------
void File_Nut::Header_Parse()
{
//Parsing
int8u N;
Peek_B1(N);
if (N==0x4E) //'N'
{
//Header
int64u startcode, forward_ptr;
Get_B8(startcode, "startcode");
Get_VS(forward_ptr, "forward_ptr");
if (forward_ptr>4096)
Skip_B4( "header_checksum");
Header_Fill_Code(startcode, Ztring().From_Number(startcode, 16)); //Quick filling for CC8 with text
Header_Fill_Size(Element_Offset+forward_ptr); //4 for cheksum
}
else
{
//Frame
Header_Fill_Code(0, "Frame");
Header_Fill_Size(0);
Finish();
}
}
示例5: Get_B1
//---------------------------------------------------------------------------
void File_Mpeg4_Descriptors::Header_Parse()
{
//Parsing
size_t Size=0;
int8u type, Size_ToAdd;
Get_B1(type, "type");
if (type==0)
{
Header_Fill_Code(0x00, "Padding");
Header_Fill_Size(1);
return;
}
do
{
Get_B1(Size_ToAdd, "size");
Size=(Size<<7) | (Size_ToAdd&0x7F);
}
while (Size_ToAdd&0x80);
//Filling
Header_Fill_Code(type, Ztring().From_CC1(type));
if (Element_Offset+Size>=Element_Size)
Size=(size_t)(Element_Size-Element_Offset); //Found one file with too big size but content is OK, cutting the block
Header_Fill_Size(Element_Offset+Size);
}
示例6: Header_Fill_Code
//---------------------------------------------------------------------------
void File_Vc3::Header_Parse()
{
int32u CompressionID=BigEndian2int32u(Buffer+Buffer_Offset+0x28);
Header_Fill_Code(0, "Frame");
Header_Fill_Size(Vc3_CompressedFrameSize(CompressionID));
}
示例7: Get_B2
//---------------------------------------------------------------------------
// An Element
// Size 2 bytes, Pos=4
// Code 5 bytes, Pos=6
//
void File_Jpeg::Header_Parse()
{
//Parsing
int16u code, size=0;
Get_B2 (code, "code");
switch (code)
{
case Elements::TEM :
case Elements::RST0 :
case Elements::RST1 :
case Elements::RST2 :
case Elements::RST3 :
case Elements::RST4 :
case Elements::RST5 :
case Elements::RST6 :
case Elements::RST7 :
case Elements::SOI :
case Elements::EOI :
break; //Size=0
default : Get_B2 (size, "size");
}
//Filling
Header_Fill_Code(code, Ztring().From_CC2(code));
Header_Fill_Size(2+size);
}
示例8: Header_Fill_Code
//---------------------------------------------------------------------------
void File_Pcm::Header_Parse()
{
//Filling
Header_Fill_Code(0, "Block");
if (BitDepth && Channels)
Header_Fill_Size((Element_Size/(BitDepth*Channels/8))*(BitDepth*Channels/8)); //A complete sample
else
Header_Fill_Size(Element_Size); // Unknown sample size
}
示例9: Skip_B4
//---------------------------------------------------------------------------
void File_Dts::Header_Parse()
{
//Parsing
int16u Primary_Frame_Byte_Size_minus_1;
int8u EncoderSoftwareRevision;
bool crc_present;
Skip_B4( "Sync");
BS_Begin();
Info_SB( FrameType, "Frame Type"); Param_Info(DTS_FrameType[FrameType]);
Skip_S1( 5, "Deficit Sample Count");
Get_SB ( crc_present, "CRC Present");
Skip_S1( 7, "Number of PCM Sample Blocks");
Get_S2 (14, Primary_Frame_Byte_Size_minus_1, "Primary Frame Byte Size minus 1");
Primary_Frame_Byte_Size_minus_1+=1;
if (!Word) Primary_Frame_Byte_Size_minus_1=Primary_Frame_Byte_Size_minus_1*8/14*2; Param_Info(Ztring::ToZtring(Primary_Frame_Byte_Size_minus_1)+_T(" bytes")); //Word is on 14 bits!
Get_S1 ( 6, channel_arrangement, "Audio Channel Arrangement"); Param_Info(Ztring::ToZtring(DTS_Channels[channel_arrangement])+_T(" channels"));
Get_S1 ( 4, sample_frequency, "Core Audio Sampling Frequency"); Param_Info(Ztring::ToZtring(DTS_SamplingRate[sample_frequency])+_T(" Hz"));
Get_S1 ( 5, bit_rate, "Transmission Bit Rate"); Param_Info(Ztring::ToZtring(DTS_BitRate[bit_rate])+_T(" bps"));
Skip_SB( "Embedded Down Mix Enabled");
Skip_SB( "Embedded Dynamic Range");
Skip_SB( "Embedded Time Stamp");
Skip_SB( "Auxiliary Data");
Skip_SB( "HDCD");
Get_S1 ( 3, ExtensionAudioDescriptor, "Extension Audio Descriptor"); Param_Info(DTS_ExtensionAudioDescriptor[ExtensionAudioDescriptor]);
Get_SB ( ExtendedCoding, "Extended Coding");
Skip_SB( "Audio Sync Word Insertion");
Get_S1 ( 2, lfe_effects, "Low Frequency Effects");
Skip_SB( "Predictor History");
if (crc_present)
Skip_S2(16, "Header CRC Check");
Skip_SB( "Multirate Interpolator");
Get_S1 ( 4, EncoderSoftwareRevision, "Encoder Software Revision");
Skip_S1( 2, "Copy History");
Get_S1 ( 2, bits_per_sample, "Source PCM Resolution"); Param_Info(Ztring::ToZtring(DTS_Resolution[bits_per_sample])+_T(" bits"));
Skip_SB( "ES");
Skip_SB( "Front Sum/Difference");
Skip_SB( "Surrounds Sum/Difference");
Skip_S1( 4, "Dialog Normalisation Parameter");
switch (EncoderSoftwareRevision)
{
case 6 :
Skip_S1( 4, "Dialog Normalisation Parameter");
break;
case 7 :
Skip_S1( 4, "Dialog Normalisation Parameter");
break;
default :
Skip_S1( 4, "Unspecified");
break;
}
BS_End();
//Filling
Header_Fill_Size(Primary_Frame_Byte_Size_minus_1+DTS_HD_Unknown_Size); //TODO: change this, for DTS-HD
Header_Fill_Code(0, "Frame");
}
示例10: Header_Fill_Size
//---------------------------------------------------------------------------
void File_Wvpk::Header_Parse()
{
//Specific cases
if (FromMKV)
{
Header_Fill_Size(Element_Size);
Header_Fill_Code(0, "Block");
return;
}
//Parsing
int32u ckSize;
Skip_C4( "ckID");
Get_L4 (ckSize, "ckSize");
//Filling
Header_Fill_Size(8+ckSize);
Header_Fill_Code(0, "Block");
}
示例11: Header_Fill_Size
//---------------------------------------------------------------------------
void File_Png::Header_Parse()
{
if (!Signature_Parsed)
{
//Filling
Header_Fill_Size(8);
Header_Fill_Code(0, "File header");
return;
}
//Parsing
int32u Length, Chunk_Type;
Get_B4 (Length, "Length");
Get_C4 (Chunk_Type, "Chunk Type");
//Filling
Header_Fill_Size(12+Length); //+4 for CRC
Header_Fill_Code(Chunk_Type, Ztring().From_CC4(Chunk_Type));
}
示例12: Header_Fill_Code
//---------------------------------------------------------------------------
void File_Lyrics3v2::Header_Parse()
{
if (Buffer_Offset+15>=Buffer_Size) //first 10 is minimum size of a tag, Second 10 is ID3v2 header size
{
//Place for footer
Header_Fill_Code(0xFFFFFFFF, "Footer");
Header_Fill_Size(Buffer_Size-Buffer_Offset);
return;
}
//Parsing
Ztring Size;
int32u Field;
Get_C3 (Field, "Field");
Get_Local(5, Size, "Size");
//Filling
Header_Fill_Code(Field, Ztring().From_CC3(Field));
Header_Fill_Size(8+Size.To_int64u());
}
示例13: Get_C4
//---------------------------------------------------------------------------
void File_TwinVQ::Header_Parse()
{
//Parsing
int32u id, size;
Get_C4 (id, "id");
Get_B4 (size, "size");
//Filling
Header_Fill_Code(id, Ztring().From_CC4(id));
Header_Fill_Size(8+(id==Elements::DATA?0:size)); //DATA chunk indicates the end of the header, with no chunk size
}
示例14: Get_GUID
//---------------------------------------------------------------------------
void File_Wm::Header_Parse()
{
if (!MustUseAlternativeParser)
{
//Parsing
int128u Name;
int64u Size;
Get_GUID(Name, "Name");
Get_L8 (Size, "Size");
//Filling
Header_Fill_Code(Name.hi, Ztring().From_GUID(Name));
Header_Fill_Size(Size);
}
else
{
Header_Fill_Code(0, "Packet");
Header_Fill_Size(MaximumDataPacketSize);
}
}
示例15: Get_B4
//---------------------------------------------------------------------------
void File_Png::Header_Parse()
{
//Parsing
int32u Length, Chunk_Type;
Get_B4 (Length, "Length");
Get_C4 (Chunk_Type, "Chunk Type");
//Filling
Header_Fill_Size(12+Length); //+4 for CRC
Header_Fill_Code(Chunk_Type, Ztring().From_CC4(Chunk_Type));
}