ISOBMFF
ISO Base Media File Format Reference Software Documentation
 
Loading...
Searching...
No Matches
MP4Movies.h File Reference

API. More...

#include "MP4OSMacros.h"
#include "ISOMovies.h"

Go to the source code of this file.

Classes

struct  MP4MovieRecord
 
struct  MP4TrackRecord
 
struct  MP4MediaRecord
 
struct  MP4TrackReaderRecord
 
struct  MP4UserDataRecord
 
struct  MP4SLConfigRecord
 
struct  MP4GenericAtomRecord
 
struct  MP4SLConfigSettingsRecord
 SL configuration settings record. More...
 

Macros

#define ISMACrypt
 
#define GETMOOV(arg)
 Get the MP4PrivateMovieRecordPtr moov.
 
#define GETMOVIEATOM(arg)
 Get the MP4MovieAtomPtr movieAtom.
 
#define GETMOVIEHEADERATOM(arg)
 Get the MP4MovieHeaderAtomPtr movieHeaderAtom.
 
#define GETIODATOM(arg)
 Get the MP4ObjectDescriptorAtomPtr iodAtom.
 
#define ISMA_selective_encrypt   0x80
 

Typedefs

typedef int MP4Err
 This is a typedef for function error codes.
 
typedef enum sampleToGroupType_t sampleToGroupType_t
 Sample grouping types.
 
typedef struct MP4MovieRecord MP4MovieRecord
 
typedef MP4MovieRecordMP4Movie
 This is an opaque handle that contains a reference to a movie.
 
typedef struct MP4TrackRecord MP4TrackRecord
 
typedef MP4TrackRecordMP4Track
 This is an opaque handle that contains a reference to a track.
 
typedef struct MP4MediaRecord MP4MediaRecord
 
typedef MP4MediaRecordMP4Media
 This is an opaque handle that contains a reference to media.
 
typedef struct MP4TrackReaderRecord MP4TrackReaderRecord
 
typedef MP4TrackReaderRecordMP4TrackReader
 This is an opaque handle that contains a reference to a track reader.
 
typedef struct MP4UserDataRecord MP4UserDataRecord
 
typedef MP4UserDataRecordMP4UserData
 An opaque handle that references user data.
 
typedef struct MP4SLConfigRecord MP4SLConfigRecord
 
typedef MP4SLConfigRecordMP4SLConfig
 
typedef struct MP4GenericAtomRecord MP4GenericAtomRecord
 
typedef MP4GenericAtomRecordMP4GenericAtom
 
typedef char ** MP4Handle
 MP4Handle is used to pass sections of dynamically allocated memory to the API.
 
typedef struct MP4SLConfigSettingsRecord MP4SLConfigSettings
 SL configuration settings record.
 
typedef struct MP4SLConfigSettingsRecordMP4SLConfigSettingsPtr
 

Enumerations

enum  {
  MP4HasRootOD = 2 , MP4EOF = 1 , MP4NoErr = 0 , MP4FileNotFoundErr = -1 ,
  MP4BadParamErr = -2 , MP4NoMemoryErr = -3 , MP4IOErr = -4 , MP4NoLargeAtomSupportErr = -5 ,
  MP4BadDataErr = -6 , MP4VersionNotSupportedErr = -7 , MP4InvalidMediaErr = -8 , MP4InternalErr = -9 ,
  MP4NotFoundErr = -10 , MP4DataEntryTypeNotSupportedErr = -100 , MP4NoQTAtomErr = -500 , MP4NotImplementedErr = -1000
}
 Function error codes. More...
 
enum  { MP4OpenMovieNormal = 0 , MP4OpenMovieDebug = (1 << 0) , MP4OpenMovieInPlace = (1 << 1) }
 Modes used by MP4OpenMovieFile() More...
 
enum  {
  MP4NewTrackIsVisual = (1 << 1) , MP4NewTrackIsAudio = (1 << 2) , MP4NewTrackIsMetadata = (1 << 3) , MP4NewTrackIsVolumetric = (1 << 4) ,
  MP4NewTrackIsHaptic = (1 << 5) , MP4NewTrackIsPrivate = (1 << 8)
}
 Track flags. More...
 
enum  {
  MP4ObjectDescriptorHandlerType = MP4_FOUR_CHAR_CODE('o', 'd', 's', 'm') , MP4ClockReferenceHandlerType = MP4_FOUR_CHAR_CODE('c', 'r', 's', 'm') , MP4SceneDescriptionHandlerType = MP4_FOUR_CHAR_CODE('s', 'd', 's', 'm') , MP4VisualHandlerType = MP4_FOUR_CHAR_CODE('v', 'i', 'd', 'e') ,
  MP4AudioHandlerType = MP4_FOUR_CHAR_CODE('s', 'o', 'u', 'n') , MP4MPEG7HandlerType = MP4_FOUR_CHAR_CODE('m', '7', 's', 'm') , MP4OCIHandlerType = MP4_FOUR_CHAR_CODE('o', 'c', 's', 'm') , MP4IPMPHandlerType = MP4_FOUR_CHAR_CODE('i', 'p', 's', 'm') ,
  MP4MPEGJHandlerType = MP4_FOUR_CHAR_CODE('m', 'j', 's', 'm') , MP4HintHandlerType = MP4_FOUR_CHAR_CODE('h', 'i', 'n', 't') , MP4TextHandlerType = MP4_FOUR_CHAR_CODE('t', 'e', 'x', 't') , MP7TextHandlerType = MP4_FOUR_CHAR_CODE('m', 'p', '7', 't') ,
  MP7BinaryHandlerType = MP4_FOUR_CHAR_CODE('m', 'p', '7', 'b') , MP21HandlerType = MP4_FOUR_CHAR_CODE('m', 'p', '2', '1') , MP4NullHandlerType = MP4_FOUR_CHAR_CODE('n', 'u', 'l', 'l') , MP4MetaHandlerType = MP4_FOUR_CHAR_CODE('m', 'e', 't', 'a') ,
  MP4VolumetricHandlerType = MP4_FOUR_CHAR_CODE('v', 'o', 'l', 'v') , MP4HapticHandlerType = MP4_FOUR_CHAR_CODE('h', 'a', 'p', 't') , ISOXMLAtomType = MP4_FOUR_CHAR_CODE('x', 'm', 'l', ' ') , ISOBinaryXMLAtomType = MP4_FOUR_CHAR_CODE('b', 'x', 'm', 'l')
}
 Handler types.
 
