-
Notifications
You must be signed in to change notification settings - Fork 37
AVC Sample Description functions
These convenience functions can be used to build and inspect AVC sample descriptions (i.e. non-MP4 ones).
ISOErr ISONewAVCSampleDescription( MP4Track theTrack,
MP4Handle sampleDescriptionH,
u32 dataReferenceIndex,
u32 length_size,
MP4Handle first_sps,
MP4Handle first_pps,
MP4Handle first_spsext );
This builds a new sample entry. The length_size is the size of the NAL Unit length field (and must be 1, 2 or 4). The remaining three parameters are parameter sets (sequence, picture, and sequence extension, respectively), or NULL. The sequence parameter set MUST be passed – it is used to get the profile, level, etc. It will only be added to the configuration if a picture parameter set is also present. The sequence extension parameter set is only used if an appropriate profile is used, of course.
You almost certainly will need to set the sample description width and height, after calling this function.
ISOErr ISOAddVCSampleDescriptionPS( MP4Handle sampleEntryH, MP4Handle ps, u32 where );
This adds another parameter set (which is not, in fact, inspected), to the configuration. where
can be AVCsps
, AVCpps
or AVCspsext
.
ISOErr ISOGetAVCSampleDescription( MP4Handle sampleEntryH,
u32 *dataReferenceIndex,
u32 *length_size,
u32* sps_count,
u32* pps_count,
u32* spsext_count );
This gets the basic parameters of the AVC sample entry.
ISOErr ISOGetVCSampleDescriptionPS( MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index );
This gets a parameter set, placing it in the given handle. where
is interpreted as for adding parameter sets; the indexes start at 1 (1 is the first parameter set in the indicated array).
How to use
API documentation single page
- Data Types
- Movie related functions
- Track related functions
- Media related functions
- MPEG sample auxiliary information functions
- MPEG sync-layer functions
- MPEG SLConfig functions
- General Sample Description functions
- AVC Sample Description functions
- MetaData Sample Description functions
- Meta data functions
- Track reader functions
- MPEG-4 IPMPX related functions
- ISMACrypt Support
- Utility functions