12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #include "mp4common.h"
- MP4Mp4vAtom::MP4Mp4vAtom()
- : MP4Atom("mp4v")
- {
- AddReserved("reserved1", 6);
- AddProperty(
- new MP4Integer16Property("dataReferenceIndex"));
- AddReserved("reserved2", 16);
- AddProperty(
- new MP4Integer16Property("width"));
- AddProperty(
- new MP4Integer16Property("height"));
- AddReserved("reserved3", 14);
- MP4StringProperty* pProp =
- new MP4StringProperty("compressorName");
- pProp->SetFixedLength(32);
- pProp->SetValue("");
- AddProperty(pProp);
- AddReserved("reserved4", 4);
- ExpectChildAtom("esds", Required, OnlyOne);
- }
- void MP4Mp4vAtom::Generate()
- {
- MP4Atom::Generate();
- ((MP4Integer16Property*)m_pProperties[1])->SetValue(1);
-
- static u_int8_t reserved3[14] = {
- 0x00, 0x48, 0x00, 0x00,
- 0x00, 0x48, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x01,
- };
- m_pProperties[5]->SetReadOnly(false);
- ((MP4BytesProperty*)m_pProperties[5])->
- SetValue(reserved3, sizeof(reserved3));
- m_pProperties[5]->SetReadOnly(true);
-
- static u_int8_t reserved4[4] = {
- 0x00, 0x18, 0xFF, 0xFF,
- };
- m_pProperties[7]->SetReadOnly(false);
- ((MP4BytesProperty*)m_pProperties[7])->
- SetValue(reserved4, sizeof(reserved4));
- m_pProperties[7]->SetReadOnly(true);
- }
|