本文整理汇总了C++中Skip_L4函数的典型用法代码示例。如果您正苦于以下问题:C++ Skip_L4函数的具体用法?C++ Skip_L4怎么用?C++ Skip_L4使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Skip_L4函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Element_Begin1
bool File_Zip::Zip64_end_of_central_directory_record()
{
if (Element_Offset+12>Element_Size) //Zip64_end_of_central_directory_record
return false; //Not enough data
//Retrieving complete Zip64_end_of_central_directory_record size
int64u size_of_Zip64_end_of_central_directory_record=LittleEndian2int64u(Buffer+(size_t)Element_Offset+4);
if (Element_Offset+12+size_of_Zip64_end_of_central_directory_record>Element_Size) //end_of_central_directory all included
return false; //Not enough data
//Parsing
//~ int32u offset;
int16u version_made_by;
Element_Begin1("Zip64 End of central directory record");
Skip_C4( "Zip64 end of central dir signature");
Skip_L8( "size of zip64 end of central directory record");
Get_L2 (version_made_by, "version made by");
Param_Info1((version_made_by>>8)>20?"unused":Zip_made_by[version_made_by>>8]);
Skip_L2( "version needed to extract");
Skip_L4( "number of this disk");
Skip_L4( "number of the disk");// with the start of the central directory
Skip_L8( "total number of entries on this disk");// in the central directory
Skip_L8( "total number of entries");// in the central directory
Skip_L8( "size of the central directory");
Skip_L8( "offset of start of central directory"); // with respect to the starting disk number
Skip_XX(size_of_Zip64_end_of_central_directory_record-44, "zip64 extensible data sector");
Element_End0();
return true;
}
示例2: Skip_C4
//---------------------------------------------------------------------------
void File_Cdxa::FileHeader_Parse()
{
//Parsing
Skip_C4( "RIFF header");
Skip_L4( "RIFF data size");
Skip_C4( "CDXA");
Skip_C4( "fmt header");
Skip_L4( "fmt size");
Skip_L2( "user_id");
Skip_L2( "group_id");
Skip_L2( "attributes");
Skip_C2( "xa_signature");
Skip_L4( "xa_track_number");
Skip_L4( "reserved");
Skip_C4( "data header");
Skip_L4( "data size");
FILLING_BEGIN();
Accept("CDXA");
MI=new MediaInfo_Internal;
MI->Option(_T("FormatDetection_MaximumOffset"), _T("1048576"));
//MI->Option(_T("File_IsSub"), _T("1"));
MI->Open_Buffer_Init(File_Size, File_Offset+Buffer_Offset);
FILLING_END();
}
示例3: Get_L4
//---------------------------------------------------------------------------
// file header
void File_Rar::Header_Parse_Content_74()
{
int16u name_size;
int8u HOST_OS, METHOD, UNP_VER;
Get_L4 (PACK_SIZE, "PACK_SIZE"); //Compressed file size
Skip_L4( "UNP_SIZE"); //Uncompressed file size
Get_L1 (HOST_OS, "HOST_OS"); Param_Info1((HOST_OS<6?Rar_host_os[HOST_OS]:"Unknown"));
Skip_L4( "FILE_CRC");
Skip_L4( "FTIME"); //Date and time in standard MS DOS format
Get_L1 (UNP_VER, "UNP_VER"); Param_Info1(Rar_version_number(UNP_VER)); //RAR version needed to extract file
Get_L1 (METHOD, "METHOD"); Param_Info1(((METHOD>=0x30)&&(METHOD<0x36)?Rar_packing_method[METHOD-0x30]:"Unknown"));
Get_L2 (name_size, "NAME_SIZE"); //File name size
Skip_L4( "ATTR"); //File attributes
if(high_fields)
{
Get_L4 (HIGH_PACK_SIZE, "HIGH_PACK_SIZE"); //High 4 bytes of 64 bit value of compressed file size.
Skip_L4( "HIGH_UNP_SIZE"); //High 4 bytes of 64 bit value of uncompressed file size.
}
else
HIGH_PACK_SIZE=0;
if (usual_or_utf8)
{
//Must test the content before reading, looking fore zero byte
if (Element_Offset+name_size>Element_Size)
{
Skip_XX(Element_Size-Element_Offset, "Error");
return;
}
int64u ZeroPos=0;
while (ZeroPos<name_size)
{
if (Buffer[Buffer_Offset+(size_t)(Element_Offset+ZeroPos)]==0)
break; //Found
ZeroPos++;
}
if (ZeroPos==name_size)
Skip_UTF8(name_size, "FILE_NAME");
else
{
Skip_Local(ZeroPos, "FILE_NAME"); //Up to ZeroPos
Skip_L1( "Zero");
Skip_UTF16L(name_size-(ZeroPos+1), "FILE_NAME"); //Spec is not precise, "Unicode" without encoding format (character size, endianess), because RAR is from Windows, we hope this is the format from Windows (UTF-16 Little Endian)
}
}
else
Skip_Local(name_size, "FILE_NAME");
if (salt)
Skip_L8( "SALT");
//if(exttime)
//Skip_XX("EXT_TIME"); //Which size?
}
示例4: Element_Begin1
//---------------------------------------------------------------------------
void File_Tga::Tga_File_Footer()
{
if (Version==1)
return; //No footer
Element_Begin1("Image/color Map Data");
Skip_L4( "Extension Area Offset");
Skip_L4( "Developer Directory Offset");
Skip_Local(16, "Signature");
Skip_Local( 1, "Reserved Character");
Skip_L1( "Binary Zero String Terminator");
Element_End0();
}
示例5: Element_Name
//---------------------------------------------------------------------------
void File_Kate::Identification()
{
Element_Name("Identification");
//Parsing
Ztring Language, Category;
int16u Width, Height;
int8u VersionMajor, VersionMinor, NumHeaders, TextEncoding;
Skip_B1 ( "Signature");
Skip_Local(7, "Signature");
Skip_L1( "Reserved");
Get_L1 (VersionMajor, "version major");
Get_L1 (VersionMinor, "version minor");
Get_L1 (NumHeaders, "num headers");
Get_L1 (TextEncoding, "text encoding");
Skip_L1( "directionality");
Skip_L1( "Reserved");
Skip_L1( "granule shift");
Skip_L4( "Reserved");
Get_L2 (Width, "cw sh + canvas width");
Get_L2 (Height, "ch sh + canvas height");
/*
BS_Begin();
Skip_BS( 4, "cw sh");
Get_BS (12, Width, "canvas width");
Skip_BS( 4, "ch sh");
Get_BS (12, Height, "canvas height");
BS_End();
*/
Skip_L4( "granule rate numerator");
Skip_L4( "granule rate denominator");
Get_UTF8(16, Language, "Language");
Get_UTF8(16, Category, "Category");
FILLING_BEGIN();
Accept("Kate");
Stream_Prepare(Stream_Text);
Fill(Stream_Text, 0, Text_Format, "Kate");
Fill(Stream_Text, 0, Text_Codec, "Kate");
Fill(Stream_Text, 0, Text_Language, Language);
Fill(Stream_Text, 0, Text_Language_More, Kate_Category(Category));
Finish("Kate");
FILLING_END();
}
示例6: Skip_C8
//---------------------------------------------------------------------------
void File_ApeTag::HeaderFooter()
{
//Parsing
int32u Flags;
Skip_C8( "Preamble");
Skip_L4( "Version");
Skip_L4( "Size");
Skip_L4( "Count");
Get_L4 (Flags, "Flags");
Skip_Flags(Flags, 0, "Read Only");
Skip_Flags(Flags, 1, "Binary");
Skip_Flags(Flags, 2, "Locator of external stored information");
Skip_Flags(Flags, 29, "Is the header");
Skip_Flags(Flags, 30, "Contains a footer");
Skip_Flags(Flags, 31, "Contains a header");
Skip_L8( "Reserved");
}
示例7: Skip_C4
//---------------------------------------------------------------------------
void File_Pmp::FileHeader_Parse()
{
//Parsing
int32u version, video_format=0, nb_frames=0, video_width=0, video_height=0, time_base_num=0, time_base_den=0, audio_format=0, sample_rate=0, channels=0;
Skip_C4( "Signature");
Get_L4 (version, "Version");
if (version==1)
{
Get_L4 (video_format, "video_format");
Get_L4 (nb_frames, "number of frames");
Get_L4 (video_width, "video_width");
Get_L4 (video_height, "video_height");
Get_L4 (time_base_num, "time_base_num");
Get_L4 (time_base_den, "time_base_den");
Skip_L4( "number of audio streams");
Get_L4 (audio_format, "audio_format");
Get_L4 (channels, "channels");
Skip_L4( "unknown");
Get_L4 (sample_rate, "sample_rate");
}
FILLING_BEGIN();
Accept("PMP");
Fill(Stream_General, 0, General_Format, "PMP");
if (version==1)
{
Stream_Prepare(Stream_Video);
Fill(Stream_Video, 0, Video_Format, Pmp_video_format(video_format));
Fill(Stream_Video, 0, Video_FrameCount, nb_frames);
Fill(Stream_Video, 0, Video_Width, video_width);
Fill(Stream_Video, 0, Video_Height, video_height);
Fill(Stream_Video, 0, Video_FrameRate, (float)time_base_den / 100);
Stream_Prepare(Stream_Audio);
Fill(Stream_Audio, 0, Audio_Format, Pmp_audio_format(audio_format));
Fill(Stream_Audio, 0, Audio_Channel_s_, channels);
Fill(Stream_Audio, 0, Audio_SamplingRate, sample_rate);
}
//No more need data
Finish("PMP");
FILLING_END();
}
示例8: Skip_C4
//---------------------------------------------------------------------------
void File_Fraps::Version2()
{
//Parsing
if (Element_Size>8) //Else this is a repeat frame
{
Skip_C4( "FPSx");
Skip_L4( "offset to the Y plane (minus 8)");
Skip_L4( "offset to the U plane (minus 8)");
Skip_L4( "offset to the V plane (minus 8)");
Skip_XX(Element_Size-Element_Offset, "data");
}
FILLING_BEGIN();
Accept();
Fill();
Fill(Stream_Video, 0, Video_ColorSpace, "YUV");
Fill(Stream_Video, 0, Video_BitDepth, 8);
FILLING_END();
}
示例9: Element_Begin1
//---------------------------------------------------------------------------
void File_Ps2Audio::SShd()
{
Element_Begin1("SShd (Header)");
//Parsing
int32u Size, Format, SamplingRate, Channels;
Skip_C4( "ID");
Get_L4 (Size, "Size");
if (Size!=0x18)
{
Trusted_IsNot("Bad size");
return;
}
Get_L4 (Format, "Format");
Get_L4 (SamplingRate, "Sampling rate");
Get_L4 (Channels, "Channels");
Skip_L4( "Bytes per channel");
Skip_L4( "Reserved");
Skip_L4( "Reserved");
Element_End0();
FILLING_BEGIN();
Accept("PS2 Audio");
BitRate=SamplingRate*Channels*16; //Always 16 bits
Stream_Prepare(Stream_Audio);
Ztring FormatS;
switch(Format)
{
case 0x00000001 : FormatS=__T("PCM"); break;
case 0x00000010 : FormatS=__T("ADPCM"); break;
default : ;
}
Fill(Stream_Audio, 0, Audio_Format, FormatS);
Fill(Stream_Audio, 0, Audio_Codec, FormatS);
Fill(Stream_Audio, 0, Audio_MuxingMode, "PS2");
Fill(Stream_Audio, 0, Audio_SamplingRate, SamplingRate);
Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
Fill(Stream_Audio, 0, Audio_BitRate, BitRate);
FILLING_END();
}
示例10: Element_Begin1
//---------------------------------------------------------------------------
void File_Jpeg::APP1_EXIF()
{
//Parsing
Element_Begin1("Exif");
int32u Alignment;
Get_C4(Alignment, "Alignment");
if (Alignment==0x49492A00)
Skip_B4( "First_IFD");
if (Alignment==0x4D4D2A00)
Skip_L4( "First_IFD");
Element_End0();
}
示例11: Element_Begin
//---------------------------------------------------------------------------
void File_Bmp::BitmapInfoHeader()
{
//Parsing
Element_Begin("Bitmap Info header", 40);
int32u Width, Height, CompressionMethod;
int16u BitsPerPixel;
Skip_L4( "Size");
Get_L4 (Width, "Width");
Get_L4 (Height, "Height");
Skip_L2( "Color planes");
Get_L2 (BitsPerPixel, "Bits per pixel");
Get_L4 (CompressionMethod, "Compression method"); Param_Info(Bmp_CompressionMethod(CompressionMethod));
Skip_L4( "Image size");
Skip_L4( "Horizontal resolution");
Skip_L4( "Vertical resolution");
Skip_L4( "Number of colors in the color palette");
Skip_L4( "Number of important colors used");
Element_End();
FILLING_BEGIN();
Fill(Stream_Image, 0, Image_Width, Width);
Fill(Stream_Image, 0, Image_Height, Height);
Fill(Stream_Image, 0, Image_BitDepth, BitsPerPixel);
Fill(Stream_Image, 0, Image_Format, Bmp_CompressionMethod(CompressionMethod));
Fill(Stream_Image, 0, Image_Codec, Bmp_CompressionMethod(CompressionMethod));
FILLING_END();
}
示例12: LittleEndian2int32u
//---------------------------------------------------------------------------
// RIFF Header, 44 bytes
// RIFF header 4 bytes, Pos=0
// RIFF data size 4 bytes, Pos=4
// Format (CDXA) 4 bytes, Pos=8
// Format Header 4 bytes, Pos=12
// Format Size 4 bytes, Pos=16
// Format user_id 2 bytes, Pos=20
// Format group_id 2 bytes, Pos=22
// Format attributes 2 bytes, Pos=24
// Format xa_signature 2 bytes, Pos=26 ("XA")
// Format xa_track_number 4 bytes, Pos=28
// Format Reserved 4 bytes, Pos=32
// Data Header 4 bytes, Pos=36
// Data Size 4 bytes, Pos=40
//
// Attributes (big endian):
// 15 Directory
// 14 CDDA
// 13 Interleaved
// 12 Mode2Form2 --> 2324 bytes/block
// 11 Mode2Form1 --> 2048 bytes/block
// 10 Exec_Other
// 09 Reserved
// 08 Read_Other
// 07 Reserved
// 06 Exec_Group
// 05 Reserved
// 04 Read_Group
// 03 Reserved
// 02 Exec_User
// 01 Reserved
// 00 Read_User
//
void File_Cdxa::FileHeader_Parse()
{
//Parsing
if ( CC4(Buffer+Buffer_Offset+0x00)!=CC4("RIFF")
|| LittleEndian2int32u(Buffer+Buffer_Offset+0x04)!=LittleEndian2int32u(Buffer+Buffer_Offset+0x28)+0x24 //Sizes of chunks
|| CC4(Buffer+Buffer_Offset+0x08)!=CC4("CDXA")
|| CC4(Buffer+Buffer_Offset+0x0C)!=CC4("fmt ")
|| LittleEndian2int32u(Buffer+Buffer_Offset+0x10)!=0x10
|| CC4(Buffer+Buffer_Offset+0x24)!=CC4("data")
)
{
Finnished();
return;
}
//Parsing
Element_Begin("CDXA header");
Skip_C4( "RIFF header");
Skip_L4( "RIFF data size");
Skip_C4( "CDXA");
Skip_C4( "fmt header");
Skip_L4( "fmt size");
Skip_L2( "user_id");
Skip_L2( "group_id");
Skip_L2( "attributes");
Skip_C2( "xa_signature");
Skip_L4( "xa_track_number");
Skip_L4( "reserved");
Skip_C4( "data header");
Skip_L4( "data size");
Element_End();
FILLING_BEGIN();
if (MI==NULL)
MI=new MediaInfo;
Stream_Prepare(Stream_General);
FILLING_END();
}
示例13: Skip_Local
//---------------------------------------------------------------------------
void File_La::FileHeader_Parse()
{
//Parsing
Ztring Major, Minor;
int32u SampleRate, Samples, BytesPerSecond, UnCompSize, WAVEChunk, FmtSize, FmtChunk, CRC32;
int16u RawFormat, Channels, BytesPerSample, BitsPerSample;
Skip_Local(2, "signature");
Get_Local (1, Major, "major_version");
Get_Local (1, Minor, "minor_version");
Get_L4 (UnCompSize, "uncompressed_size");
Get_L4 (WAVEChunk, "chunk");
Skip_L4( "fmt_size");
Get_L4 (FmtChunk, "fmt_chunk");
Get_L4 (FmtSize, "fmt_size");
Get_L2 (RawFormat, "raw_format");
Get_L2 (Channels, "channels"); Param_Info2(Channels, " channel(s)");
Get_L4 (SampleRate, "sample_rate");
Get_L4 (BytesPerSecond, "bytes_per_second");
Get_L2 (BytesPerSample, "bytes_per_sample");
Get_L2 (BitsPerSample, "bits_per_sample");
Get_L4 (Samples, "samples");
Skip_L1( "flags");
Get_L4 (CRC32, "crc");
FILLING_BEGIN()
if (SampleRate==0)
return;
Duration=((int64u)Samples/Channels)*1000/SampleRate; // Seems that it's samples per channels otherwise Duration is doubled ??!!
if (Duration==0)
return;
UncompressedSize=(Samples)*Channels*(BitsPerSample/8);
if (UncompressedSize==0)
return;
File__Tags_Helper::Accept("LA");
Fill(Stream_General, 0, General_Format_Version, Major+__T('.')+Minor);
File__Tags_Helper::Stream_Prepare(Stream_Audio);
Fill(Stream_Audio, 0, Audio_Format, "LA");
Fill(Stream_Audio, 0, Audio_Codec, "LA");
Fill(Stream_Audio, 0, Audio_Format_Version, Major+__T('.')+Minor);
Fill(Stream_Audio, 0, Audio_BitDepth, BitsPerSample);
Fill(Stream_Audio, 0, Audio_Channel_s_, Channels);
Fill(Stream_Audio, 0, Audio_SamplingRate, SampleRate);
Fill(Stream_Audio, 0, Audio_Duration, Duration);
//No more need data
File__Tags_Helper::Finish("LA");
FILLING_END();
}
示例14: Element_Name
//---------------------------------------------------------------------------
void File_Celt::Identification()
{
Element_Name("Identification");
//Parsing
Ztring celt_version;
int32u Celt_version_id, sample_rate, nb_channels;
Skip_Local(8, "celt_codec_id");
Get_Local(20, celt_version, "celt_version");
Get_L4 (Celt_version_id, "celt_version_id");
Skip_L4( "header_size");
Get_L4 (sample_rate, "rate");
Get_L4 (nb_channels, "nb_channels");
Skip_L4( "frame_size");
Skip_L4( "overlap");
Skip_L4( "bytes_per_packet");
Skip_L4( "extra_headers");
//Filling
FILLING_BEGIN()
Accept("CELT");
Stream_Prepare(Stream_Audio);
Fill(Stream_Audio, 0, Audio_Format, "CELT");
Fill(Stream_Audio, 0, Audio_Codec, "CELT");
if (!celt_version.empty())
{
//Fill(Stream_Audio, 0, Audio_Encoded_Library, celt_version); //Need more info about hte different possibilities, in the meanwhile trusting more the comment part
Fill(Stream_Audio, 0, Audio_SamplingRate, sample_rate);
Fill(Stream_Audio, 0, Audio_Channel_s_, nb_channels);
}
FILLING_END();
//Filling
Identification_Done=true;
}
示例15: Skip_C4
//---------------------------------------------------------------------------
void File_Cdxa::FileHeader_Parse()
{
//Parsing
Skip_C4( "RIFF header");
Skip_L4( "RIFF data size");
Skip_C4( "CDXA");
Skip_C4( "fmt header");
Skip_L4( "fmt size");
Skip_L2( "user_id");
Skip_L2( "group_id");
Skip_L2( "attributes");
Skip_C2( "xa_signature");
Skip_L4( "xa_track_number");
Skip_L4( "reserved");
Skip_C4( "data header");
Skip_L4( "data size");
FILLING_BEGIN();
MI=new MediaInfo_Internal;
MI->Option(_T("FormatDetection_MaximumOffset"), _T("1048576"));
Stream_Prepare(Stream_General);
Accept("CDXA");
FILLING_END();
}