enum  {
  MP4IPMP_NoControlPoint = 0x00 , MP4IPMP_DB_Decoder_ControlPoint = 0x01 , MP4IPMP_Decoder_CB_ControlPoint = 0x02 , MP4IPMP_CB_Compositor_ControlPoint = 0x03 ,
  MP4IPMP_BIFSTree_ControlPoint = 0x04
}
 
enum  {
  is_leading_dependency = 0x40 , is_no_leading = 0x80 , is_leading_no_dependency = 0xC0 , does_depend_on = 0x10 ,
  does_not_depend_on = 0x20 , is_depended_on = 0x4 , is_not_depended_on = 0x8 , has_redundancy = 1 ,
  has_no_redundancy = 2
}
 Sample dependency types. More...
 
enum  sampleToGroupType_t { SAMPLE_GROUP_NORMAL = 0 , SAMPLE_GROUP_COMPACT , SAMPLE_GROUP_AUTO }
 Sample grouping types. More...
 
enum  {
  MP4HintTrackReferenceType = MP4_FOUR_CHAR_CODE('h', 'i', 'n', 't') , MP4StreamDependencyReferenceType = MP4_FOUR_CHAR_CODE('d', 'p', 'n', 'd') , MP4ODTrackReferenceType = MP4_FOUR_CHAR_CODE('m', 'p', 'o', 'd') , MP4SyncTrackReferenceType = MP4_FOUR_CHAR_CODE('s', 'y', 'n', 'c') ,
  MP4DescTrackReferenceType = MP4_FOUR_CHAR_CODE('c', 'd', 's', 'c')
}
 Track reference types. More...
 
enum  { MP4DataRefSelfReferenceMask = (1 << 0) }
 Data reference attributes. More...
 
enum  { MP4URLDataReferenceType = MP4_FOUR_CHAR_CODE('u', 'r', 'l', ' ') , MP4URNDataReferenceType = MP4_FOUR_CHAR_CODE('u', 'r', 'n', ' ') }
 Data reference types. More...
 
enum  {
  MP4NextTimeSearchForward = 0 , MP4NextTimeSearchBackward = -1 , MP4NextTimeMediaSample = (1 << 0) , MP4NextTimeMediaEdit = (1 << 1) ,
  MP4NextTimeTrackEdit = (1 << 2) , MP4NextTimeSyncSample = (1 << 3) , MP4NextTimeEdgeOK = (1 << 4)
}
 Flags for NextInterestingTime. More...
 
enum  { MP4MediaSampleNotSync = (1 << 0) , MP4MediaSampleHasCTSOffset = (1 << 1) }
 flags for MP4GetMediaSample(), MP4GetIndMediaSampleWithPad(), MP4GetIndMediaSample() ... More...
 

Functions

MP4Err MP4NewHandle (u32 handleSize, MP4Handle *outHandle)
 Creates a new handle, and allocates handleSize bytes for it.
 
MP4Err MP4SetHandleSize (MP4Handle theHandle, u32 handleSize)
 Sets the logical size of the handle to requestedSize bytes.
 
MP4Err MP4DisposeHandle (MP4Handle theHandle)
 Frees the memory that was allocated for a handle.
 
MP4Err MP4GetHandleSize (MP4Handle theHandle, u32 *outSize)
 Use this to determine the present logical size (in bytes) of a handle.
 
MP4Err MP4HandleCat (MP4Handle theDstHandle, MP4Handle theSrcHandle)
 Appends the data contained in theSrcHandle to data contained in theDstHandle by reallocating, if necessary, the number of bytes allocated for theDstHandle.
 
MP4Err MP4SetHandleOffset (MP4Handle theHandle, u32 offset)
 Sets the handle so that subsequent de-references of it refer to the data starting at the given byte offset.
 
MP4Err MP4DisposeMovie (MP4Movie theMovie)
 This function releases any resources owned by the Movie.
 
MP4Err MP4GetMovieDuration (MP4Movie theMovie, u64 *outDuration)
 This calculates and returns the movie duration as recorded in the movie header.
 
MP4Err MP4GetMovieInitialObjectDescriptor (MP4Movie theMovie, MP4Handle outDescriptorH)
 Retrieves the initial object descriptor from a Movie and places it into a Handle.
 
