MP4StscAtom::MP4StscAtom() : MP4Atom("stsc") { AddVersionAndFlags(); MP4Integer32Property* pCount = new MP4Integer32Property("entryCount"); AddProperty(pCount); MP4TableProperty* pTable = new MP4TableProperty("entries", pCount); AddProperty(pTable); pTable->AddProperty( new MP4Integer32Property("firstChunk")); pTable->AddProperty( new MP4Integer32Property("samplesPerChunk")); pTable->AddProperty( new MP4Integer32Property("sampleDescriptionIndex")); // As an optimization we add an implicit property to this table, // "firstSample" that corresponds to the first sample of the firstChunk MP4Integer32Property* pSample = new MP4Integer32Property("firstSample"); pSample->SetImplicit(); pTable->AddProperty(pSample); }
MP4TrefTypeAtom::MP4TrefTypeAtom(const char* type) : MP4Atom(type) { MP4Integer32Property* pCount = new MP4Integer32Property("entryCount"); pCount->SetImplicit(); AddProperty(pCount); /* 0 */ MP4TableProperty* pTable = new MP4TableProperty("entries", pCount); AddProperty(pTable); /* 1 */ pTable->AddProperty( /* 1, 0 */ new MP4Integer32Property("trackId")); }
MP4StdpAtom::MP4StdpAtom() : MP4Atom("stdp") { AddVersionAndFlags(); MP4Integer32Property* pCount = new MP4Integer32Property("entryCount"); pCount->SetImplicit(); AddProperty(pCount); MP4TableProperty* pTable = new MP4TableProperty("entries", pCount); AddProperty(pTable); pTable->AddProperty( new MP4Integer16Property("priority")); }
MP4FtypAtom::MP4FtypAtom() : MP4Atom("ftyp") { MP4StringProperty* pProp = new MP4StringProperty("majorBrand"); pProp->SetFixedLength(4); AddProperty(pProp); /* 0 */ AddProperty( /* 1 */ new MP4Integer32Property("minorVersion")); MP4Integer32Property* pCount = new MP4Integer32Property("compatibleBrandsCount"); pCount->SetImplicit(); AddProperty(pCount); /* 2 */ MP4TableProperty* pTable = new MP4TableProperty("compatibleBrands", pCount); AddProperty(pTable); /* 3 */ pProp = new MP4StringProperty("brand"); pProp->SetFixedLength(4); pTable->AddProperty(pProp); }