当前位置: 首页>>代码示例>>C++>>正文


C++ Get_L4函数代码示例

本文整理汇总了C++中Get_L4函数的典型用法代码示例。如果您正苦于以下问题:C++ Get_L4函数的具体用法?C++ Get_L4怎么用?C++ Get_L4使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Get_L4函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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();
}
开发者ID:eagleatustb,项目名称:p2pdown,代码行数:28,代码来源:File_Bmp.cpp

示例2: 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?
}
开发者ID:0vermind,项目名称:NeoLoader,代码行数:55,代码来源:File_Rar.cpp

示例3: Element_Begin1

//---------------------------------------------------------------------------
void File_Bmp::Read_Buffer_Continue()
{
    //Parsing
    int32u Size, DIB_Size, Offset;
    Element_Begin1("File header");
        Skip_C2(                                                "Magic");
        Get_L4 (Size,                                           "Size");
        Skip_L2(                                                "Reserved");
        Skip_L2(                                                "Reserved");
        Get_L4 (Offset,                                         "Offset of data");
    Element_End0();

    FILLING_BEGIN();
        if (Size!=(int32u)-1 && Size!=File_Size)
        {
            Reject("BMP");
            return;
        }

        Accept("BMP");

        Fill(Stream_General, 0, General_Format, "Bitmap");

        Stream_Prepare(Stream_Image);
    FILLING_END();

    Element_Begin1("DIB header");
        Peek_L4 (DIB_Size);
        switch (DIB_Size)
        {
            case  12 : BitmapCoreHeader(1); break;
            case  40 : BitmapInfoHeader(1); break;
            case  52 : BitmapInfoHeader(2); break;
            case  56 : BitmapInfoHeader(3); break;
            case  64 : BitmapCoreHeader(2); break;
            case 108 : BitmapInfoHeader(4); break;
            case 124 : BitmapInfoHeader(5); break;
            default  : if (DIB_Size>124)
                       {
                           BitmapInfoHeader((int8u)-1); //Future versions of BitmapInfoHeader (OS/2 is abandonned)
                           Skip_XX(14+124-Element_Offset,       "Unknown");
                       }
        }
    Element_End0();

    if (Element_Offset<Offset)
        Skip_XX(Offset-Element_Offset,                          "Other header data");
    Skip_XX(File_Size-Offset,                                   "Image data");

    //No need of more
    Finish("BMP");
}
开发者ID:BladeScar,项目名称:MediaInfoLib,代码行数:53,代码来源:File_Bmp.cpp

示例4: Skip_Local

//---------------------------------------------------------------------------
void File_Rkau::FileHeader_Parse()
{
    //Parsing
    Ztring version;
    int32u SampleRate, source_bytes;
    int8u Channels, BitsPerSample, Quality, Flags;
    bool joint_stereo, streaming, vrq_lossy_mode;

    Skip_Local(3,                                               "Signature");
    Get_Local (1, version,                                      "Version");
    Get_L4 (source_bytes,                                       "SourceBytes");
    Get_L4 (SampleRate,                                         "SampleRate");
    Get_L1 (Channels,                                           "Channels");
    Get_L1 (BitsPerSample,                                      "BitsPerSample");
    Get_L1 (Quality,                                            "Quality");
    Get_L1 (Flags,                                              "Flags");
    Get_Flags (Flags, 0, joint_stereo,                          "JointStereo");
    Get_Flags (Flags, 1, streaming,                             "Streaming");
    Get_Flags (Flags, 2, vrq_lossy_mode,                        "VRQLossyMode");

    FILLING_BEGIN();
        if (SampleRate==0)
            return;
        Duration=(((int64u)source_bytes*1000)/4)/SampleRate;
        if (Duration==0)
            return;
        UncompressedSize=Channels*(BitsPerSample/8);
        if (UncompressedSize==0)
            return;

        //Filling data
        File__Tags_Helper::Accept("RKAU");

        File__Tags_Helper::Stream_Prepare(Stream_Audio);
        Fill(Stream_Audio, 0, Audio_Format, "RK Audio");
        Fill(Stream_Audio, 0, Audio_Codec, "Rkau");
        Fill(Stream_Audio, 0, Audio_Encoded_Library, __T("1.0") + version);
        Fill(Stream_Audio, 0, Audio_Compression_Mode, (Quality==0)?"Lossless":"Lossy");
        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);

    FILLING_END();

    //No more needed data
    File__Tags_Helper::Finish("RKAU");
}
开发者ID:3F,项目名称:FlightSDCpp,代码行数:49,代码来源:File_Rkau.cpp

示例5: Get_L4