MP4Err MP4GetMovieInitialObjectDescriptorUsingSLConfig (MP4Movie theMovie, MP4SLConfig slconfig, MP4Handle outDescriptorH)
 Retrieves the initial object descriptor from a Movie.
 
MP4Err MP4GetMovieIODInlineProfileFlag (MP4Movie theMovie, u8 *outFlag)
 Queries the setting of includeInlineProfileLevelFlag from the movie's initial object descriptor.
 
MP4Err MP4GetMovieProfilesAndLevels (MP4Movie theMovie, u8 *outOD, u8 *outScene, u8 *outAudio, u8 *outVisual, u8 *outGraphics)
 Use this to obtain the profiles and levels from a Movie's initial object descriptor.
 
MP4Err MP4GetMovieTimeScale (MP4Movie theMovie, u32 *outTimeScale)
 Use this to obtain the time scale of a Movie.
 
MP4Err MP4GetMovieTrack (MP4Movie theMovie, u32 trackID, MP4Track *outTrack)
 Use this to obtain a track given its track ID.
 
MP4Err MP4GetMovieUserData (MP4Movie theMovie, MP4UserData *outUserData)
 Get the movie level user data 'udta'.
 
MP4Err MP4AddAtomToMovie (MP4Movie theMovie, MP4GenericAtom the_atom)
 Adds the given atom to the movie.
 
MP4Err MP4NewMovie (MP4Movie *outMovie, u32 initialODID, u8 OD_profileAndLevel, u8 scene_profileAndLevel, u8 audio_profileAndLevel, u8 visual_profileAndLevel, u8 graphics_profileAndLevel)
 Creates a new empty Movie in memory.
 
MP4Err MP4NewMovieFromHandle (MP4Movie *outMovie, MP4Handle movieH, u32 newMovieFlags)
 Parses a movie ‘file’ in the handle and creates a Movie in memory from this file.
 
MP4Err NewMPEG21 (MP4Movie *outMovie)
 Creates a new empty MPEG-21 ‘movie’ in memory.
 
MP4Err ISONewMetaMovie (MP4Movie *outMovie, u32 handlertype, u32 brand, u32 minorversion)
 Like NewMPEG21() but allows you to specify the meta handlertype, and the major brand and minor version of that brand.
 
MP4Err MP4SetMovieIODInlineProfileFlag (MP4Movie theMovie, u8 theFlag)
 Indicates that the given track is to be considered as the initial BIFS track.
 
MP4Err MP4SetMovieTimeScale (MP4Movie theMovie, u32 timeScale)
 Sets the Movie’s time scale.
 
MP4Err MP4OpenMovieFile (MP4Movie *theMovie, const char *movieURL, int openMovieFlags)
 Opens a movie file and creates a Movie in memory from this file.
 
MP4Err MP4PutMovieIntoHandle (MP4Movie theMovie, MP4Handle movieH)
 Places the movie and its media samples into a handle.
 
MP4Err MP4WriteMovieToFile (MP4Movie theMovie, const char *filename)
 See ISOWriteMovieToFile()
 
MP4Err MP4AddTrackReference (MP4Track theTrack, MP4Track dependsOn, u32 referenceType, u32 *outReferenceIndex)
 Indicate that there exists a dependency between two tracks.
 
MP4Err MP4AddTrackReferenceWithID (MP4Track theTrack, u32 dependsOnID, u32 dependencyType, u32 *outReferenceIndex)
 Indicate that there exists a dependency between two tracks.
 
MP4Err MP4AddSubSampleInformationToTrack (MP4Track theTrack, MP4GenericAtom *subs)
 
MP4Err MP4SetSubSampleInformationFlags (MP4GenericAtom subsample, u32 flags)
 
MP4Err MP4GetSubSampleInformationEntryFromTrack (MP4Track theTrack, u32 *flags, u32 *entry_count, u32 **sample_delta, u32 **subsample_count, u32 ***subsample_size_array, u32 ***subsample_priority_array, u32 ***subsample_discardable_array)
 
MP4Err MP4AddSubSampleInformationEntry (MP4GenericAtom subsample, u32 sample_delta, u32 subsample_count, MP4Handle subsample_size_array, MP4Handle subsample_priority_array, MP4Handle subsample_discardable_array)
 
MP4Err MP4AddSubSampleInformationEntry2 (MP4GenericAtom subsample, u32 sample_delta, u32 subsample_count, MP4Handle subsample_size_array, MP4Handle subsample_priority_array, MP4Handle subsample_discardable_array, MP4Handle codec_specific_parameters_array)
 Same as MP4AddSubSampleInformationEntry but also allows to add the codec specific parameters.
 
MP4Err MP4AddTrackGroup (MP4Track theTrack, u32 groupID, u32 dependencyType)
 Add track to a track group ID.
 
MP4Err MP4AddTrackToMovieIOD (MP4Track theTrack)
 Add track's ES_Descriptor to its movie's initial object descriptor.
 
MP4Err MP4GetMovieIndTrack (MP4Movie theMovie, u32 trackIndex, MP4Track *outTrack)
 Get track using the track index.
 
MP4Err MP4GetMovieIndTrackSampleEntryType (MP4Movie theMovie, u32 idx, u32 *SEType)
 Get sample entry type of a track.
 
MP4Err MP4GetMovieTrackCount (MP4Movie theMovie, u32 *outTrackCount)
 This function allows you to determine the number of Tracks in a Movie.
 
MP4Err MP4GetTrackDuration (MP4Track theTrack, u64 *outDuration)
 Calculates and returns the duration of the track.
 
