Example #1
0
MP4Atom* MP4Track::AddAtom(char* parentName, char* childName)
{
	MP4Atom* pChildAtom = MP4Atom::CreateAtom(childName);

	MP4Atom* pParentAtom = m_pTrakAtom->FindAtom(parentName);
	ASSERT(pParentAtom);

	pParentAtom->AddChildAtom(pChildAtom);

	pChildAtom->Generate();

	return pChildAtom;
}
Example #2
0
void MP4StblAtom::Generate()
{
    // as usual
    MP4Atom::Generate();

    // but we also need one of the chunk offset atoms
    MP4Atom* pChunkOffsetAtom;
    if (m_File.Use64Bits(GetType())) {
        pChunkOffsetAtom = CreateAtom(m_File, this, "co64");
    } else {
        pChunkOffsetAtom = CreateAtom(m_File, this, "stco");
    }

    AddChildAtom(pChunkOffsetAtom);

    // and ask it to self generate
    pChunkOffsetAtom->Generate();
}