• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Header_Fill_Size函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了Header_Fill_Size函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
    }
}
开发者ID:aleksei-t,项目名称:flylinkdc-r5xx,代码行数:27,代码来源:File_Nut.cpp


示例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);
}
开发者ID:pavel-pimenov,项目名称:sandbox,代码行数:26,代码来源:File_Mpeg4_Descriptors.cpp


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


示例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);
}
开发者ID:almin-stardust,项目名称:MediaInfoLib,代码行数:28,代码来源:File_DvbSubtitle.cpp


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


示例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
}
开发者ID:github188,项目名称:BasicFunctionCodeBase,代码行数:10,代码来源:File_Pcm.cpp


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


示例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;
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:30,代码来源:File_AvsV.cpp


示例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);
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:31,代码来源:File_Jpeg.cpp


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


示例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");
}
开发者ID:jgreer,项目名称:MediaInfoLib,代码行数:48,代码来源:File_DolbyE.cpp


示例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");
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:57,代码来源:File_Dts.cpp


示例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]);
}
开发者ID:BladeScar,项目名称:MediaInfoLib,代码行数:20,代码来源:File_Dpx.cpp


示例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");
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:20,代码来源:File_Wvpk.cpp


示例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());
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:21,代码来源:File_Lyrics3v2.cpp


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


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


示例18: 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
}
开发者ID:pavel-pimenov,项目名称:sandbox,代码行数:12,代码来源:File_TwinVQ.cpp


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


示例20: BS_Begin

//---------------------------------------------------------------------------
void File_Eia708::Header_Parse()
{
    //Parsing
    int8u packet_size, sequence_number;
    BS_Begin();
    Get_S1(2, sequence_number,                                  "sequence_number");
    Get_S1(6, packet_size,                                      "packet_size");
    BS_End();

    Header_Fill_Code(0, _T("DTVCC packet"));
    Header_Fill_Size(packet_size*2);
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:13,代码来源:File_Eia708.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ HealthAbovePct函数代码示例发布时间:2022-05-30
下一篇:
C++ Header_Fill_Code函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap