ISOBMFF
ISO Base Media File Format Reference Software Documentation
 
Loading...
Searching...
No Matches
Sync layer functions

MPEG sync layer functions. More...

Functions

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 MP4SetSampleDescriptionPriority (MP4Handle sampleEntryH, u32 priority)
 This function sets the MPEG-4 elementary stream priority of the associated stream (in the elementary stream descriptor).
 

Detailed Description

MPEG sync layer functions.

Function Documentation

◆ MP4NewSampleDescription()

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().

This will create the proper kind of sample entry atom for the track type, and a basic elementary stream descriptor that contains the information you provide in the parameters.

Parameters
sampleDescriptionHThe handle that will contain the new sample description.
dataReferenceIndexThe index of the data reference that describes the media samples. If you haven’t called MP4AddMediaDataReference() this parameter should be set to 1. Otherwise set it to the proper reference index for these samples.
objectTypeIndicationSet this properly according to the table in the Systems spec.
streamTypeSet this properly according to the table in the Systems specification.
decoderBufferSizeSet this to the size (in bytes) needed for the decoder input buffer.
maxBitrateSet this to the maximum number of bits per second needed to transmit media.
avgBitrateSet this to the average bitrate for this media.
decoderSpecificInfoHA handle that must contain the decoder specific info needed for a decoder for this media type. This must be a properly formed descriptor, including tag and length fields.

◆ MP4NewSampleDescriptionWithOCRAssociation()

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.

This function is a version of MP4NewSampleDescription() that permits the caller to indicate an association of the sample description with a clock reference. Parameters are the same as MP4NewSampleDescription(), with the addition of:

Parameters
theOCRESIDSet this to the ESID of the clock reference stream. A value of zero is permitted, and indicates that the stream has no explicit OCR association.