//---------------------------------------------------------------------------
void File_Dpx::Get_X4(int32u &Info, const char* Name)
{
    if (LittleEndian)
        Get_L4 (Info,                                           Name);
    else
        Get_B4 (Info,                                           Name);
}
开发者ID:BladeScar,项目名称:MediaInfoLib,代码行数:8,代码来源:File_Dpx.cpp

示例6: 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);
}
开发者ID:Dimetro83,项目名称:DC_DDD,代码行数:32,代码来源:File_Exr.cpp

示例7: Read_Internal_ReadAllInBuffer

//---------------------------------------------------------------------------
void Riff_AVI__hdrl_strl_indx::Read_Internal ()
{
    //Filling
    Global->AVI__hdrl_strl_indx_Pointers.insert(this);

    //Reading
    Read_Internal_ReadAllInBuffer();

    //Parsing
    int32u Entry_Count, ChunkId;
    int16u LongsPerEntry;
    int8u  IndexType, IndexSubType;
    Get_L2 (LongsPerEntry);
    Get_L1 (IndexSubType);
    Get_L1 (IndexType);
    Get_L4 (Entry_Count);
    Get_C4 (ChunkId);

    //Integrity
    if (LongsPerEntry!=4 || (IndexSubType&0xFE) || IndexType!=0x00 || 24+Entry_Count*16>Chunk.Content.Size)
        throw exception_valid("hdrl_strl_indx form is not supported");

    //Parsing
    Skip_XX(12); //Reserved
    for (int32u Pos=0; Pos<Entry_Count; Pos++)
    {
        int64u Offset;
        Get_L8 (Offset);
        Skip_XX(8); //Size + Duration

        //Filling
        Global->AVI__hdrl_strl_indx_In_Position_Indexes_List.push_back(Offset);
        Global->AVI__movi___ix_WithFields[ChunkId]=(IndexSubType&0x01)?true:false;
    }
}
开发者ID:courtneyegan,项目名称:AVI-MetaEdit,代码行数:36,代码来源:Riff_Chunks_AVI__hdrl_strl_indx.cpp

示例8: Element_Name

//---------------------------------------------------------------------------
void File_Celt::Comment()
{
    Element_Name("Comment?");

    while (Element_Offset<Element_Size)
    {
        Ztring value;
        int32u size;
        Get_L4(size,                                            "size");
        if (size)
            Get_Local(size, value,                              "value");

        //Filling
        if (value.find(__T("CELT "))!=std::string::npos)
        {
            Ztring Version=value.SubString(__T("CELT "), __T(" ("));
            Fill(Stream_Audio, 0, Audio_Encoded_Library, __T("CELT ")+Version);
            Fill(Stream_Audio, 0, Audio_Encoded_Library_Name, __T("CELT"));
            Fill(Stream_Audio, 0, Audio_Encoded_Library_Version, Version);
        }
        else if (!value.empty())
            Fill(Stream_Audio, 0, "Comment", value);
    }

    Finish("CELT");
}
开发者ID:3F,项目名称:FlightSDCpp,代码行数:27,代码来源:File_Celt.cpp

示例9: Element_Begin1

bool File_Zip::end_of_central_directory()
{
    if (Element_Offset+22>Element_Size) //end_of_central_directory up to relative offset of .ZIP file comment length included
        return false; //Not enough data

    //Retrieving complete local_file_header size
    int16u zip_comment_length=LittleEndian2int16u(Buffer+(size_t)Element_Offset+20);
    if (Element_Offset+22+zip_comment_length>Element_Size) //end_of_central_directory all included
        return false; //Not enough data

    //Parsing
    int32u offset;
    Element_Begin1("End of central directory");
    Skip_C4(                                                    "end of central dir signature");
    Skip_L2(                                                    "number of this disk");
    Skip_L2(                                                    "number of the disk");// with the start of the central directory
    Skip_L2(                                                    "total number of entries on this disk");// in the central directory
    Skip_L2(                                                    "total number of entries");// in the central directory
    Skip_L4(                                                    "size of the central directory");
    Get_L4 (offset,                                             "offset of start of central directory");// with respect to the starting disk number
    Skip_L2(                                                    "zip file comment length");
    Skip_XX(zip_comment_length,                                 "zip file comment");
    Element_End0();

    //Going to first central directory (once)
    if (!end_of_central_directory_IsParsed)
    {
        end_of_central_directory_IsParsed=true;
        GoTo(offset);
    }
    return true;
}
开发者ID:Dimetro83,项目名称:DC_DDD,代码行数:32,代码来源:File_Zip.cpp

示例10: 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();
}
开发者ID:Chlara,项目名称:MediaConch,代码行数:46,代码来源:File_Pmp.cpp

示例11: Skip_C4

