123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- #include "mp4common.h"
- MP4StszAtom::MP4StszAtom()
- : MP4Atom("stsz")
- {
- AddVersionAndFlags();
- AddProperty(
- new MP4Integer32Property("sampleSize"));
- MP4Integer32Property* pCount =
- new MP4Integer32Property("sampleCount");
- AddProperty(pCount);
- MP4TableProperty* pTable = new MP4TableProperty("entries", pCount);
- AddProperty(pTable);
- pTable->AddProperty(
- new MP4Integer32Property("entrySize"));
- }
- void MP4StszAtom::Read()
- {
- ReadProperties(0, 4);
- u_int32_t sampleSize =
- ((MP4Integer32Property*)m_pProperties[2])->GetValue();
-
-
- m_pProperties[4]->SetImplicit(sampleSize != 0);
- ReadProperties(4);
- Skip();
- }
- void MP4StszAtom::Write()
- {
- u_int32_t sampleSize =
- ((MP4Integer32Property*)m_pProperties[2])->GetValue();
-
-
- m_pProperties[4]->SetImplicit(sampleSize != 0);
- MP4Atom::Write();
- }
|