MP4Err MP4GetTrackEnabled (MP4Track theTrack, u32 *outEnabled)
 This returns a non-zero value in outEnabled if the track is enabled.
 
MP4Err MP4GetTrackID (MP4Track theTrack, u32 *outTrackID)
 Get the elementary stream ID for a given Track.
 
MP4Err MP4GetTrackMedia (MP4Track theTrack, MP4Media *outMedia)
 Returns the Media for a given Track.
 
MP4Err MP4GetTrackMovie (MP4Track theTrack, MP4Movie *outMovie)
 Get the Movie associated with a Track.
 
MP4Err MP4GetTrackOffset (MP4Track track, u32 *outMovieOffsetTime)
 Get the track's offset (the length of its initial empty edit).
 
MP4Err MP4GetTrackReference (MP4Track theTrack, u32 referenceType, u32 referenceIndex, MP4Track *outReferencedTrack)
 Obtain a specific track reference of the specified type.
 
MP4Err MP4GetTrackReferenceCount (MP4Track theTrack, u32 referenceType, u32 *outReferenceCount)
 Determine the number of a particular type of track references that are contained in a track.
 
MP4Err MP4GetTrackGroup (MP4Track theTrack, u32 groupType, u32 *outGroupId)
 Get the track group of a track.
 
MP4Err MP4GetTrackUserData (MP4Track theTrack, MP4UserData *outUserData)
 Get the track level user data 'udta'.
 
MP4Err MP4AddAtomToTrack (MP4Track theTrack, MP4GenericAtom the_atom)
 Adds the given atom to the track.
 
MP4Err MP4InsertMediaIntoTrack (MP4Track trak, s32 trackStartTime, s32 mediaStartTime, u64 segmentDuration, s32 mediaRate)
 Adds a reference to the specified segment of media into a Track.
 
MP4Err MP4NewMovieTrack (MP4Movie theMovie, u32 newTrackFlags, MP4Track *outTrack)
 Creates a new track for the movie.
 
MP4Err MP4NewMovieTrackWithID (MP4Movie theMovie, u32 newTrackFlags, u32 newTrackID, MP4Track *outTrack)
 Creates a new track for the movie with a specified track ID.
 
MP4Err MP4NewTrackMedia (MP4Track theTrack, MP4Media *outMedia, u32 handlerType, u32 timeScale, MP4Handle dataReference)
 Creates the media container for a track.
 
MP4Err MP4SetTrackEnabled (MP4Track theTrack, u32 enabled)
 Enables or disables the track.
 
MP4Err MP4SetTrackOffset (MP4Track track, u32 movieOffsetTime)
 Modifies the duration of the empty space that lies at the beginning of the track, thus changing the duration of the entire track.
 
MP4Err MP4TrackTimeToMediaTime (MP4Track theTrack, u64 inTrackTime, s64 *outMediaTime)
 Convert from a time expressed in the movie time scale to a time expressed in the media time scale.
 
MP4Err MP4AddMediaDataReference (MP4Media theMedia, u32 *outReferenceIndex, MP4Handle urlHandle, MP4Handle urnHandle)
 Use this to add a data reference to a media container.
 
MP4Err MP4AddMediaSampleReference (MP4Media media, u64 dataOffset, u32 sampleCount, MP4Handle durationsH, MP4Handle sizesH, MP4Handle sampleEntryH, MP4Handle decodingOffsetsH, MP4Handle syncSamplesH)
 Use this function to add samples to a media by reference.
 
MP4Err MP4AddMediaSamples (MP4Media media, MP4Handle sampleH, u32 sampleCount, MP4Handle durationsH, MP4Handle sizesH, MP4Handle sampleEntryH, MP4Handle decodingOffsetsH, MP4Handle syncSamplesH)
 Use this function to samples to the media.
 
MP4Err MP4AddMediaSampleReferencePad (MP4Media media, u64 dataOffset, u32 sampleCount, MP4Handle durationsH, MP4Handle sizesH, MP4Handle sampleEntryH, MP4Handle decodingOffsetsH, MP4Handle syncSamplesH, MP4Handle padsH)
 Add media samples by reference with padding bits.
 
MP4Err MP4AddMediaSamplesPad (MP4Media media, MP4Handle sampleH, u32 sampleCount, MP4Handle durationsH, MP4Handle sizesH, MP4Handle sampleEntryH, MP4Handle decodingOffsetsH, MP4Handle syncSamplesH, MP4Handle padsH)
 Add media samples with padding bits.
 
MP4Err ISOAddGroupDescription (MP4Media media, u32 groupType, MP4Handle description, u32 *index)
 Adds a Sample Group Description to the indicated media.
 
MP4Err ISOGetGroupDescription (MP4Media media, u32 groupType, u32 index, MP4Handle description)
 Returns in the handle ‘description’ the group description associated with the given group index of the given group type.
 
MP4Err ISOGetGroupDescriptionEntryCount (MP4Media media, u32 groupType, u32 *outEntryCount)
 Returns the entry_count of the desired SampleGroupDescriptionBox of the given type.
 
MP4Err ISOSetSamplestoGroupType (MP4Media media, sampleToGroupType_t sampleToGroupType)
 Set the SampleToGroup mapping type.
 
MP4Err ISOMapSamplestoGroup (MP4Media media, u32 groupType, u32 group_index, s32 sample_index, u32 count)
 Maps a set of samples to a group of a given type.
 
