1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- #include "mp4common.h"
- MP4StsdAtom::MP4StsdAtom()
- : MP4Atom("stsd")
- {
- AddVersionAndFlags();
- MP4Integer32Property* pCount =
- new MP4Integer32Property("entryCount");
- pCount->SetReadOnly();
- AddProperty(pCount);
- ExpectChildAtom("mp4a", Optional, Many);
- ExpectChildAtom("enca", Optional, Many);
- ExpectChildAtom("mp4s", Optional, Many);
- ExpectChildAtom("mp4v", Optional, Many);
- ExpectChildAtom("encv", Optional, Many);
- ExpectChildAtom("rtp ", Optional, Many);
- ExpectChildAtom("samr", Optional, Many);
- ExpectChildAtom("sawb", Optional, Many);
- ExpectChildAtom("s263", Optional, Many);
- ExpectChildAtom("avc1", Optional, Many);
- ExpectChildAtom("alac", Optional, Many);
- ExpectChildAtom("text", Optional, Many);
- }
- void MP4StsdAtom::Read()
- {
-
- MP4Atom::Read();
-
- MP4Integer32Property* pCount =
- (MP4Integer32Property*)m_pProperties[2];
- if (m_pChildAtoms.Size() != pCount->GetValue()) {
- VERBOSE_READ(GetVerbosity(),
- printf("Warning: stsd inconsistency with number of entries"));
-
- pCount->SetReadOnly(false);
- pCount->SetValue(m_pChildAtoms.Size());
- pCount->SetReadOnly(true);
- }
- }
|