本文整理汇总了C++中Header_Fill_Size函数的典型用法代码示例。如果您正苦于以下问题:C++ Header_Fill_Size函数的具体用法?C++ Header_Fill_Size怎么用?C++ Header_Fill_Size使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Header_Fill_Size函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: 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;
}
示例6: 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
}
示例7: 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));
}
示例8: while
//---------------------------------------------------------------------------
bool File_AvsV::Header_Parser_Fill_Size()
{
//Look for next Sync word
if (Buffer_Offset_Temp==0) //Buffer_Offset_Temp is not 0 if Header_Parse_Fill_Size() has already parsed first frames
Buffer_Offset_Temp=Buffer_Offset+4;
while (Buffer_Offset_Temp+4<=Buffer_Size
&& CC3(Buffer+Buffer_Offset_Temp)!=0x000001)
{
Buffer_Offset_Temp+=2;
while(Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp]!=0x00)
Buffer_Offset_Temp+=2;
if (Buffer_Offset_Temp<Buffer_Size && Buffer[Buffer_Offset_Temp-1]==0x00 || Buffer_Offset_Temp>=Buffer_Size)
Buffer_Offset_Temp--;
}
//Must wait more data?
if (Buffer_Offset_Temp+4>Buffer_Size)
{
if (FrameIsAlwaysComplete || File_Offset+Buffer_Size==File_Size)
Buffer_Offset_Temp=Buffer_Size; //We are sure that the next bytes are a start
else
return false;
}
//OK, we continue
Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
Buffer_Offset_Temp=0;
return true;
}
示例9: 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);
}
示例10: Skip_B2
//---------------------------------------------------------------------------
void File_Sdp::Header_Parse()
{
//Parsing
int8u Length, FormatCode;
Skip_B2( "Identifier");
Get_B1 (Length, "Length");
Get_B1 (FormatCode, "Format Code");
for (int8u Pos=0; Pos<5; Pos++)
{
FieldLines[Pos]=0;
#if MEDIAINFO_TRACE
Element_Begin1("Field/Line");
BS_Begin();
Info_SB( Field, "Field Number");
Info_S1(2, Reserved, "Reserved");
Info_S1(5, Line, "Line Number");
BS_End();
FieldLines[Pos]=((Field?1:0)<<7) |(Reserved<<5) | Line; //Removing field information ((Field?1:0)<<7) |
if (FieldLines[Pos])
{
Element_Info1(Field?2:1);
Element_Info1(Line);
}
else
Element_Info1("None");
Element_End0();
#else //MEDIAINFO_TRACE
Get_B1(FieldLines[Pos], "Field/Line");
FieldLines[Pos]&=0x7F; //Removing field information
#endif //MEDIAINFO_TRACE
}
Header_Fill_Size(3+Length);
}
示例11: Header_Fill_Size
//---------------------------------------------------------------------------
void File_DolbyE::Header_Parse()
{
//Filling
if (IsSub)
Header_Fill_Size(Buffer_Size-Buffer_Offset);
else
{
//Looking for synchro
//Synchronizing
Buffer_Offset_Temp=Buffer_Offset+3;
if (BitDepth==16)
while (Buffer_Offset_Temp+2<=Buffer_Size)
{
if ((CC2(Buffer+Buffer_Offset_Temp)&0xFFFE)==0x078E) //16-bit
break; //while()
Buffer_Offset_Temp++;
}
if (BitDepth==20)
while (Buffer_Offset_Temp+3<=Buffer_Size)
{
if ((CC3(Buffer+Buffer_Offset_Temp)&0xFFFFE0)==0x0788E0) //20-bit
break; //while()
Buffer_Offset_Temp++;
}
if (BitDepth==24)
while (Buffer_Offset_Temp+3<=Buffer_Size)
{
if ((CC3(Buffer+Buffer_Offset_Temp)&0xFFFFFE)==0x07888E) //24-bit
break; //while()
Buffer_Offset_Temp++;
}
if (Buffer_Offset_Temp+(BitDepth>16?3:2)>Buffer_Size)
{
if (File_Offset+Buffer_Size==File_Size)
Buffer_Offset_Temp=Buffer_Size;
else
{
Element_WaitForMoreData();
return;
}
}
Header_Fill_Size(Buffer_Offset_Temp-Buffer_Offset);
}
Header_Fill_Code(0, "Frame");
}
示例12: 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");
}
示例13: Header_Fill_Code
//---------------------------------------------------------------------------
void File_Dpx::Header_Parse()
{
//Filling
Header_Fill_Code(Sizes_Pos); //We use Sizes_Pos as the unique key
if (Sizes.empty())
{
if (Element_Size<28)
{
Element_WaitForMoreData();
return;
}
int32u Size=LittleEndian?LittleEndian2int32u(Buffer+Buffer_Offset+24):BigEndian2int32u(Buffer+Buffer_Offset+24);
if (Size==(int32u)-1)
Size=LittleEndian?LittleEndian2int32u(Buffer+Buffer_Offset+4):BigEndian2int32u(Buffer+Buffer_Offset+4);
Header_Fill_Size(Size);
}
else
Header_Fill_Size(Sizes[Sizes_Pos]);
}
示例14: 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");
}
示例15: 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());
}