MP4Err ISOGetSampletoGroupMap (MP4Media media, u32 groupType, u32 sample_number, u32 *group_index)
 Returns in group_index the group index associated with the given sample number of the given group type.
 
MP4Err ISOGetSampleGroupSampleNumbers (MP4Media media, u32 groupType, u32 group_index, u32 **outSampleNubers, u32 *outSampleCnt)
 Get all sample numbers associated with the given group type and index of the description.
 
MP4Err ISOSetSampleDependency (MP4Media media, s32 sample_index, MP4Handle dependencies)
 Sets the sample dependency of a set of samples, after having added the samples.
 
MP4Err ISOGetSampleDependency (MP4Media media, s32 sample_index, u8 *dependency)
 Returns in dependency the sample dependency associated with the given sample number.
 
MP4Err MP4BeginMediaEdits (MP4Media theMedia)
 Use this function to prepare the media before adding samples.
 
MP4Err MP4CheckMediaDataReferences (MP4Media theMedia)
 Tests all data references in the media to ensure that the references exist and are readable.
 
MP4Err MP4EndMediaEdits (MP4Media theMedia)
 Call this function when you have finished adding samples to the media.
 
MP4Err MP4GetIndMediaSampleWithPad (MP4Media theMedia, u32 sampleNumber, MP4Handle outSample, u32 *outSize, u64 *outDTS, s32 *outCTSOffset, u64 *outDuration, u32 *outSampleFlags, u32 *outSampleDescIndex, u8 *outPad)
 Returns a sample with padding bits from the media, given the sample's index.
 
MP4Err MP4GetIndMediaSample (MP4Media theMedia, u32 sampleNumber, MP4Handle outSample, u32 *outSize, u64 *outDTS, s32 *outCTSOffset, u64 *outDuration, u32 *outSampleFlags, u32 *outSampleDescIndex)
 Returns a sample from the media, given the sample's index.
 
MP4Err MP4GetIndMediaSampleReference (MP4Media theMedia, u32 sampleNumber, u32 *outOffset, u32 *outSize, u32 *outDuration, u32 *outSampleFlags, u32 *outSampleDescIndex, MP4Handle sampleDesc)
 Returns a reference (offset and size) for the sample from the media, given the sample's index.
 
MP4Err MP4GetMediaDataRefCount (MP4Media theMedia, u32 *outCount)
 Returns the number of data references.
 
MP4Err MP4UseSignedCompositionTimeOffsets (MP4Media media)
 Sets the version of the MP4CompositionOffsetAtom to 1.
 
MP4Err MP4GetMediaDataReference (MP4Media theMedia, u32 index, MP4Handle referenceURL, MP4Handle referenceURN, u32 *outReferenceType, u32 *outReferenceAttributes)
 Use this to get information about a specific data reference to a media container.
 
MP4Err MP4GetMediaDuration (MP4Media theMedia, u64 *outDuration)
 Get the total duration of the media, expressed in the media’s time scale.
 
MP4Err MP4GetMediaHandlerDescription (MP4Media theMedia, u32 *outType, MP4Handle *outName)
 This function can be used to obtain the media type.
 
MP4Err MP4GetMediaLanguage (MP4Media theMedia, char *outThreeCharCode)
 Returns the ISO 639-2/T three character language code associated with the media.
 
MP4Err MP4GetMediaExtendedLanguageTag (MP4Media theMedia, char **extended_language)
 Returns the extended language, based on RFC 4646 (Best Common Practices – BCP – 47) industry standard.
 
MP4Err MP4GetMediaNextInterestingTime (MP4Media theMedia, u32 interestingTimeFlags, u64 searchFromTime, u32 searchDirection, u64 *outInterestingTime, u64 *outInterestingDuration)
 Search for interesging time.
 
MP4Err MP4GetMediaSample (MP4Media theMedia, MP4Handle outSample, u32 *outSize, u64 desiredDecodingTime, u64 *outDecodingTime, u64 *outCompositionTime, u64 *outDuration, MP4Handle outSampleDescription, u32 *outSampleDescriptionIndex, u32 *outSampleFlags)
 Returns a closest sample from the media, given the desired decoding time.
 
MP4Err MP4GetMediaSampleWithPad (MP4Media theMedia, MP4Handle outSample, u32 *outSize, u64 desiredDecodingTime, u64 *outDecodingTime, u64 *outCompositionTime, u64 *outDuration, MP4Handle outSampleDescription, u32 *outSampleDescriptionIndex, u32 *outSampleFlags, u8 *outPad)
 Returns a closest sample with padding bits, given the desired decoding time.
 
MP4Err MP4GetMediaSampleCount (MP4Media theMedia, u32 *outCount)
 Use this to determine the total number of samples contained in the media.
 
MP4Err 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.
 
MP4Err MP4GetMediaTimeScale (MP4Media theMedia, u32 *outTimeScale)
 Returns the time scale associated with the media.
 
MP4Err MP4GetMediaTrack (MP4Media theMedia, MP4Track *outTrack)
 Returns the track that is associated with this media.
 
MP4Err MP4MediaTimeToSampleNum (MP4Media theMedia, u64 mediaTime, u32 *outSampleNum, u64 *outSampleCTS, u64 *outSampleDTS, s32 *outSampleDuration)
 Use this to obtain the sample number for a sample with the given decoding time.
 
