Sample Description functions, General, AVC, Metadata, etc. More...
Functions | |
ISOErr | ISONewAVCSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 length_size, MP4Handle first_sps, MP4Handle first_pps, MP4Handle first_spsext) |
Create a new AVC sample entry. | |
ISOErr | ISOAddVCSampleDescriptionPS (MP4Handle sampleEntryH, MP4Handle ps, u32 where) |
This adds another parameter set (which is not, in fact, inspected), to the configuration. | |
ISOErr | ISOGetAVCSampleDescription (MP4Handle sampleEntryH, u32 *dataReferenceIndex, u32 *length_size, u32 *sps_count, u32 *pss_count, u32 *spsext_count) |
Gets the basic parameters of the AVC sample entry. | |
ISOErr | ISOGetVCSampleDescriptionPS (MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index) |
Gets an AVC parameter set, placing it in the given handle. | |
ISOErr | ISOGetHEVCSampleDescriptionPS (MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index) |
Gets a HEVC parameter set, placing it in the given handle. | |
ISOErr | ISOGetRESVSampleDescriptionPS (MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index) |
Gets a restricted video parameter set (AVC or HEVC), placing it in the given handle. | |
ISOErr | ISOGetNALUnitLength (MP4Handle sampleEntryH, u32 *out) |
Get the NALUnitLength size in bytes. | |
ISOErr | ISOGetRESVOriginalFormat (MP4Handle sampleEntryH, u32 *outOrigFmt) |
Get the four character code of the original un-transformed sample entry. | |
ISOErr | ISOGetRESVSchemeType (MP4Handle sampleEntryH, u32 *schemeType, u32 *schemeVersion, char **schemeURI) |
Get scheme_type and scheme_version from the SchemeTypeBox in resv. | |
ISOErr | ISOGetRESVSchemeInfoAtom (MP4Handle sampleEntryH, u32 atomType, MP4Handle outAtom) |
Get the box from the SchemeInformationBox in resv. | |
ISOErr | ISONewHEVCSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 length_size, MP4Handle first_sps, MP4Handle first_pps, MP4Handle first_vps) |
Create a new HEVC sample entry. | |
ISOErr | ISONewVVCSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 length_size, MP4Handle first_sps, MP4Handle first_pps) |
Create a new VVC sample entry. | |
ISOErr | ISOGetVVCSampleDescription (MP4Handle sampleEntryH, u32 *dataReferenceIndex, u32 *length_size, u32 naluType, u32 *count) |
Gets the basic parameters of the VVC sample entry. | |
ISOErr | ISOGetVVCNaluNums (MP4Handle sampleEntryH, u32 where, u32 *num_nalus) |
Gets a VVC parameter set, placing it in the given handle. | |
ISOErr | ISOGetVVCSampleDescriptionPS (MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index) |
Gets a VVC parameter set, placing it in the given handle. | |
ISOErr | ISOAddVVCSampleDescriptionPS (MP4Handle sampleEntryH, MP4Handle ps, u32 where) |
This adds another parameter set (which is not, in fact, inspected), to the configuration. | |
ISOErr | ISONewVVCSubpicSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 width, u32 height, u32 length_size) |
Create a new VVC subpicture (vvs1) sample entry. | |
ISOErr | ISOGetVVCSubpicSampleDescription (MP4Handle sampleEntryH, u32 *dataReferenceIndex, u32 *length_size) |
Gets the length size of the VVC subpicture sample entry. | |
MP4Err | ISOAddBitrateToSampleDescription (MP4Handle sampleEntryH, u8 is_3GPP, u32 buffersizeDB, u32 maxBitrate, u32 avgBitrate) |
Add a bitrate atom to a sample entry (description). | |
MP4Err | ISONewH263SampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 vendor, u8 decoder_version, u8 H263_level, u8 H263_profile) |
Creates a new H.263 video sample description according to the 3GPP specifications. | |
MP4Err | 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) |
Creates a new AMR audio sample description according to the 3GPP specifications. | |
MP4Err | ISONewAMRWPSampleDescription (MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 vendor, u8 decoder_version) |
Creates a new AMR wideband plus audio sample description according to the 3GPP spec. | |
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 | 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 | 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. | |
Sample Description functions, General, AVC, Metadata, etc.
MP4Err ISOAddAtomToSampleDescription | ( | MP4Handle | sampleEntryH, |
MP4GenericAtom | extensionAtom | ||
) |
Add an arbitrary atom to a sample entry (description).
sampleEntryH | sample entry handle |
extensionAtom | atom to add to the sample entry |
This adds another parameter set (which is not, in fact, inspected), to the configuration.
where | can be AVCsps, AVCpps or AVCspsext. |
This adds another parameter set (which is not, in fact, inspected), to the configuration.
ps | input handle which is saving the parameter set. |
where | can be VVC vps, sps, pps, dci, opi, prefix APS, prefix SEI. |
MP4Err ISOGetAtomFromSampleDescription | ( | MP4Handle | sampleEntryH, |
u32 | atomType, | ||
MP4GenericAtom * | outAtom | ||
) |
Find the atom of the given type and return it.
sampleEntryH | sample entry to look into |
atomType | atom type to search for |
outAtom | output atom of a given type |
Gets a HEVC parameter set, placing it in the given handle.
sampleEntryH | input sample entry handle |
ps | output handle which is holding the parameter set. |
where | can be HEVCvps, HEVCsps or HEVCpps |
index | the indexes start at 1 (1 is the first parameter set in the indicated array). |
ISOErr ISOGetRESVOriginalFormat | ( | MP4Handle | sampleEntryH, |
u32 * | outOrigFmt | ||
) |
Get the four character code of the original un-transformed sample entry.
Gets a restricted video parameter set (AVC or HEVC), placing it in the given handle.
sampleEntryH | input sample entry handle |
ps | output handle which is holding the parameter set. |
where | can be AVCsps, AVCpps, AVCspsext, HEVCvps, HEVCsps or HEVCpps |
index | the indexes start at 1 (1 is the first parameter set in the indicated array). |
Get the box from the SchemeInformationBox in resv.
sampleEntryH | resv sample entry data |
atomType | type of the atom inside SchemeInformationBox |
outAtom | [out] data of the found box |
ISOErr ISOGetRESVSchemeType | ( | MP4Handle | sampleEntryH, |
u32 * | schemeType, | ||
u32 * | schemeVersion, | ||
char ** | schemeURI | ||
) |
Get scheme_type and scheme_version from the SchemeTypeBox in resv.
sampleEntryH | resv sample entry data |
schemeType | [out] scheme_type 4CC |
schemeVersion | [out] scheme_version |
schemeURI | [out] scheme_uri |
Gets an AVC parameter set, placing it in the given handle.
sampleEntryH | input sample entry handle |
ps | output handle which is holding the parameter set. |
where | can be AVCsps, AVCpps or AVCspsext. |
index | the indexes start at 1 (1 is the first parameter set in the indicated array). |
ISOErr ISOGetVVCNaluNums | ( | MP4Handle | sampleEntryH, |
u32 | where, | ||
u32 * | num_nalus | ||
) |
Gets a VVC parameter set, placing it in the given handle.
sampleEntryH | input sample entry handle |
where | can be VVC vps, sps, pps, dci, opi, prefix APS, prefix SEI. |
num_nalus | output the number of nalus in the corresponding parameter set. |
ISOErr ISOGetVVCSampleDescription | ( | MP4Handle | sampleEntryH, |
u32 * | dataReferenceIndex, | ||
u32 * | length_size, | ||
u32 | naluType, | ||
u32 * | count | ||
) |
Gets the basic parameters of the VVC sample entry.
sampleEntryH | input sample entry handle |
dataReferenceIndex | output dataReferenceIndex |
length_size | output length size: the size of the NAL Unit length field (and must be 1, 2 or 4). The value of length_size = LengthSizeMinusOne + 1 |
naluType | input NAL unit type (must be one of 12, 13, 14, 15, 16, 17, 23) |
count | output the number of nalus with type = |
naluType,if | there is no nalu, output 0 |
Gets a VVC parameter set, placing it in the given handle.
sampleEntryH | input sample entry handle |
ps | output handle which is holding the parameter set. |
where | can be VVC vps, sps, pps, dci, opi, prefix APS, prefix SEI. |
index | the indexes start at 1 (1 is the first parameter set in the indicated array). |
ISOErr ISOGetVVCSubpicSampleDescription | ( | MP4Handle | sampleEntryH, |
u32 * | dataReferenceIndex, | ||
u32 * | length_size | ||
) |
Gets the length size of the VVC subpicture sample entry.
sampleEntryH | input sample entry handle |
dataReferenceIndex | output dataReferenceIndex |
length_size | output length size: the size of the NAL Unit length field (and must be 1, 2 or 4). The value of length_size = LengthSizeMinusOne + 1 |
ISOErr ISONewAVCSampleDescription | ( | MP4Track | theTrack, |
MP4Handle | sampleDescriptionH, | ||
u32 | dataReferenceIndex, | ||
u32 | length_size, | ||
MP4Handle | first_sps, | ||
MP4Handle | first_pps, | ||
MP4Handle | first_spsext | ||
) |
Create a new AVC sample entry.
length_size | the size of the NAL Unit length field (and must be 1, 2 or 4). The value of length_size = lengthSizeMinusOne + 1 |
first_sps | The sequence parameter set (MUST be passed) used to get the profile, level, etc. It will only be added to the configuration if a picture parameter set is also present. |
first_pps | picture parameter set. Can be NULL. |
first_spsext | sequence extension parameter set, only used if an appropriate profile is used, of course. Can be NULL. |
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().
This will create the proper kind of sample entry atom for the track type.
theTrack | input track |
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 MP4AddMediaDataReference() 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 ISONewHEVCSampleDescription | ( | MP4Track | theTrack, |
MP4Handle | sampleDescriptionH, | ||
u32 | dataReferenceIndex, | ||
u32 | length_size, | ||
MP4Handle | first_sps, | ||
MP4Handle | first_pps, | ||
MP4Handle | first_vps | ||
) |
Create a new HEVC sample entry.
length_size | the size of the NAL Unit length field (and must be 1, 2 or 4). The value of length_size = lengthSizeMinusOne + 1 |
first_sps | The sequence parameter set (MUST be passed) used to get the profile, level, etc. |
first_pps | picture parameter set. |
first_vps | video parameter set. |
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.
theTrack | |
sampleDescriptionH | |
dataReferenceIndex | |
content_encoding | |
mime_format |
ISOErr ISONewVVCSampleDescription | ( | MP4Track | theTrack, |
MP4Handle | sampleDescriptionH, | ||
u32 | dataReferenceIndex, | ||
u32 | length_size, | ||
MP4Handle | first_sps, | ||
MP4Handle | first_pps | ||
) |
Create a new VVC sample entry.
length_size | the size of the NAL Unit length field (and must be 1, 2 or 4). The value of length_size = LengthSizeMinusOne + 1 |
first_sps | The sequence parameter set (MUST be passed) used to get the profile, level, etc. It will only be added to the configuration if a picture parameter set is also present. |
other | ps implement me |
ISOErr ISONewVVCSubpicSampleDescription | ( | MP4Track | theTrack, |
MP4Handle | sampleDescriptionH, | ||
u32 | dataReferenceIndex, | ||
u32 | width, | ||
u32 | height, | ||
u32 | length_size | ||
) |
Create a new VVC subpicture (vvs1) sample entry.
including a NALUconfigAtom (vvnC)
width | indicate the width of subpicture |
height | indicate the height of subpicture |
length_size | the size of the NAL Unit length field (and must be 1, 2 or 4). The value of length_size = LengthSizeMinusOne + 1 |
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.
theTrack | |
sampleDescriptionH | |
dataReferenceIndex | |
content_encoding | |
xml_namespace | |
schema_location |
(Re)set the type of a sample description.
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.
theMedia | input media object |
index | description index starting with 1 |
outDescriptionH | output description handle |
outDataReferenceIndex |