void MP4SoundAtom::Read() { MP4Atom *parent = GetParentAtom(); if (ATOMID(parent->GetType()) != ATOMID("stsd")) { // Quicktime has an interesting thing - they'll put an mp4a atom // which is blank inside a wave atom, which is inside an mp4a atom // we have a mp4a inside an wave inside an mp4a - delete all properties m_pProperties.Delete(8); m_pProperties.Delete(7); m_pProperties.Delete(6); m_pProperties.Delete(5); m_pProperties.Delete(4); m_pProperties.Delete(3); m_pProperties.Delete(2); m_pProperties.Delete(1); m_pProperties.Delete(0); if (ATOMID(GetType()) == ATOMID("alac")) { AddProperty(new MP4BytesProperty("decoderConfig", m_size)); ReadProperties(); } if (m_pChildAtomInfos.Size() > 0) { ReadChildAtoms(); } } else { ReadProperties(0, 3); // read first 3 properties AddProperties(((MP4IntegerProperty *)m_pProperties[2])->GetValue()); ReadProperties(3); // continue if (m_pChildAtomInfos.Size() > 0) { ReadChildAtoms(); } } Skip(); }
void MP4HntiAtom::Read() { MP4Atom* grandParent = m_pParentAtom->GetParentAtom(); ASSERT(grandParent); if (ATOMID(grandParent->GetType()) == ATOMID("trak")) { ExpectChildAtom("sdp ", Optional, OnlyOne); } else { ExpectChildAtom("rtp ", Optional, OnlyOne); } MP4Atom::Read(); }
void MP4Meta2Atom::Read () { MP4Atom *parent = GetParentAtom(); if (ATOMID(parent->GetType()) == ATOMID("udta")) { // add data property AddReserved("reserved2", 4); /* 0 */ AddProperty( new MP4BytesProperty("metadata")); /* 1 */ ((MP4BytesProperty*)m_pProperties[1])->SetValueSize(m_size - 4); } else { ExpectChildAtom("data", Required, OnlyOne); } MP4Atom::Read(); }