-
Notifications
You must be signed in to change notification settings - Fork 36
General Sample Description functions
These functions can be used to build general sample descriptions (i.e. non-MP4 ones).
ISOErr ISONewGeneralSampleDescription(
MP4Track theTrack,
MP4Handle sampleDescriptionH,
u32 dataReferenceIndex,
u32 sampleEntryType,
MP4GenericAtom extensionAtom );
This function can be used to create a basic sample description that can be used for calls to AddMediaSample. This will create the proper kind of sample entry atom for the track type. It takes the following parameters:
sampleDescriptionH
The handle that will contain the new sample description.
dataReferenceIndex
The index of the data reference that describes the media samples. If you haven’t called ISOAddMediaDataReference this parameter should be set to 1. Otherwise set it to the proper reference index for these samples.
sampleEntryType
The four-character-code for the type of sample entry. Use a pre-defined type or the macro MP4_FOUR_CHAR_CODE, which takes four single character arguments.
extensionAtom
You can supply an extra atom to be placed into the sample entry here.
ISOErr MP4GetMediaSampleDescription(
MP4Media theMedia,
u32 index,
MP4Handle outDescriptionH,
u32 *outDataReferenceIndex );
This returns the sample description at the given index, with the data reference index that is associated with it.
ISOErr ISOSetSampleDescriptionDimensions(
MP4Handle sampleEntryH,
u16 width,
u16 height);
This function sets the visual width and height of a sample description.
ISOErr ISOGetSampleDescriptionDimensions(
MP4Handle sampleEntryH,
u16 *width,
u16 *height);
This function gets the visual width and height of a sample description.
ISOErr ISOSetSampleDescriptionType(
MP4Handle sampleEntryH,
u32 type);
This function can be used to (re)set the type of a sample description. Be careful; do not set the type away from, and back to, an MPEG-4 type, or the elementary stream descriptor atom will be lost.
ISOErr ISOGetSampleDescriptionType(
MP4Handle sampleEntryH,
u32 *type);
This function returns the type of a sample description.
ISOErr ISOAddAtomToSampleDescription(MP4Handle sampleEntryH, MP4GenericAtom extensionAtom);
This function adds an arbitrary atom to a sample entry (description).
ISOErr ISOAddBitrateToSampleDescription(MP4Handle sampleEntryH, u8 is_3GPP, u32 buffersizeDB, u32 maxBitrate, u32 avgBitrate);
This function adds a bitrate atom to a sample entry (description).
ISOErr ISOGetAtomFromSampleDescription(MP4Handle sampleEntryH, u32 atomType, MP4GenericAtom* outAtom);
This function finds the atom of the given type and returns it.
ISOErr ISONewXMLMetaDataSampleDescription( MP4Track theTrack,
MP4Handle sampleDescriptionH,
u32 dataReferenceIndex,
char* content_encoding,
char* xml_namespace,
char* schema_location );
This function makes a sample description for a timed XML meta-data track.
ISOErr ISONewTextMetaDataSampleDescription( MP4Track theTrack,
MP4Handle sampleDescriptionH,
u32 dataReferenceIndex,
char* content_encoding,
char* mime_format );
This function makes a sample description for a timed text meta-data track.
ISOErr ISONewH263SampleDescription( MP4Track theTrack,
MP4Handle sampleDescriptionH,
u32 dataReferenceIndex,
u32 vendor,
u8 decoder_version,
u8 H263_level,
u8 H263_profile);
This function creates a new H.263 video sample description according to the 3GPP specifications.
ISOErr ISONewAMRSampleDescription( MP4Track theTrack,
MP4Handle sampleDescriptionH,
u32 dataReferenceIndex,
u8 is_WB,
u32 vendor,
u8 decoder_version,
u16 mode_set,
u8 mode_change_period,
u8 frames_per_sample);
This function creates a new AMR audio sample description according to the 3GPP specifications.
ISOErr ISONewAMRWPSampleDescription( MP4Track theTrack,
MP4Handle sampleDescriptionH,
u32 dataReferenceIndex,
u32 vendor,
u8 decoder_version);
This function creates a new AMR wideband plus audio sample description according to the 3GPP specifications.
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