コード例 #1
0
ファイル: RDD9IndexTable.cpp プロジェクト: hdsdi3g/bmx
void RDD9IndexTable::WriteVBESegments(File *mxf_file, vector<RDD9IndexTableSegment*> &segments)
{
    size_t i;
    for (i = 0; i < segments.size(); i++) {
        IndexTableSegment *segment = segments[i]->GetSegment();
        ByteArray *entries = segments[i]->GetEntries();

        mxfUUID uuid;
        mxf_generate_uuid(&uuid);
        segment->setInstanceUID(uuid);

        // Note: RDD9 states that PosTableCount is not encoded but mxf_write_index_table_segment will write it with
        //       the default value 0
        segment->writeHeader(mxf_file, (uint32_t)mDeltaEntries.size(), (uint32_t)segment->getIndexDuration());

        if (!mDeltaEntries.empty()) {
            segment->writeDeltaEntryArrayHeader(mxf_file, (uint32_t)mDeltaEntries.size());
            size_t j;
            for (j = 0; j < mDeltaEntries.size(); j++) {
                segment->writeDeltaEntry(mxf_file, mDeltaEntries[j].pos_table_index, mDeltaEntries[j].slice,
                                         mDeltaEntries[j].element_delta);
            }
        }

        segment->writeIndexEntryArrayHeader(mxf_file, mSliceCount, 0, (uint32_t)segment->getIndexDuration());
        mxf_file->write(entries->GetBytes(), entries->GetSize());
    }
}
コード例 #2
0
ファイル: OP1AIndexTable.cpp プロジェクト: hdsdi3g/bmx
void OP1AIndexTable::WriteVBESegments(File *mxf_file)
{
    BMX_ASSERT(mInputDuration < 0);
    size_t i;
    for (i = 0; i < mIndexSegments.size(); i++) {
        IndexTableSegment *segment = mIndexSegments[i]->GetSegment();
        ByteArray *entries = mIndexSegments[i]->GetEntries();

        segment->writeHeader(mxf_file, (uint32_t)mDeltaEntries.size(), (uint32_t)segment->getIndexDuration());

        if (!mDeltaEntries.empty()) {
            segment->writeDeltaEntryArrayHeader(mxf_file, (uint32_t)mDeltaEntries.size());
            size_t j;
            for (j = 0; j < mDeltaEntries.size(); j++) {
                segment->writeDeltaEntry(mxf_file, mDeltaEntries[j].pos_table_index, mDeltaEntries[j].slice,
                                         mDeltaEntries[j].element_delta);
            }
        }

        segment->writeIndexEntryArrayHeader(mxf_file, mSliceCount, 0, (uint32_t)segment->getIndexDuration());
        mxf_file->write(entries->GetBytes(), entries->GetSize());

        delete mIndexSegments[i];
    }

    mIndexSegments.clear();
}
コード例 #3
0
ファイル: Shader.cpp プロジェクト: Ilearn32/NazaraEngine
	bool Shader::LoadFromBinary(const ByteArray& byteArray)
	{
		return LoadFromBinary(byteArray.GetConstBuffer(), byteArray.GetSize());
	}