コード例 #1
0
ファイル: atom_stsc.cpp プロジェクト: hibive/sjmt6410pm090728
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);
}
コード例 #2
0
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"));
}
コード例 #3
0
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"));
}
コード例 #4
0
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);
}