//---------------------------------------------------------------------------
void File_Ogg::Header_Parse()
{
    //Parsing
    int64u absolute_granule_position;
    int32u stream_serial_number, page_sequence_no;
    int16u total_page_size;
    int8u  stream_structure_version, flags, page_segments, packet_lacing_value;
    Skip_C4(                                                    "capture_pattern");
    Get_L1 (stream_structure_version,                           "stream_structure_version");
    Get_L1 (flags,                                              "header_type_flag");
        Get_Flags (flags, 0, continued,                         "continued packet");
        Skip_Flags(flags, 1,                                    "first page of logical bitstream (bos)");
        Skip_Flags(flags, 2,                                    "last page of logical bitstream (eos)");
    Get_L8 (absolute_granule_position,                          "absolute granule position");
    Get_L4 (stream_serial_number,                               "stream serial number");
    Get_L4 (page_sequence_no,                                   "page sequence no");
    Skip_L4(                                                    "page checksum");
    Get_L1 (page_segments,                                      "page_segments");
    total_page_size=0;
    Chunk_Sizes.clear();
    Chunk_Sizes.push_back(0);
    for (int8u Pos=0; Pos<page_segments; Pos++)
    {
        Get_L1 (packet_lacing_value,                            "packet lacing value");
        total_page_size+=packet_lacing_value;
        Chunk_Sizes[Chunk_Sizes.size()-1]+=packet_lacing_value;
        if (packet_lacing_value!=0xFF)
        {
            Chunk_Sizes.push_back(0);
            Chunk_Sizes_Finnished=true;
        }
        else
            Chunk_Sizes_Finnished=false;
    }
    if (Chunk_Sizes_Finnished)
        Chunk_Sizes.resize(Chunk_Sizes.size()-1); //Keep out the last value

    //Filling
    Header_Fill_Size(27+page_segments+total_page_size);
    Header_Fill_Code(stream_serial_number, Ztring::ToZtring(stream_serial_number, 16));
    Stream[stream_serial_number].absolute_granule_position=absolute_granule_position;
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:43,代码来源:File_Ogg.cpp

示例12: 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();
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:42,代码来源:File_Ps2Audio.cpp

示例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();
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:52,代码来源:File_La.cpp

示例14: Get_L1

//---------------------------------------------------------------------------
void File_Ico::Data_Parse()
{
    //Parsing
    int32u Size, Offset;
    int16u BitsPerPixel;
    int8u Width, Height;
    Get_L1 (Width,                                      "Width");
    Get_L1 (Height,                                     "Height");
    Skip_L1(                                            "Colour count");
    Skip_L1(                                            "Reserved");
    Skip_L2(                                            Type==1?"Colour planes":"X hotspot");
    Get_L2 (BitsPerPixel,                               Type==1?"Bits per pixel":"Y hotspot");
    Get_L4 (Size,                                       "Size of the bitmap data");
    Get_L4 (Offset,                                     "Offset of the bitmap data");

    FILLING_BEGIN_PRECISE();
        stream Stream;
        Stream.Width=Width;
        Stream.Height=Height;
        Stream.BitsPerPixel=BitsPerPixel;
        Stream.Size=Size;
        Stream.Offset=Offset;
        Streams.push_back(Stream);

        IcoDataSize+=Size;
        if (Offset>File_Size || File_Offset+Buffer_Offset+Element_Size+IcoDataSize>File_Size)
            Reject("ICO");
        Count--;
        if (Count==0)
        {
            if (File_Offset+Buffer_Offset+Element_Size+IcoDataSize!=File_Size)
                Reject("ICO");
            else
            {
                Accept("ICO");
                Finish("ICO");
            }
        }
    FILLING_END();
}
开发者ID:asfdfdfd,项目名称:MediaInfoLib-Avdump2-Mac,代码行数:41,代码来源:File_Ico.cpp

示例15: Header_Fill_Code

//---------------------------------------------------------------------------
void File_ApeTag::Header_Parse()
{
    //Testing if begin or end of tags
    if (CC8(Buffer+Buffer_Offset)==0x4150455441474558LL) //"APETAGEX"
    {
        //Filling
        Header_Fill_Code((int64u)-1, "File Footer");
        Header_Fill_Size(0x20);
        return;
    }

    //Parsing
    Ztring Value;
    int32u Flags, Length;
    Get_L4 (Length,                                         "Length");
    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");
    size_t Pos=(size_t)Element_Offset;
    for (; Pos<Element_Size; Pos++)
        if (Buffer[Buffer_Offset+Pos]==0x00)
            break;
    if (Pos==Element_Size)
    {
        Element_WaitForMoreData();
        return;
    }
    Get_String(Pos-Element_Offset, Key,                     "Key");
    Skip_L1(                                                "0x00");

    //Filling
    Header_Fill_Code(0, Key.c_str());
    Header_Fill_Size(Element_Offset+Length);
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:39,代码来源:File_ApeTag.cpp


注:本文中的Get_L4函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。