1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- #include "mp4common.h"
- MP4DrefAtom::MP4DrefAtom()
- : MP4Atom("dref")
- {
- AddVersionAndFlags();
- MP4Integer32Property* pCount =
- new MP4Integer32Property("entryCount");
- pCount->SetReadOnly();
- AddProperty(pCount);
- ExpectChildAtom("url ", Optional, Many);
- ExpectChildAtom("urn ", Optional, Many);
- ExpectChildAtom("alis", Optional, Many);
- }
- void MP4DrefAtom::Read()
- {
-
- MP4Atom::Read();
-
- MP4Integer32Property* pCount =
- (MP4Integer32Property*)m_pProperties[2];
- if (m_pChildAtoms.Size() != pCount->GetValue()) {
-
-
- pCount->SetReadOnly(false);
- pCount->SetValue(m_pChildAtoms.Size());
- pCount->SetReadOnly(true);
- }
- }
|