Exemplo n.º 1
0
 void ReadEntry(MP4File& file, uint32_t index) {
     // Each table has a size, followed by the length field
     // first, read the length
     m_pProperties[0]->Read(file, index);
     MP4IntegerProperty *pIntProp = (MP4IntegerProperty *)m_pProperties[0];
     // set the size in the bytes property
     MP4BytesProperty *pBytesProp = (MP4BytesProperty *)m_pProperties[1];
     pBytesProp->SetValueSize(pIntProp->GetValue(index), index);
     // And read the bytes
     m_pProperties[1]->Read(file, index);
 };
Exemplo n.º 2
0
static void CloneIntegerProperty(
    MP4Descriptor* pDest,
    MP4DescriptorProperty* pSrc,
    const char* name)
{
    MP4IntegerProperty* pGetProperty;
    MP4IntegerProperty* pSetProperty;

    pSrc->FindProperty(name, (MP4Property**)&pGetProperty);
    pDest->FindProperty(name, (MP4Property**)&pSetProperty);

    pSetProperty->SetValue(pGetProperty->GetValue());
}