MP4Err MP4SampleNumToMediaTime (MP4Media theMedia, u32 sampleNum, u64 *outSampleCTS, u64 *outSampleDTS, s32 *outSampleDuration)
 Use this to obtain the decoding and composition times for a particular media sample.
 
MP4Err MP4SetMediaLanguage (MP4Media theMedia, char *threeCharCode)
 Use this to indicate the ISO 639-2/T three character language code that is to be associated with the media.
 
MP4Err MP4SetMediaExtendedLanguageTag (MP4Media theMedia, char *extended_language)
 The extended language tag box represents media language information, based on RFC 4646 (Best Common Practices – BCP – 47) industry standard.
 
MP4Err ISOSetSampleSizeField (MP4Media theMedia, u32 fieldsize)
 Use this to set the size of samplesize entries in the sample size table.
 
MP4Err MP4GetElementaryStreamPacket (MP4Media theMedia, MP4Handle outSample, u32 *outSize, u32 sequenceNumber, u64 desiredTime, u64 *outActualTime, u64 *outDuration)
 
MP4Err MP4GetMediaDecoderConfig (MP4Media theMedia, u32 sampleDescIndex, MP4Handle decoderConfigH)
 Use this to obtain the decoder configuration descriptor for a given sample description.
 
MP4Err MP4GetMediaDecoderInformation (MP4Media theMedia, u32 sampleDescIndex, u32 *outObjectType, u32 *outStreamType, u32 *outBufferSize, u32 *outUpstream, u32 *outMaxBitrate, u32 *outAvgBitrate, MP4Handle specificInfoH)
 Obtain the complete decoder configuration and specific info without having to parse the decoder config descriptor.
 
MP4Err MP4GetMediaDecoderType (MP4Media theMedia, u32 sampleDescIndex, u32 *outObjectType, u32 *outStreamType, u32 *outBufferSize, MP4Handle specificInfoH)
 Use this to obtain the decoder configuration and specific info without having to parse the decoder config descriptor.
 
MP4Err MP4NewSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 objectTypeIndication, u32 streamType, u32 decoderBufferSize, u32 maxBitrate, u32 avgBitrate, MP4Handle decoderSpecificInfoH)
 Create a basic sample description that can be used for calls to MP4AddMediaSamples().
 
MP4Err MP4NewSampleDescriptionWithOCRAssociation (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 objectTypeIndication, u32 streamType, u32 decoderBufferSize, u32 maxBitrate, u32 avgBitrate, MP4Handle decoderSpecificInfoH, u32 theOCRESID)
 Create a sample description with clock reference.
 
MP4Err ISONewGeneralSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 sampleEntryType, MP4GenericAtom extensionAtom)
 Create a basic sample description that can be used for calls to MP4AddMediaSamples().
 
MP4Err ISOAddAtomToSampleDescription (MP4Handle sampleEntryH, MP4GenericAtom extensionAtom)
 Add an arbitrary atom to a sample entry (description).
 
MP4Err ISOGetAtomFromSampleDescription (MP4Handle sampleEntryH, u32 atomType, MP4GenericAtom *outAtom)
 Find the atom of the given type and return it.
 
MP4Err ISONewXMLMetaDataSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, char *content_encoding, char *xml_namespace, char *schema_location)
 Make a sample description for a timed XML meta-data track.
 
MP4Err ISONewTextMetaDataSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, char *content_encoding, char *mime_format)
 Make a sample description for a timed text meta-data track.
 
MP4Err MP4CreateTrackReader (MP4Track theTrack, MP4TrackReader *outReader)
 Create a track reader for a movie track.
 
MP4Err MP4DisposeTrackReader (MP4TrackReader theReader)
 Frees up resources associated with a track reader.
 
MP4Err MP4TrackReaderGetCurrentDecoderConfig (MP4TrackReader theReader, MP4Handle decoderConfigH)
 Places the appropriate decoder config descriptor into the handle provided.
 
MP4Err MP4TrackReaderGetCurrentSampleDescription (MP4TrackReader theReader, MP4Handle sampleEntryH)
 Get the sample description associated with the current read-point.
 
MP4Err MP4TrackReaderGetCurrentSampleDescriptionIndex (MP4TrackReader theReader, u32 *index)
 Get the index of the current sample description.
 
MP4Err MP4TrackReaderGetNextAccessUnit (MP4TrackReader theReader, MP4Handle outAccessUnit, u32 *outSize, u32 *outSampleFlags, s32 *outCTS, s32 *outDTS)
 Use this to get the next access unit (MPEG-4), or sample, from the track.
 
MP4Err MP4TrackReaderGetNextAccessUnitWithDuration (MP4TrackReader theReader, MP4Handle outAccessUnit, u32 *outSize, u32 *outSampleFlags, s32 *outCTS, s32 *outDTS, u32 *outDuration)
 Get the next access unit (MPEG-4), or sample, from the track with duration of the sample.
 
MP4Err MP4TrackReaderGetNextAccessUnitWithPad (MP4TrackReader theReader, MP4Handle outAccessUnit, u32 *outSize, u32 *outSampleFlags, s32 *outCTS, s32 *outDTS, u8 *outPad)
 Get the next access unit, or sample, from the track with the padding bits for the sample.
 
MP4Err MP4TrackReaderGetNextPacket (MP4TrackReader theReader, MP4Handle outPacket, u32 *outSize)
 Use this to read the next SL-packet from the track.
 
