本文整理汇总了C++中Skip_B4函数的典型用法代码示例。如果您正苦于以下问题:C++ Skip_B4函数的具体用法?C++ Skip_B4怎么用?C++ Skip_B4使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Skip_B4函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Element_Begin1
//---------------------------------------------------------------------------
void File_Jpeg::APP0_AVI1()
{
//Parsing
int8u FieldOrder=(int8u)-1;
Element_Begin1("AVI1");
if (Element_Size==16-4)
{
Get_B1 (FieldOrder, "Field Order");
Skip_XX(7, "Zeroes");
}
if (Element_Size==18-4)
{
Get_B1 (FieldOrder, "Field Order");
Skip_B1( "Zero");
Skip_B4( "Size of 1st Field");
Skip_B4( "Size of 2nd Field");
}
Element_End0();
FILLING_BEGIN();
if (Frame_Count==0 && Field_Count==0)
{
switch (FieldOrder)
{
case 0x00 : Fill(Stream_Video, 0, Video_Interlacement, "PPF"); Fill(Stream_Video, 0, Video_ScanType, "Progressive"); break;
case 0x01 : Fill(Stream_Video, 0, Video_Interlacement, "TFF"); Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); Fill(Stream_Video, 0, Video_ScanOrder, "TFF"); Height_Multiplier=2; break;
case 0x02 : Fill(Stream_Video, 0, Video_Interlacement, "BFF"); Fill(Stream_Video, 0, Video_ScanType, "Interlaced"); Fill(Stream_Video, 0, Video_ScanOrder, "BFF"); Height_Multiplier=2; break;
default : ;
}
}
FILLING_END();
}
示例2: Element_Begin1
//---------------------------------------------------------------------------
void File_Dpx::GenericSectionHeader_Dpx_ImageElement()
{
Element_Begin1("image element");
int8u Descriptor, TransferCharacteristic, ColorimetricSpecification, BitDephs;
Info_B4(DataSign, "Data sign");Param_Info1((DataSign==0?"unsigned":"signed"));
Skip_B4( "Reference low data code value");
Skip_BF4( "Reference low quantity represented");
Skip_B4( "Reference high data code value");
Skip_BF4( "Reference high quantity represented");
Get_B1 (Descriptor, "Descriptor");Param_Info1(DPX_Descriptors(Descriptor));
Get_B1 (TransferCharacteristic, "Transfer characteristic");Param_Info1(DPX_TransferCharacteristic(TransferCharacteristic));
Get_B1 (ColorimetricSpecification, "Colorimetric specification");Param_Info1(DPX_ColorimetricSpecification(ColorimetricSpecification));
Get_B1 (BitDephs, "Bit depth");Param_Info1(DPX_ValidBitDephs(BitDephs));
Info_B2(ComponentDataPackingMethod, "Packing");Param_Info1((ComponentDataPackingMethod<8?DPX_ComponentDataPackingMethod[ComponentDataPackingMethod]:"invalid"));
Info_B2(ComponentDataEncodingMethod, "Encoding");Param_Info1((ComponentDataEncodingMethod<8?DPX_ComponentDataEncodingMethod[ComponentDataEncodingMethod]:"invalid"));
Skip_B4( "Offset to data");
Skip_B4( "End-of-line padding");
Skip_B4( "End-of-image padding");
Skip_UTF8(32, "Description of image element");
Element_End0();
FILLING_BEGIN();
if (Frame_Count==0)
{
Fill(StreamKind_Last, StreamPos_Last, "ColorSpace", DPX_Descriptors_ColorSpace(Descriptor));
Fill(StreamKind_Last, StreamPos_Last, "ChromaSubsampling", DPX_Descriptors_ChromaSubsampling(Descriptor));
Fill(StreamKind_Last, StreamPos_Last, "BitDepth", BitDephs);
Fill(StreamKind_Last, StreamPos_Last, "colour_description_present", "Yes");
Fill(StreamKind_Last, StreamPos_Last, "colour_primaries", DPX_TransferCharacteristic(TransferCharacteristic));
Fill(StreamKind_Last, StreamPos_Last, "transfer_characteristics", DPX_ColorimetricSpecification(ColorimetricSpecification));
}
FILLING_END();
}
示例3: Get_B4
//---------------------------------------------------------------------------
void File_Flac::PICTURE()
{
//Parsing
int32u PictureType, MimeType_Size, Description_Size, Data_Size;
Ztring MimeType, Description;
Get_B4 (PictureType, "Picture type"); Element_Info1(Id3v2_PictureType((int8u)PictureType));
Get_B4 (MimeType_Size, "MIME type size");
Get_Local(MimeType_Size, MimeType, "MIME type");
Get_B4 (Description_Size, "Description size");
Get_UTF8(Description_Size, Description, "Description");
Skip_B4( "Width");
Skip_B4( "Height");
Skip_B4( "Color depth");
Skip_B4( "Number of colors used");
Get_B4 (Data_Size, "Data size");
if (Element_Offset+Data_Size>Element_Size)
return; //There is a problem
std::string Data_Raw((const char*)(Buffer+(size_t)(Buffer_Offset+Element_Offset)), Data_Size);
std::string Data_Base64(Base64::encode(Data_Raw));
Skip_XX(Element_Size-Element_Offset, "Data");
//Filling
Fill(Stream_General, 0, General_Cover, "Yes");
Fill(Stream_General, 0, General_Cover_Description, Description);
Fill(Stream_General, 0, General_Cover_Type, Id3v2_PictureType((int8u)PictureType));
Fill(Stream_General, 0, General_Cover_Mime, MimeType);
Fill(Stream_General, 0, General_Cover_Data, Data_Base64);
}
示例4: Skip_B4
//---------------------------------------------------------------------------
void File_Png::Signature()
{
//Parsing
Skip_B4( "Signature");
Skip_B4( "ByteOrder");
Frame_Count++;
if (Frame_Count_NotParsedIncluded!=(int64u)-1)
Frame_Count_NotParsedIncluded++;
Signature_Parsed=true;
}
示例5: Skip_B4
//---------------------------------------------------------------------------
void File_Cdxa::Header_Parse()
{
//Parsing
Skip_B4( "Sync1");
Skip_B4( "Sync2");
Skip_B4( "Sync3");
Skip_B4( "Header");
Skip_B8( "SubHeader");
//Filling
Header_Fill_Size(2352);
Header_Fill_Code(0, "Chunk");
}
示例6: Element_Name
//---------------------------------------------------------------------------
void File_Dpx::IndustrySpecificHeader_Dpx()
{
Element_Name("Industry specific header");
//Parsing
float32 FrameRate;
Element_Begin1("Motion-picture film information");
Skip_String(2, "Film mfg. ID code");
Skip_String(2, "Film type");
Skip_String(2, "Offset in perfs");
Skip_String(6, "Prefix");
Skip_String(4, "Count");
Skip_String(32, "Format - e.g. Academy");
Skip_B4( "Frame position in sequence");
Skip_B4( "Sequence length (frames)");
Skip_B4( "Held count (1 = default)");
Get_BF4 (FrameRate, "Frame rate of original (frames/s)");
Skip_BF4( "Shutter angle of camera in degrees");
Skip_UTF8(32, "Frame identification - e.g. keyframe");
Skip_UTF8(100, "Slate information");
Skip_XX(56, "Reserved for future use");
Element_End0();
Element_Begin1("Television information");
Skip_B4( "SMPTE time code");
Skip_B4( "SMPTE user bits");
Info_B1(Interlace, "Interlace");Param_Info1((Interlace==0?"noninterlaced":"2:1 interlace"));
Skip_B1( "Field number");
Info_B1(VideoSignalStandard, "Video signal standard");Param_Info1(DPX_VideoSignalStandard(VideoSignalStandard));
Skip_B1( "Zero");
Skip_BF4( "Horizontal sampling rate (Hz)");
Skip_BF4( "Vertical sampling rate (Hz)");
Skip_BF4( "Temporal sampling rate or frame rate (Hz)");
Skip_BF4( "Time offset from sync to first pixel (ms)");
Skip_BF4( "Gamma");
Skip_BF4( "Black level code value");
Skip_BF4( "Black gain");
Skip_BF4( "Breakpoint");
Skip_BF4( "Reference white level code value");
Skip_BF4( "Integration time (s)");
Skip_XX(76, "Reserved for future use");
Element_End0();
FILLING_BEGIN();
if (FrameRate)
Fill(StreamKind_Last, StreamPos_Last, "FrameRate", FrameRate);
FILLING_END();
}
示例7: ELEMENT_CASE
//---------------------------------------------------------------------------
void File_Nut::Data_Parse()
{
#define ELEMENT_CASE(_NAME) \
case Elements::_NAME : _NAME(); break;
//Parsing
if (Element_Size < 4)
{
Skip_XX(Element_Size, "Unknown");
return;
}
Element_Size-=4;
#ifndef __BORLANDC__
switch (Element_Code)
#else //__BORLANDC__
switch (Element_Code&0xFFFFFFFF) //Borland does not like int64u for const?
#endif //__BORLANDC__
{
ELEMENT_CASE(main);
ELEMENT_CASE(stream);
ELEMENT_CASE(syncpoint);
ELEMENT_CASE(index);
ELEMENT_CASE(info);
default : Skip_XX(Element_Size, "Data");
}
Element_Size+=4;
if (Element_Offset+4!=Element_Size)
Skip_XX(Element_Size - 4 - Element_Offset, "Unknown");
Skip_B4( "cheksum");
}
示例8: Signature
//---------------------------------------------------------------------------
void File_Png::Data_Parse()
{
if (!Signature_Parsed)
{
Signature();
return;
}
Element_Size-=4; //For CRC
#define CASE_INFO(_NAME, _DETAIL) \
case Elements::_NAME : Element_Info1(_DETAIL); _NAME(); break;
//Parsing
switch (Element_Code)
{
CASE_INFO(IDAT, "Image data");
CASE_INFO(IEND, "Image trailer");
CASE_INFO(IHDR, "Image header");
CASE_INFO(PLTE, "Palette table");
default : Skip_XX(Element_Size, "Unknown");
}
Element_Size+=4; //For CRC
Skip_B4( "CRC");
}
示例9: 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();
}
}
示例10: Skip_B4
//---------------------------------------------------------------------------
void File_MpcSv8::SH()
{
//Parsing
int64u SampleCount;
int8u Version, SampleFrequency, ChannelCount;
bool MidSideStereo;
Skip_B4( "CRC32");
Get_B1 (Version, "Version");
Get_VS (SampleCount, "Sample count");
Skip_VS( "Beginning silence");
BS_Begin();
Get_S1 (3, SampleFrequency, "Sample frequency"); Param_Info(Mpc_SampleFreq[SampleFrequency]);
Skip_S1(5, "Max used bands");
Get_S1 (4, ChannelCount, "Channel count");
Get_SB ( MidSideStereo, "Mid side stereo used");
Skip_S1(3, "Audio block frames");
BS_End();
//Filling
FILLING_BEGIN();
Fill(Stream_Audio, 0, Audio_SamplingRate, Mpc_SampleFreq[SampleFrequency]);
if (SampleCount)
{
Fill(Stream_Audio, 0, Audio_SamplingCount, SampleCount);
Fill(Stream_Audio, 0, Audio_Duration, SampleCount*1000/Mpc_SampleFreq[SampleFrequency]);
Fill(Stream_Audio, 0, Audio_BitRate, File_Size*8*Mpc_SampleFreq[SampleFrequency]/SampleCount); //Should be more precise...
}
Fill(Stream_Audio, 0, Audio_Resolution, 16); //MPC support only 16 bits
FILLING_END();
}
示例11: Element_Begin1
//---------------------------------------------------------------------------
void File_Iso9660::Primary_Volume_Descriptor()
{
int32u Volume_Space_Size;
Element_Begin1("Volume_Descriptor");
Skip_B1("Volume Descriptor Type");
Skip_Local(5,"Standard Identifier");
Skip_B1("Volume Descriptor Version");
Skip_B1("Unused field");
Skip_Local(32,"System Identifier");
Skip_Local(32,"Volume Identifier");
Skip_XX(8,"Unused field");
Get_D4(Volume_Space_Size, "Volume Space Size"); Param_Info2(Volume_Space_Size*(int64u)2048, " bytes");
Skip_XX(32,"Unused field");
Skip_B4("Volume Set Size");
Skip_B4("Volume Sequence Number");
Skip_B4("Logical Block Size");
Skip_B8("Path Table Size");
Skip_B4("Location of Occurrence of Type L Path Table");
Skip_B4("Location of Optional Occurrence of Type L Path Table");
Skip_B4("Location of Occurrence of Type M Path Table");
Skip_B4("Location of Optional Occurrence of Type M Path Table");
Skip_Local(34,"Directory Record for Root Directory");
Skip_Local(128,"Volume Set Identifier");
Skip_Local(128,"Publisher Identifier");
Skip_Local(128,"Data Preparer Identifier");
Skip_Local(128,"Application Identifier");
Skip_Local(37,"Copyright File Identifier");
Skip_Local(37,"Abstract File Identifier");
Skip_Local(37,"Bibliographic File Identifier");
Skip_XX(17,"Volume Creation Date and Time");
Element_End0();
}
示例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: 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();
}
示例14: Skip_B4
//---------------------------------------------------------------------------
void File_Rar::Read_Buffer_Continue()
{
Skip_B4( "Magic");
Skip_XX(File_Size-4, "Data");
FILLING_BEGIN();
Accept("RAR");
Fill(Stream_General, 0, General_Format, "RAR");
Finish("RAR");
FILLING_END();
}
示例15: Reject
//---------------------------------------------------------------------------
void File_Cdxa::Data_Parse()
{
if (MI==NULL)
{
//Where is the header? --> Problem
Reject("CDXA");
return;
}
//CRC or not?
int64u CRC_Size=4;
if (Element_Size!=2328)
CRC_Size=0;
//Parsing
Skip_XX(Element_Size-CRC_Size, "Data");
if (CRC_Size>0)
Skip_B4( "CRC");
//Preparing to fill MediaInfo with a buffer
MI->Open_Buffer_Position_Set(File_Offset+Buffer_Offset);
//Sending the buffer to MediaInfo
MI->Open_Buffer_Continue(Buffer+Buffer_Offset, (size_t)(Element_Size-CRC_Size));
//Testing if filled
if (MI->Info->Status[IsFilled]) {
}
//Testing if MediaInfo always need data
File_GoTo=MI->Open_Buffer_Continue_GoTo_Get();
if (File_GoTo==(int64u)-1 && MI->Info->Status[IsFilled] && File_Size!=(int64u)-1 && File_Offset+Buffer_Size<File_Size/2)
GoToFromEnd(File_Offset+Buffer_Size);
if (File_GoTo!=(int64u)-1)
Info("CDXA, Jumping to end of file");
//Details
#if MEDIAINFO_TRACE
if (Config_Trace_Level)
{
if (!MI->Inform().empty())
Element_Show_Add(MI->Inform());
}
#endif //MEDIAINFO_TRACE
//Demux
Demux(Buffer+Buffer_Offset, (size_t)(Element_Size-CRC_Size), ContentType_MainStream);
}