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


C++ BitStream::readSubBoxBitStream方法代码示例

本文整理汇总了C++中BitStream::readSubBoxBitStream方法的典型用法代码示例。如果您正苦于以下问题:C++ BitStream::readSubBoxBitStream方法的具体用法?C++ BitStream::readSubBoxBitStream怎么用?C++ BitStream::readSubBoxBitStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BitStream的用法示例。


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

示例1: parseBox

void HevcSampleEntry::parseBox(BitStream& bitstr)
{
    VisualSampleEntryBox::parseBox(bitstr);

    while (bitstr.numBytesLeft() > 0)
    {
        // Extract contained box bitstream and type
        std::string boxType;
        BitStream subBitStream = bitstr.readSubBoxBitStream(boxType);

        // Handle this box based on the type
        if (boxType == "hvcC")
        {
            mHevcConfigurationBox.parseBox(subBitStream);
        }
        else if (boxType == "ccst")
        {
            mCodingConstraintsBox.parseBox(subBitStream);
            mIsCodingConstraintsPresent = true;
        }
        else
        {
            logWarning() << "Skipping unknown box of type '" << boxType << "' inside HevcSampleEntry" << std::endl;
        }
    }

}
开发者ID:pstanczyk,项目名称:heif,代码行数:27,代码来源:hevcsampleentry.cpp

示例2: parseBox

void ItemPropertiesBox::parseBox(BitStream& input)
{
    parseBoxHeader(input);

    std::string subBoxType;
    BitStream subBitStream = input.readSubBoxBitStream(subBoxType);
    mContainer.parseBox(subBitStream);

    subBitStream = input.readSubBoxBitStream(subBoxType);
    if (subBoxType != "ipma")
    {
        throw std::runtime_error("ItemPropertiesBox includes a box which is not ipma");
    }

    // There could be several ItemPropertyAssociation boxes, but currently only one is supported.
    mAssociations.parseBox(subBitStream);

    if (input.numBytesLeft() > 0)
    {
        logWarning() << "ItemPropertiesBox::parseBox() supports currently only one ipma box, but there seems to  be more." << std::endl;
    }
}
开发者ID:axelriet,项目名称:heif,代码行数:22,代码来源:itempropertiesbox.cpp

示例3: parseBox

void SampleTableBox::parseBox(BitStream& bitstr)
{
    //  First parse the box header
    parseBoxHeader(bitstr);

    // if there a data available in the file
    while (bitstr.numBytesLeft() > 0)
    {
        // Extract contained box bitstream and type
        std::string boxType;
        BitStream subBitstr = bitstr.readSubBoxBitStream(boxType);

        // Handle this box based on the type
        if (boxType == "stsd")
        {
            mSampleDescriptionBox.parseBox(subBitstr);
        }
        else if (boxType == "stco" || boxType == "co64") // 'co64' is the 64-bit version
        {
            mChunkOffsetBox.parseBox(subBitstr);
        }
        else if (boxType == "stsz")
        {
            mSampleSizeBox.parseBox(subBitstr);
        }
        else if (boxType == "stts")
        {
            mTimeToSampleBox.parseBox(subBitstr);
        }
        else if (boxType == "stsc")
        {
            mSampleToChunkBox.parseBox(subBitstr);
        }
        else if (boxType == "stss")
        {
            mSyncSampleBox = std::make_shared<SyncSampleBox>();
            mSyncSampleBox->parseBox(subBitstr);
        }
        else if (boxType == "sgpd")
        {
            auto sgdb = new SampleGroupDescriptionBox;
            sgdb->parseBox(subBitstr);
            mSampleGroupDescriptionBox.reset(sgdb);
        }
        else if (boxType == "sbgp")
        {
            SampleToGroupBox sampleToGroupBox;
            sampleToGroupBox.parseBox(subBitstr);
            mSampleToGroupBox.push_back(move(sampleToGroupBox));
        }
        else if (boxType == "cslg")
        {
            mCompositionToDecodeBox = std::make_shared<CompositionToDecodeBox>();
            mCompositionToDecodeBox->parseBox(subBitstr);
        }
        else if (boxType == "ctts")
        {
            mCompositionOffsetBox = std::make_shared<CompositionOffsetBox>();
            mCompositionOffsetBox->parseBox(subBitstr);
        }
        else
        {
            logWarning() << "Skipping unknown box of type '" << boxType << "' inside SampleTableBox" << endl;
        }
    }

    // We need to update stsc decoded presentation of chunk entries.
    mSampleToChunkBox.decodeEntries(mChunkOffsetBox.getChunkOffsets().size());
}
开发者ID:nokiatech,项目名称:heif,代码行数:69,代码来源:sampletablebox.cpp


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