MP4Err MP4TrackReaderSetSLConfig (MP4TrackReader theReader, MP4SLConfig slConfig)
 Set the SLConfig of the trackreader.
 
MP4Err MP4TrackReaderGetCurrentSampleNumber (MP4TrackReader theReader, u32 *sampleNumber)
 Get the sample number of the last returned access unit.
 
MP4Err MP4SetupSampleAuxiliaryInformation (MP4Media theMedia, u8 isUsingAuxInfoPropertiesFlag, u32 aux_info_type, u32 aux_info_type_parameter, u8 default_sample_info_size)
 Setup and initialize sample auxiliary information for a track.
 
MP4Err MP4AddSampleAuxiliaryInformation (MP4Media theMedia, u8 isUsingAuxInfoPropertiesFlag, u32 aux_info_type, u32 aux_info_type_parameter, MP4Handle dataH, u32 sampleCount, MP4Handle sizesH)
 Add sample auxiliary information data for a range of samples.
 
MP4Err MP4GetSampleAuxiliaryInformation (MP4Media theMedia, u32 *outCount, MP4Handle isUsingAuxInfoPropertiesFlags, MP4Handle aux_info_types, MP4Handle aux_info_type_parameters)
 Get information about all sample auxiliary information for a track.
 
MP4Err MP4GetSampleAuxiliaryInformationForSample (MP4Media theMedia, u8 isUsingAuxInfoPropertiesFlag, u32 aux_info_type, u32 aux_info_type_parameter, u32 sampleNr, MP4Handle outDataH, u32 *outSize)
 Get the sample auxiliary information data for a specific sample and type.
 
MP4Err MP4AddUserData (MP4UserData theUserData, MP4Handle dataH, u32 userDataType, u32 *outIndex)
 Adds an entry to the user data list.
 
MP4Err MP4GetIndUserDataType (MP4UserData theUserData, u32 typeIndex, u32 *outType)
 Queries an indexed type of user data in the user data list.
 
MP4Err MP4GetUserDataEntryCount (MP4UserData theUserData, u32 userDataType, u32 *outCount)
 Returns the count of user data atoms of the specified type.
 
MP4Err MP4GetUserDataItem (MP4UserData theUserData, MP4Handle dataH, u32 userDataType, u32 itemIndex)
 Returns the contents of the requested user data item.
 
MP4Err MP4GetAtomFromUserData (MP4UserData theUserData, MP4GenericAtom *outAtom, u32 userDataType, u32 itemIndex)
 Returns the contents of the requested user data item.
 
MP4Err MP4GetUserDataTypeCount (MP4UserData theUserData, u32 *outCount)
 Returns the count of user data types.
 
MP4Err MP4DeleteUserDataItem (MP4UserData theUserData, u32 userDataType, u32 itemIndex)
 Deletes a user-data item, by index.
 
MP4Err MP4NewUserData (MP4UserData *outUserData)
 Creates a new user data list.
 
MP4Err MP4NewForeignAtom (MP4GenericAtom *outAtom, u32 atomType, MP4Handle atomPayload)
 Construct a new custom atom object.
 
MP4Err MP4NewUUIDAtom (MP4GenericAtom *outAtom, u8 the_uuid[16], MP4Handle atomPayload)
 Construct a new custom atom object with UUID type.
 
MP4Err MP4GetForeignAtom (MP4GenericAtom atom, u32 *atomType, u8 the_uuid[16], MP4Handle atomPayload)
 Returns the type and contents of the given foreign atom, and, if it is a UUID atom, its UUID also.
 
MP4Err MP4NewSLConfig (MP4SLConfigSettingsPtr settings, MP4SLConfig *outSLConfig)
 Create new SLConfig object.
 
MP4Err MP4GetSLConfigSettings (MP4SLConfig config, MP4SLConfigSettingsPtr outSettings)
 Get settings from SLConfig object.
 
MP4Err MP4SetSLConfigSettings (MP4SLConfig config, MP4SLConfigSettingsPtr settings)
 Set settings of SLConfig object.
 
MP4Err MP4NewMovieExt (MP4Movie *outMovie, u32 initialODID, u8 OD_profileAndLevel, u8 scene_profileAndLevel, u8 audio_profileAndLevel, u8 visual_profileAndLevel, u8 graphics_profileAndLevel, char *url, u8 IsExchangeFile)
 
MP4Err MP4SetSampleDescriptionPriority (MP4Handle sampleEntryH, u32 priority)
 This function sets the MPEG-4 elementary stream priority of the associated stream (in the elementary stream descriptor).
 
MP4Err MP4AddDescToSampleDescription (MP4Handle sampleEntryH, MP4Handle descriptorH)
 Can be used to add an IPMP Descriptor Pointer into an existing sampleDescription.
 
MP4Err MP4AddDescToMovieIOD (MP4Movie theMovie, MP4Handle descriptorH)
 Adds a descriptor to the movie IOD.
 
MP4Err MP4CheckMediaDataRef (MP4Media theMedia, u32 dataEntryIndex)
 Tests a specific data reference in the media to ensure that the reference exists and is readable.
 
MP4Err ISOSetSampleDescriptionDimensions (MP4Handle sampleEntryH, u16 width, u16 height)
 This function sets the visual width and height of a sample description.
 
MP4Err ISOSetSampleDescriptionType (MP4Handle sampleEntryH, u32 type)
 (Re)set the type of a sample description.
 
MP4Err ISOGetSampleDescriptionDimensions (MP4Handle sampleEntryH, u16 *width, u16 *height)
 This function gets the visual width and height of a sample description.
 
MP4Err ISOGetSampleDescriptionType (MP4Handle sampleEntryH, u32 *type)
 This function returns the type of a sample description.
 
MP4Err ISOStartMovieFragment (MP4Movie theMovie)
 This starts a new movie fragment.
 
MP4Err ISOAddDelayToTrackFragmentDecodeTime (MP4Movie theMovie, u32 delay)
 Add delay to track fragment decode time.
 
MP4Err ISOSetTrackFragmentDefaults (MP4Track theTrack, u32 duration, u32 size, u32 is_sync, u8 pad)
 Sets the default sample duration, size, sync-flag, and padding bits for samples added into movie fragments, for this track.
 
MP4Err ISOSetCompositonToDecodePropertiesForFragments (MP4Movie theMovie, u32 trackID, s32 compositionToDTSShift, s32 leastDecodeToDisplayDelta, s32 greatestDecodeToDisplayDelta, s32 compositionStartTime, s32 compositionEndTime)
 Sets the compositon to decode parameters for a specific track.
 
MP4Err MP4NewIPMPTool (MP4Handle ipmpToolH, u64 ipmpToolIdLowerPart, u64 ipmpToolIdUpperPart, MP4Handle altGroupInfoH, MP4Handle parametricInfoH)
 Creates a new IPMPTool structure.
 
MP4Err MP4AddUrlToIPMPTool (MP4Handle ipmpToolH, MP4Handle urlH)
 Add a URL from which one or more tools specified in IPMPTool can be downloaded.
 
MP4Err MP4NewIPMPToolListDescriptor (MP4Handle ipmpToolListDescrH)
 Creates a new IPMPToolListDescriptor.
 
MP4Err MP4AddToolToIPMPToolList (MP4Handle ipmpToolListDescrH, MP4Handle ipmpToolH)
 Description TBD.
 
MP4Err MP4NewIPMPDescriptorPointer (MP4Handle ipmpDescPtrH, u8 ipmpDescriptorId, u16 ipmpToolDescrId)
 Creates a new IPMPDescriptorPointer.
 
MP4Err MP4NewIPMPToolDescriptor (MP4Handle ipmpToolDescH, u16 ipmpToolDescrId, u64 ipmpToolIdLowerPart, u64 ipmpToolIdUpperPart, MP4Handle ipmpInitializeH)
 Creates a new IPMP Tool Descriptor.
 
MP4Err MP4NewIPMPInitialize (MP4Handle ipmpInitializeH, u8 controlPoint, u8 sequenceCode)
 Creates a new IPMPInitialize structure.
 
MP4Err MP4AddIPMPDataToIPMPInitialize (MP4Handle ipmpInitializeH, MP4Handle ipmpDataH)
 Adds IPMP data to the IPMPInitialize structure.
 
MP4Err MP4AddIPMPDataToIPMPToolDescriptor (MP4Handle ipmpToolDescrH, MP4Handle ipmpDataH)
 Adds IPMP data to an IPMP Tool Descriptor.
 
MP4Err MP4NewIPMPToolDescriptorUpdate (MP4Handle ipmpToolDescrUpdateH)
 Creates a new IPMPToolDescriptorUpdate command.
 
MP4Err MP4AddIPMPToolDescriptorToUpdate (MP4Handle ipmpToolDescrUpdateH, MP4Handle ipmpToolDescrH)
 Adds an IPMP Tool Descriptor to IPMPToolDescriptorUpdate command.
 
MP4Err ISMATransformSampleEntry (u32 newTrackFlags, MP4Handle insampleEntryH, u8 selective_encryption, u8 key_indicator_length, u8 IV_length, char *kms_URL, MP4Handle outsampleEntryH)
 ‘Transforms’ a sample entry into the format expected by ISMA for a sample entry for protected (encrypted) content.
 
MP4Err ISMAUnTransformSampleEntry (MP4Handle insampleEntryH, u8 *selective_encryption, u8 *key_indicator_length, u8 *IV_length, char **kms_URL, MP4Handle outsampleEntryH)
 ‘Untransforms’ a sample entry, from the encrypted form to the standard form.
 
MP4Err ISMATransformSampleEntrySalt (u32 newTrackFlags, MP4Handle insampleEntryH, u8 selective_encryption, u8 key_indicator_length, u8 IV_length, char *kms_URL, u64 salt, MP4Handle outsampleEntryH)
 ‘Transforms’ a sample entry into the format expected by ISMA for a sample entry for protected (encrypted) content.
 
MP4Err ISMAUnTransformSampleEntrySalt (MP4Handle insampleEntryH, u8 *selective_encryption, u8 *key_indicator_length, u8 *IV_length, char **kms_URL, u64 *salt, MP4Handle outsampleEntryH)
 ‘Untransforms’ a sample entry, from the encrypted form to the standard form.
 
MP4Err MP4GetTrackEditlistEntryCount (MP4Track theTrack, u32 *entryCount)
 This returns the number of existent Edit list entries.
 
MP4Err MP4GetTrackEditlist (MP4Track theTrack, u64 *outSegmentDuration, s64 *outMediaTime, u32 entryIndex)
 This returns a non-zero value in outSegmentDuration and outMediaTime if the Edit list information is present and valid.
 

Detailed Description

API.

Version
0.1