ISOBMFF
ISO Base Media File Format Reference Software Documentation
 
Loading...
Searching...
No Matches
ISOMovies.h
Go to the documentation of this file.
1
10#ifndef INCLUDED_ISOMOVIE_H
11#define INCLUDED_ISOMOVIE_H
12
13#ifndef INCLUDED_MP4MOVIE_H
14#include "MP4Movies.h"
15#endif
16
17#ifdef __cplusplus
18extern "C"
19{
20#endif
21
22/* These data types are common to both MPEG-4 and JPEG-2; ideally the "ISO" names should be used. */
23#define ISOHandle MP4Handle
24#define ISOErr MP4Err
25#define ISOMovie MP4Movie
26#define ISOTrack MP4Track
27#define ISOMedia MP4Media
28#define ISOTrackReader MP4TrackReader
29#define ISOUserData MP4UserData
30#define ISOAtomPtr MP4AtomPtr
31#define ISOLinkedList MP4LinkedList
32
33#define ISO_EXTERN MP4_EXTERN
34
35/* These constants are common to both MPEG-4 and JPEG-2; ideally the "ISO" names should be used. */
36#define ISOEOF MP4EOF
37#define ISONoErr MP4NoErr
38#define ISOFileNotFoundErr MP4FileNotFoundErr
39#define ISOBadParamErr MP4BadParamErr
40#define ISONoMemoryErr MP4NoMemoryErr
41#define ISOIOErr MP4IOErr
42#define ISONoLargeAtomSupportErr MP4NoLargeAtomSupportErr
43#define ISOBadDataErr MP4BadDataErr
44#define ISOVersionNotSupportedErr MP4VersionNotSupportedErr
45#define ISOInvalidMediaErr MP4InvalidMediaErr
46#define ISODataEntryTypeNotSupportedErr MP4DataEntryTypeNotSupportedErr
47#define ISONoQTAtomErr MP4NoQTAtomErr
48#define ISONotImplementedErr MP4NotImplementedErr
49
50#define ISONewTrackIsVisual MP4NewTrackIsVisual
51#define ISONewTrackIsAudio MP4NewTrackIsAudio
52#define ISONewTrackIsPrivate MP4NewTrackIsPrivate
53#define ISONewTrackIsMetadata MP4NewTrackIsMetadata
54
55#define ISOVisualHandlerType MP4VisualHandlerType
56#define ISOAudioHandlerType MP4AudioHandlerType
57#define ISOHintHandlerType MP4HintHandlerType
58#define ISOVolumetricHandlerType MP4VolumetricHandlerType
59#define ISOHapticHandlerType MP4HapticHandlerType
60
61#define ISOOpenMovieNormal MP4OpenMovieNormal
62#define ISOOpenMovieDebug MP4OpenMovieDebug
63#define ISOOpenMovieInPlace MP4OpenMovieInPlace
64
68 enum
69 {
70 ISOGraphicsModeSrcCopy = 0x00000000,
71 ISOGraphicsModeTransparent = 0x00000024,
72 ISOGraphicsModeAlpha = 0x00000100,
73 ISOGraphicsModeWhiteAlpha = 0x00000101,
74 ISOGraphicsModeBlackAlpha = 0x00000102
75 };
76
81 {
82 u32 data[9];
83 };
84 typedef struct ISOMatrixRecord ISOMatrixRecord;
86
91 {
92 u16 red;
93 u16 green;
94 u16 blue;
95 };
96 typedef struct ISORGBColor ISORGBColor;
98
102 enum
103 {
104 ISOUnknownFileType = (u32)0,
105 ISOMPEG4FileType = (u32)1,
106 ISOStillJPEG2000FileType = (u32)2,
107 ISOMotionJPEG2000FileType = (u32)3,
108 ISOQuickTimeFileType = (u32)4,
109 ISO3GPPFileType = (u32)5,
110 ISOMPEG21FileType = (u32)6
111 };
112
116 enum
117 {
118 ISOMediaHandlerType = MP4_FOUR_CHAR_CODE('m', 'h', 'l', 'r'),
119 ISODataHandlerType = MP4_FOUR_CHAR_CODE('d', 'h', 'l', 'r')
120 };
121
126 enum
127 {
135 ISOMpeg4V1Brand = MP4_FOUR_CHAR_CODE('m', 'p', '4', '1'),
137 ISOMpeg4V2Brand = MP4_FOUR_CHAR_CODE('m', 'p', '4', '2'),
139 ISOISOBrand = MP4_FOUR_CHAR_CODE('i', 's', 'o', 'm'),
141 ISOISO2Brand = MP4_FOUR_CHAR_CODE('i', 's', 'o', '2'),
143 ISO3GP4Brand = MP4_FOUR_CHAR_CODE('3', 'g', 'p', '4'),
145 ISO3GP5Brand = MP4_FOUR_CHAR_CODE('3', 'g', 'p', '5'),
147 ISO3GP6Brand = MP4_FOUR_CHAR_CODE('3', 'g', 'p', '6'),
149 ISOMPEG21Brand = MP4_FOUR_CHAR_CODE('m', 'p', '2', '1'),
151 ISOUnknownBrand = MP4_FOUR_CHAR_CODE(' ', ' ', ' ', ' '),
153 ISO_DASH_Brand = MP4_FOUR_CHAR_CODE('d', 'a', 's', 'h'),
167 ISO_DASH_SSSS_Brand = MP4_FOUR_CHAR_CODE('s', 's', 's', 's')
168 };
169
176 enum
177 {
178 AVCsps = 1,
179 AVCpps = 2,
181 SVCsps = 0x11,
182 SVCpps = 0x12,
183 SVCspsext = 0x13,
184 HEVCvps = 0x20,
185 HEVCsps = 0x21,
186 HEVCpps = 0x22
187 };
188
194 enum
195 {
196 VVCsps = 15,
197 VVCpps = 16,
198 VVCvps = 14,
199 VVCopi = 12,
200 VVCdci = 13,
201 VVC_prefix_aps = 17,
202 VVC_prefix_sei = 23
203 };
204
209 {
210 void *data;
211 };
212 typedef struct ISOMetaRecord ISOMetaRecord;
218
223 {
224 void *data;
225 };
232
237 typedef struct EntityGroupEntry
238 {
239 u32 grouping_type;
240 u32 group_id;
241 u32 num_entities_in_group;
242 u32 *entity_ids;
244
245/* These functions are general movie-handling functions and are common to both MPEG-4 and JPEG-2;
246 ideally the "ISO" names should be used. */
247#define ISODisposeMovie MP4DisposeMovie
248#define ISOGetMovieTimeScale MP4GetMovieTimeScale
249#define ISOGetMovieTrack MP4GetMovieTrack
250#define ISOOpenMovieFile MP4OpenMovieFile
251#define ISOPutMovieIntoHandle MP4PutMovieIntoHandle
252#define ISOSetMovieTimeScale MP4SetMovieTimeScale
253#define ISOAddTrackReference MP4AddTrackReference
254#define ISOAddSubSampleInformationToTrack MP4AddSubSampleInformationToTrack
255#define ISOSetSubSampleInformationFlags MP4SetSubSampleInformationFlags
256#define ISOGetSubSampleInformationEntryFromTrack MP4GetSubSampleInformationEntryFromTrack
257#define ISOAddSubSampleInformationEntry MP4AddSubSampleInformationEntry
258#define ISOAddTrackGroup MP4AddTrackGroup
259#define ISOAddTrackReferenceWithID MP4AddTrackReferenceWithID
260#define ISOGetMovieIndTrack MP4GetMovieIndTrack
261#define ISOGetMovieTrackCount MP4GetMovieTrackCount
262#define ISOGetTrackEnabled MP4GetTrackEnabled
263#define ISOGetTrackID MP4GetTrackID
264#define ISOGetTrackMedia MP4GetTrackMedia
265#define ISOGetTrackMovie MP4GetTrackMovie
266#define ISOGetTrackOffset MP4GetTrackOffset
267#define ISOGetTrackReference MP4GetTrackReference
268#define ISOGetTrackReferenceCount MP4GetTrackReferenceCount
269#define ISOGetTrackGroup MP4GetTrackGroup
270#define ISOInsertMediaIntoTrack MP4InsertMediaIntoTrack
271#define ISONewMovieTrack MP4NewMovieTrack
272#define ISONewMovieTrackWithID MP4NewMovieTrackWithID
273#define ISONewTrackMedia MP4NewTrackMedia
274#define ISOSetTrackEnabled MP4SetTrackEnabled
275#define ISOSetTrackOffset MP4SetTrackOffset
276#define ISOTrackTimeToMediaTime MP4TrackTimeToMediaTime
277#define ISOAddMediaDataReference MP4AddMediaDataReference
278#define ISOAddMediaSampleReference MP4AddMediaSampleReference
279#define ISOAddMediaSamples MP4AddMediaSamples
280#define ISOAddMediaSamplesPad MP4AddMediaSamplesPad
281#define ISOBeginMediaEdits MP4BeginMediaEdits
282#define ISOCheckMediaDataReferences MP4CheckMediaDataReferences
283#define ISOEndMediaEdits MP4EndMediaEdits
284#define ISOGetIndMediaSample MP4GetIndMediaSample
285#define ISOGetIndMediaSampleWithPad MP4GetIndMediaSampleWithPad
286#define ISOGetMediaDataReference MP4GetMediaDataReference
287#define ISOGetMovieDuration MP4GetMovieDuration
288#define ISOGetTrackDuration MP4GetTrackDuration
289#define ISOGetMediaDuration MP4GetMediaDuration
290#define ISOGetMediaHandlerDescription MP4GetMediaHandlerDescription
291#define ISOGetMediaLanguage MP4GetMediaLanguage
292#define ISOGetMediaSample MP4GetMediaSample
293#define ISOGetMediaSampleWithPad MP4GetMediaSampleWithPad
294#define ISOGetMediaSampleCount MP4GetMediaSampleCount
295#define ISOGetMediaTimeScale MP4GetMediaTimeScale
296#define ISOGetMediaTrack MP4GetMediaTrack
297#define ISOMediaTimeToSampleNum MP4MediaTimeToSampleNum
298#define ISOSampleNumToMediaTime MP4SampleNumToMediaTime
299#define ISOSetMediaLanguage MP4SetMediaLanguage
300#define ISOSetMediaExtendedLanguageTag MP4SetMediaExtendedLanguageTag
301#define ISOAddUserData MP4AddUserData
302#define ISOGetIndUserDataType MP4GetIndUserDataType
303#define ISOGetMovieUserData MP4GetMovieUserData
304#define ISOGetTrackUserData MP4GetTrackUserData
305#define ISOGetUserDataEntryCount MP4GetUserDataEntryCount
306#define ISOGetUserDataItem MP4GetUserDataItem
307#define ISOGetAtomFromUserData MP4GetAtomFromUserData
308#define ISODeleteUserDataItem MP4DeleteUserDataItem
309#define ISOGetUserDataTypeCount MP4GetUserDataTypeCount
310#define ISONewUserData MP4NewUserData
311#define ISOCreateTrackReader MP4CreateTrackReader
312#define ISODisposeTrackReader MP4DisposeTrackReader
313#define ISONewHandle MP4NewHandle
314#define ISOSetHandleSize MP4SetHandleSize
315#define ISODisposeHandle MP4DisposeHandle
316#define ISOGetHandleSize MP4GetHandleSize
317#define ISOSetHandleOffset MP4SetHandleOffset
318#define ISOUseSignedCompositionTimeOffsets MP4UseSignedCompositionTimeOffsets
319
320#define QTPutMovieIntoHandle MP4PutMovieIntoHandle
321#define MJ2PutMovieIntoHandle MP4PutMovieIntoHandle
322#define ISOPutMovieIntoHandle MP4PutMovieIntoHandle
323
324#define QTWriteMovieToFile MP4WriteMovieToFile
325#define MJ2WriteMovieToFile MP4WriteMovieToFile
326#define ISOWriteMovieToFile MP4WriteMovieToFile
327
328#define ISOAddAtomToMovie MP4AddAtomToMovie
329#define ISONewForeignAtom MP4NewForeignAtom
330#define ISOGetForeignAtom MP4GetForeignAtom
331#define ISONewUUIDAtom MP4NewUUIDAtom
332#define ISOAddAtomToTrack MP4AddAtomToTrack
333
334#define ISOGetTrackEditlistEntryCount MP4GetTrackEditlistEntryCount
335#define ISOGetTrackEditlist MP4GetTrackEditlist
336
337#define ISOGenericAtom MP4GenericAtom
338
339#define MJ2TrackReaderGetNextSample MP4TrackReaderGetNextAccessUnit
340
341 /*************************************************************************************************
342 * These functions are specific to Motion JPEG-2; they have only the "MJ2" names.
343 ************************************************************************************************/
344
355 ISO_EXTERN(ISOErr) MJ2SetMovieMatrix(ISOMovie theMovie, u32 matrix[9]);
364 ISO_EXTERN(ISOErr) MJ2GetMovieMatrix(ISOMovie theMovie, u32 outMatrix[9]);
373 ISO_EXTERN(ISOErr) MJ2SetMoviePreferredRate(ISOMovie theMovie, u32 rate);
382 ISO_EXTERN(ISOErr) MJ2GetMoviePreferredRate(ISOMovie theMovie, u32 *outRate);
392 ISO_EXTERN(ISOErr) MJ2SetMoviePreferredVolume(ISOMovie theMovie, s16 volume);
401 ISO_EXTERN(ISOErr) MJ2GetMoviePreferredVolume(ISOMovie theMovie, s16 *outVolume);
413 ISO_EXTERN(ISOErr) MJ2SetTrackMatrix(ISOTrack theTrack, u32 matrix[9]);
422 ISO_EXTERN(ISOErr) MJ2GetTrackMatrix(ISOTrack theTrack, u32 outMatrix[9]);
434 ISO_EXTERN(ISOErr) MJ2SetTrackLayer(ISOTrack theTrack, s16 layer);
443 ISO_EXTERN(ISOErr) MJ2GetTrackLayer(ISOTrack theTrack, s16 *outLayer);
456 ISO_EXTERN(ISOErr) MJ2SetTrackDimensions(ISOTrack theTrack, u32 width, u32 height);
466 ISO_EXTERN(ISOErr) MJ2GetTrackDimensions(ISOTrack theTrack, u32 *outWidth, u32 *outHeight);
478 ISO_EXTERN(ISOErr) MJ2SetTrackVolume(ISOTrack theTrack, s16 volume);
487 ISO_EXTERN(ISOErr) MJ2GetTrackVolume(ISOTrack theTrack, s16 *outVolume);
508 ISO_EXTERN(ISOErr)
509 MJ2SetMediaGraphicsMode(ISOMedia theMedia, u32 mode, const ISORGBColor *opColor);
513 ISO_EXTERN(ISOErr)
514 MJ2GetMediaGraphicsMode(ISOMedia theMedia, u32 *outMode, ISORGBColor *outOpColor);
524 ISO_EXTERN(ISOErr) MJ2SetMediaSoundBalance(ISOMedia theMedia, s16 balance);
528 ISO_EXTERN(ISOErr) MJ2GetMediaSoundBalance(ISOMedia theMedia, s16 *outBalance);
536 ISO_EXTERN(ISOErr) MJ2NewMovie(ISOMovie *outMovie);
537
538 /*************************************************************************************************
539 * These functions are specific to 3GPP; they have only the "3GPP" names.
540 ************************************************************************************************/
541
551 ISO_EXTERN(ISOErr) New3GPPMovie(ISOMovie *outMovie, u16 release);
552
553 /*************************************************************************************************
554 * These functions are specific to QuickTime; they have only the "QT" names.
555 ************************************************************************************************/
556
560 ISO_EXTERN(ISOErr) QTNewMovie(ISOMovie *outMovie);
561
562 /*************************************************************************************************
563 * These functions are general.
564 ************************************************************************************************/
565
576 ISO_EXTERN(ISOErr) ISOWriteMovieToFile(ISOMovie theMovie, const char *filename);
589 ISO_EXTERN(ISOErr) ISOSetMovieBrand(ISOMovie theMovie, u32 brand, u32 minorversion);
615 ISO_EXTERN(ISOErr) ISOSetMovieCompatibleBrand(ISOMovie theMovie, u32 brand);
625 ISO_EXTERN(ISOErr) ISOGetMovieBrand(ISOMovie theMovie, u32 *brand, u32 *minorversion);
635 ISO_EXTERN(ISOErr) ISOIsMovieCompatibleBrand(ISOMovie theMovie, u32 brand);
636
637 /*************************************************************************************************
638 * AVC Sample descriptions
639 ************************************************************************************************/
640
655 ISO_EXTERN(ISOErr)
656 ISONewAVCSampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH,
657 u32 dataReferenceIndex, u32 length_size, MP4Handle first_sps,
658 MP4Handle first_pps, MP4Handle first_spsext);
666 ISO_EXTERN(ISOErr) ISOAddVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where);
671 ISO_EXTERN(ISOErr)
672 ISOGetAVCSampleDescription(MP4Handle sampleEntryH, u32 *dataReferenceIndex, u32 *length_size,
673 u32 *sps_count, u32 *pss_count, u32 *spsext_count);
683 ISO_EXTERN(ISOErr)
684 ISOGetVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index);
694 ISO_EXTERN(ISOErr)
695 ISOGetHEVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index);
705 ISO_EXTERN(ISOErr)
706 ISOGetRESVSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index);
711 ISO_EXTERN(ISOErr) ISOGetNALUnitLength(MP4Handle sampleEntryH, u32 *out);
717 ISO_EXTERN(ISOErr) ISOGetRESVOriginalFormat(MP4Handle sampleEntryH, u32 *outOrigFmt);
726 ISO_EXTERN(ISOErr)
727 ISOGetRESVSchemeType(MP4Handle sampleEntryH, u32 *schemeType, u32 *schemeVersion,
728 char **schemeURI);
736 ISO_EXTERN(ISOErr)
737 ISOGetRESVSchemeInfoAtom(MP4Handle sampleEntryH, u32 atomType, MP4Handle outAtom);
749 ISO_EXTERN(ISOErr)
750 ISONewHEVCSampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH,
751 u32 dataReferenceIndex, u32 length_size, MP4Handle first_sps,
752 MP4Handle first_pps, MP4Handle first_vps);
753
754 /*************************************************************************************************
755 * VVC Sample descriptions
756 ************************************************************************************************/
768 ISO_EXTERN(ISOErr)
769 ISONewVVCSampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH,
770 u32 dataReferenceIndex, u32 length_size, MP4Handle first_sps,
771 MP4Handle first_pps);
784 MP4_EXTERN(ISOErr)
785 ISOGetVVCSampleDescription(MP4Handle sampleEntryH, u32 *dataReferenceIndex, u32 *length_size,
786 u32 naluType, u32 *count);
795 ISO_EXTERN(ISOErr)
796 ISOGetVVCNaluNums(MP4Handle sampleEntryH, u32 where, u32 *num_nalus);
806 ISO_EXTERN(ISOErr)
807 ISOGetVVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index);
816 MP4_EXTERN(ISOErr)
828 MP4_EXTERN(ISOErr)
830 u32 dataReferenceIndex, u32 width, u32 height, u32 length_size);
840 MP4_EXTERN(ISOErr)
841 ISOGetVVCSubpicSampleDescription(MP4Handle sampleEntryH, u32 *dataReferenceIndex,
842 u32 *length_size);
843
844 /*************************************************************************************************
845 * 3GPP media
846 ************************************************************************************************/
851 MP4_EXTERN(MP4Err)
852 ISOAddBitrateToSampleDescription(MP4Handle sampleEntryH, u8 is_3GPP, u32 buffersizeDB,
853 u32 maxBitrate, u32 avgBitrate);
858 MP4_EXTERN(MP4Err)
859 ISONewH263SampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH,
860 u32 dataReferenceIndex, u32 vendor, u8 decoder_version, u8 H263_level,
861 u8 H263_profile);
866 MP4_EXTERN(MP4Err)
867 ISONewAMRSampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH,
868 u32 dataReferenceIndex, u8 is_WB, u32 vendor, u8 decoder_version,
869 u16 mode_set, u8 mode_change_period, u8 frames_per_sample);
874 MP4_EXTERN(MP4Err)
875 ISONewAMRWPSampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH,
876 u32 dataReferenceIndex, u32 vendor, u8 decoder_version);
877
878 /*************************************************************************************************
879 * Meta Data
880 ************************************************************************************************/
907 ISO_EXTERN(ISOErr) ISONewFileMeta(ISOMovie theMovie, u32 metaType, ISOMeta *meta);
919 ISO_EXTERN(ISOErr) ISONewMovieMeta(ISOMovie theMovie, u32 metaType, ISOMeta *meta);
931 ISO_EXTERN(ISOErr) ISONewTrackMeta(ISOTrack theTrack, u32 metaType, ISOMeta *meta);
939 ISO_EXTERN(ISOErr)
940 ISOAddMetaBoxRelation(ISOMeta first_meta, ISOMeta second_meta, u8 relation_type);
946 ISO_EXTERN(ISOErr)
947 ISOGetMetaBoxRelation(ISOMeta first_meta, ISOMeta second_meta, u8 *relation_type);
953 ISO_EXTERN(ISOErr)
954 ISOAddMetaDataReference(ISOMeta meta, u16 *out_ref, ISOHandle urlHandle, ISOHandle urnHandle);
965 ISO_EXTERN(ISOErr)
966 ISOAddMetaItem(ISOMeta meta, ISOMetaItem *outItem, u64 base_offset, u16 data_ref_index);
971 ISO_EXTERN(ISOErr)
972 ISOAddMetaItemWithID(ISOMeta meta, ISOMetaItem *outItem, u64 base_offset, u16 data_ref_index,
973 u16 item_ID);
982 ISO_EXTERN(ISOErr) ISOAddItemExtent(ISOMetaItem item, MP4Handle data);
990 ISO_EXTERN(ISOErr) ISOAddItemExtentReference(ISOMetaItem item, u64 offset, u64 length);
1005 ISO_EXTERN(ISOErr)
1006 ISOAddItemExtentItem(ISOMetaItem item, ISOMetaItem extent_item, u32 offset, u32 length);
1015 ISO_EXTERN(ISOErr)
1016 ISOAddItemReference(ISOMetaItem item, u32 reference_type, u32 to_item_ID, u32 *outIndex);
1024 ISO_EXTERN(ISOErr)
1025 ISOAddItemReferences(ISOMetaItem item, u32 reference_type, u16 reference_count,
1026 MP4Handle to_item_IDs);
1032 MP4_EXTERN(MP4Err)
1033 ISOAddItemRelation(ISOMetaItem fromItem, ISOMetaItem toItem, u32 relationType);
1037 ISO_EXTERN(ISOErr)
1038 ISOGetItemReferences(ISOMetaItem item, u32 reference_type, u16 *reference_count,
1039 MP4Handle to_item_IDs);
1043 ISO_EXTERN(ISOErr)
1044 ISOGetItemReference(ISOMetaItem item, u32 reference_type, u16 reference_index,
1045 ISOMetaItem *outItem);
1053 ISO_EXTERN(ISOErr) ISOAddPrimaryData(ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom);
1059 ISO_EXTERN(ISOErr) ISOGetPrimaryData(ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom);
1067 ISO_EXTERN(ISOErr)
1068 ISOGetPrimaryItemData(ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom);
1072 ISO_EXTERN(ISOErr) ISOSetPrimaryItem(ISOMeta meta, ISOMetaItem item);
1076 ISO_EXTERN(ISOErr) ISOGetPrimaryItemID(ISOMeta meta, u16 *ID);
1080 ISO_EXTERN(ISOErr) ISOGetItemID(ISOMetaItem item, u16 *ID);
1086 ISO_EXTERN(ISOErr)
1087 ISOSetItemInfo(ISOMetaItem item, u16 protection_index, char *name, char *content_type,
1088 char *content_encoding);
1092 ISO_EXTERN(ISOErr)
1093 ISOSetItemInfoExtension(ISOMetaItem item, MP4Handle extension, u32 extension_type);
1097 ISO_EXTERN(ISOErr)
1098 ISOGetItemInfoExtension(ISOMetaItem item, MP4Handle extension, u32 *extension_type);
1103 ISO_EXTERN(ISOErr) ISOSetItemInfoItemType(ISOMetaItem item, u32 item_type, char *item_uri_type);
1108 ISO_EXTERN(ISOErr) ISOHideItem(ISOMetaItem item);
1114 ISO_EXTERN(ISOErr) ISOIsItemHidden(ISOMetaItem item);
1119 ISO_EXTERN(ISOErr) ISOGetItemInfoItemType(ISOMetaItem item, u32 *item_type, char **item_uri_type);
1126 ISO_EXTERN(ISOErr)
1127 ISOGetFileMeta(ISOMovie theMovie, ISOMeta *meta, u32 inMetaType, u32 *outMetaType);
1134 ISO_EXTERN(ISOErr)
1135 ISOGetMovieMeta(ISOMovie theMovie, ISOMeta *meta, u32 inMetaType, u32 *outMetaType);
1142 ISO_EXTERN(ISOErr)
1143 ISOGetTrackMeta(ISOTrack theTrack, ISOMeta *meta, u32 inMetaType, u32 *outMetaType);
1147 ISO_EXTERN(ISOErr)
1148 ISOGetAllItemsWithType(ISOMeta meta, u32 type, ISOMetaItem **items, u32 *numberOfItemsFound);
1152 ISO_EXTERN(ISOErr) ISOFindItemByName(ISOMeta meta, ISOMetaItem *item, char *name, u8 exact_case);
1156 ISO_EXTERN(ISOErr) ISOFindItemByID(ISOMeta meta, ISOMetaItem *item, u16 ID);
1164 ISO_EXTERN(ISOErr) ISOGetItemData(ISOMetaItem item, MP4Handle data, u64 *base_offset);
1170 ISO_EXTERN(ISOErr)
1171 ISOGetItemInfo(ISOMetaItem item, u16 *protection_index, char *name, char *content_type,
1172 char *content_encoding);
1180 ISO_EXTERN(MP4Err)
1181 ISONewMetaProtection(ISOMeta meta, u32 sch_type, u32 sch_version, char *sch_url,
1182 u16 *protection_index);
1187 ISO_EXTERN(MP4Err)
1188 ISOAddMetaProtectionInfo(ISOMeta meta, u16 protection_index, MP4GenericAtom schi_atom);
1193 ISO_EXTERN(MP4Err)
1194 ISOGetMetaProtection(ISOMeta meta, u16 protection_index, u32 *sch_type, u32 *sch_version,
1195 char *sch_url);
1200 ISO_EXTERN(MP4Err)
1201 ISOGetMetaProtectionInfo(ISOMeta meta, u16 protection_index, u32 atom_type,
1202 MP4GenericAtom *schi_atom);
1208 ISO_EXTERN(MP4Err)
1209 ISOAddMetaItemProperty(ISOMetaItem item, MP4GenericAtom *itemProperty, u8 essential);
1217 ISO_EXTERN(MP4Err)
1218 ISOGetProperitesOfMetaItem(ISOMetaItem item, MP4GenericAtom **properties, u32 *propertiesFound);
1226 ISO_EXTERN(ISOErr) ISONewEntityGroup(ISOMeta meta, u32 grouping_type, u32 group_id);
1234 ISO_EXTERN(ISOErr) ISOAddEntityIDToGroup(ISOMeta meta, u32 group_id, u32 entity_id);
1242 ISO_EXTERN(ISOErr) ISOGetEntityIDCnt(ISOMeta meta, u32 group_id, u32 *num_entities_in_group);
1252 ISO_EXTERN(ISOErr)
1254
1257#ifdef PRAGMA_EXPORT
1258#pragma export on
1259#endif
1260
1261#ifdef __cplusplus
1262}
1263#endif
1264#ifdef PRAGMA_EXPORT
1265#pragma export off
1266#endif
1267
1268#endif
ISOErr QTNewMovie(ISOMovie *outMovie)
Creaets a new empty QT Movie in memory.
ISOErr MJ2SetMediaSoundBalance(ISOMedia theMedia, s16 balance)
Sets the left-right balance of an audio track (normally a mono track).
ISOErr MJ2SetMediaGraphicsMode(ISOMedia theMedia, u32 mode, const ISORGBColor *opColor)
Sets the graphics mode for this track.
ISOErr MJ2GetMediaGraphicsMode(ISOMedia theMedia, u32 *outMode, ISORGBColor *outOpColor)
Returns the currently set graphics mode.
ISOErr MJ2GetMediaSoundBalance(ISOMedia theMedia, s16 *outBalance)
Returns the currently set balance value.
ISOErr ISOSetPrimaryItem(ISOMeta meta, ISOMetaItem item)
Sets the item of the indicated ID as the primary item (using a primary item box).
MP4Err ISOGetProperitesOfMetaItem(ISOMetaItem item, MP4GenericAtom **properties, u32 *propertiesFound)
Retruns an array of MP4GenericAtom pointers, which represent the item properties found for the item g...
MP4Err ISONewMetaProtection(ISOMeta meta, u32 sch_type, u32 sch_version, char *sch_url, u16 *protection_index)
Creates a new item protection information inside the given meta-data box.
ISOErr ISONewMovieMeta(ISOMovie theMovie, u32 metaType, ISOMeta *meta)
Creates a new meta box (atom), with the indicated ‘handler’ type, in the movie box (atom).
ISOErr ISOSetItemInfo(ISOMetaItem item, u16 protection_index, char *name, char *content_type, char *content_encoding)
Sets the information for the indicated item.
ISOErr ISOAddMetaItemWithID(ISOMeta meta, ISOMetaItem *outItem, u64 base_offset, u16 data_ref_index, u16 item_ID)
Creates a new meta-data item with specific ID, and returns an opaque pointer to it.
ISOErr ISOSetItemInfoExtension(ISOMetaItem item, MP4Handle extension, u32 extension_type)
Adds an item info extension to an existing item info entry.
ISOErr ISOGetEntityIDCnt(ISOMeta meta, u32 group_id, u32 *num_entities_in_group)
Get number of entries in the EntityToGroupBox.
MP4Err ISOAddItemRelation(ISOMetaItem fromItem, ISOMetaItem toItem, u32 relationType)
ISOErr ISOAddMetaDataReference(ISOMeta meta, u16 *out_ref, ISOHandle urlHandle, ISOHandle urnHandle)
Adds a data reference to the given meta-data.
ISOErr ISOAddItemExtent(ISOMetaItem item, MP4Handle data)
Adds some data to the given item, as its first (perhaps only) extent.
ISOErr ISOGetItemID(ISOMetaItem item, u16 *ID)
Gets the ID of the indicated item.
ISOErr ISOGetEntityGroupEntries(ISOMeta meta, EntityGroupEntryPtr *pEntries, u32 *cnt)
Get common data for all EntityToGroup entries.
ISOErr ISOAddItemReference(ISOMetaItem item, u32 reference_type, u32 to_item_ID, u32 *outIndex)
This function adds an item reference to the item reference box.
MP4Err ISOAddMetaProtectionInfo(ISOMeta meta, u16 protection_index, MP4GenericAtom schi_atom)
Adds an arbitrary atom to the scheme information of the associated protection information.
ISOErr ISOFindItemByID(ISOMeta meta, ISOMetaItem *item, u16 ID)
Gets a reference to an item by its ID.
ISOErr ISOGetItemData(ISOMetaItem item, MP4Handle data, u64 *base_offset)
Reads and returns the data associated with all the extents of the given item, concatenating them.
ISOErr ISOGetItemInfoExtension(ISOMetaItem item, MP4Handle extension, u32 *extension_type)
Gets an item info extension and its extension type from an item.
ISOErr ISOAddItemExtentItem(ISOMetaItem item, ISOMetaItem extent_item, u32 offset, u32 length)
Indicates that the data for this extent is located at another item’s extends.
ISOErr ISOGetMetaBoxRelation(ISOMeta first_meta, ISOMeta second_meta, u8 *relation_type)
Get the reletation type.
ISOErr ISONewTrackMeta(ISOTrack theTrack, u32 metaType, ISOMeta *meta)
Creates a new meta box (atom), with the indicated ‘handler’ type, in the indicated track box (atom).
ISOErr ISOGetItemReference(ISOMetaItem item, u32 reference_type, u16 reference_index, ISOMetaItem *outItem)
Get an item by reference type and index.
ISOErr ISOGetAllItemsWithType(ISOMeta meta, u32 type, ISOMetaItem **items, u32 *numberOfItemsFound)
Collects all items of a given type and presents the result in form of an array.
ISOErr ISOGetItemInfoItemType(ISOMetaItem item, u32 *item_type, char **item_uri_type)
Gets an item info item type from an existing item info entry.
ISOErr ISOSetItemInfoItemType(ISOMetaItem item, u32 item_type, char *item_uri_type)
Adds an item info item type to an existing item info entry.
ISOErr ISOGetPrimaryData(ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom)
Finds the box of the given type inside the meta box, and returns its contents.
ISOErr ISOGetItemInfo(ISOMetaItem item, u16 *protection_index, char *name, char *content_type, char *content_encoding)
Returns the information for a given item.
ISOErr ISOGetItemReferences(ISOMetaItem item, u32 reference_type, u16 *reference_count, MP4Handle to_item_IDs)
This function collects all item references of the item / reference_type combination.
ISOErr ISOAddItemExtentUsingItemData(ISOMetaItem item, MP4Handle data)
Adds some data to the given item, as its first (perhaps only) extent.
ISOErr ISOAddItemReferences(ISOMetaItem item, u32 reference_type, u16 reference_count, MP4Handle to_item_IDs)
This function adds multiple item references to the item reference box.
ISOErr ISOAddMetaBoxRelation(ISOMeta first_meta, ISOMeta second_meta, u8 relation_type)
Adds a meta box relation box to the additional meta data box, related to first and second meta box.
MP4Err ISOGetMetaProtection(ISOMeta meta, u16 protection_index, u32 *sch_type, u32 *sch_version, char *sch_url)
Gets the scheme type, version, and URL associated with the protection information of the given index.
MP4Err ISOAddMetaItemProperty(ISOMetaItem item, MP4GenericAtom *itemProperty, u8 essential)
Adds an item property, which can be any MP4GenericAtom, to an ISOMetaItem.
ISOErr ISOGetFileMeta(ISOMovie theMovie, ISOMeta *meta, u32 inMetaType, u32 *outMetaType)
Gets a reference to the file-level meta data.
MP4Err ISOGetMetaProtectionInfo(ISOMeta meta, u16 protection_index, u32 atom_type, MP4GenericAtom *schi_atom)
Finds and returns the atom of the given type inside the scheme information of the protection scheme a...
ISOErr ISOGetMovieMeta(ISOMovie theMovie, ISOMeta *meta, u32 inMetaType, u32 *outMetaType)
Gets a reference to the movie-level meta data.
MP4Err ISOCheckMetaDataReferences(ISOMeta meta)
Checks that all the data references used by the meta-data are accessible.
ISOErr ISOGetTrackMeta(ISOTrack theTrack, ISOMeta *meta, u32 inMetaType, u32 *outMetaType)
Gets a reference to the track-level meta data.
ISOErr ISOAddMetaItem(ISOMeta meta, ISOMetaItem *outItem, u64 base_offset, u16 data_ref_index)
Creates a new meta-data item, and returns an opaque pointer to it.
ISOErr ISONewFileMeta(ISOMovie theMovie, u32 metaType, ISOMeta *meta)
Creates a new meta box (atom), with the indicated ‘handler’ type, at the file level.
ISOErr ISOGetPrimaryItemID(ISOMeta meta, u16 *ID)
Finds the ID of the primary item.
ISOErr ISOHideItem(ISOMetaItem item)
Hide item by setting the (flags & 1) = 1.
ISOErr ISONewEntityGroup(ISOMeta meta, u32 grouping_type, u32 group_id)
Add new EntityToGroupBox (creates grpl if needed)
ISOErr ISOGetPrimaryItemData(ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom)
Finds the box of the given type inside the meta box, and returns its contents.
ISOErr ISOFindItemByName(ISOMeta meta, ISOMetaItem *item, char *name, u8 exact_case)
Finds an item that has the associated name in its item information.
ISOErr ISOAddEntityIDToGroup(ISOMeta meta, u32 group_id, u32 entity_id)
Add entity_id to EntityToGroupBox.
ISOErr ISOAddItemExtentReference(ISOMetaItem item, u64 offset, u64 length)
Adds a reference to the data.
ISOErr ISOIsItemHidden(ISOMetaItem item)
Check if item is hiden.
ISOErr ISOAddPrimaryData(ISOMeta meta, u32 box_type, MP4Handle data, u8 is_full_atom)
Places the indicated data inside a box in the meta-box, with the indicated box type (e....
ISOErr MJ2GetMovieMatrix(ISOMovie theMovie, u32 outMatrix[9])
This returns the overall transformation matrix for the movie.
ISOErr MJ2SetMovieMatrix(ISOMovie theMovie, u32 matrix[9])
This sets the matrix of the overall movie.
ISOErr New3GPPMovie(ISOMovie *outMovie, u16 release)
Creates a new empty 3GPP Movie in memory, and sets the brand to the indicated release (4,...
ISOErr MJ2SetMoviePreferredRate(ISOMovie theMovie, u32 rate)
This sets the rate of the movie (the normal and default rate is 1.0).
ISOErr MJ2GetMoviePreferredRate(ISOMovie theMovie, u32 *outRate)
This returns the currently set movie preferred rate.
ISOErr ISOSetMovieCompatibleBrand(ISOMovie theMovie, u32 brand)
Adds a minor brand into the compatible brands list of the Movie.
ISOErr ISOSetMovieBrand(ISOMovie theMovie, u32 brand, u32 minorversion)
Sets the Movie’s major brand.
ISOErr MJ2GetMoviePreferredVolume(ISOMovie theMovie, s16 *outVolume)
This returns the movie volume setting.
ISOErr MJ2SetMoviePreferredVolume(ISOMovie theMovie, s16 volume)
This sets the normal volume of the movie.
ISOErr ISOIsMovieCompatibleBrand(ISOMovie theMovie, u32 brand)
If the brand is a compatible brand of the movie, this returns MP4NoErr, otherwise it returns MP4NotFo...
ISOErr ISOGetMovieBrand(ISOMovie theMovie, u32 *brand, u32 *minorversion)
Returns the Movie’s major brand and minor version.
ISOErr MJ2NewMovie(ISOMovie *outMovie)
Creates a new empty Motion JPEG 2000 Movie in memory.
ISOErr ISOGetVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index)
Gets an AVC parameter set, placing it in the given handle.
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 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 ISOGetRESVOriginalFormat(MP4Handle sampleEntryH, u32 *outOrigFmt)
Get the four character code of the original un-transformed sample entry.
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 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 ISOGetRESVSchemeType(MP4Handle sampleEntryH, u32 *schemeType, u32 *schemeVersion, char **schemeURI)
Get scheme_type and scheme_version from the SchemeTypeBox in resv.
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.
ISOErr ISOGetVVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index)
Gets a VVC parameter set, placing it in the given handle.
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.
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 ISOGetNALUnitLength(MP4Handle sampleEntryH, u32 *out)
Get the NALUnitLength size in bytes.
ISOErr ISONewVVCSubpicSampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 width, u32 height, u32 length_size)
Create a new VVC subpicture (vvs1) sample entry.
ISOErr ISOGetRESVSchemeInfoAtom(MP4Handle sampleEntryH, u32 atomType, MP4Handle outAtom)
Get the box from the SchemeInformationBox in resv.
MP4Err ISOAddBitrateToSampleDescription(MP4Handle sampleEntryH, u8 is_3GPP, u32 buffersizeDB, u32 maxBitrate, u32 avgBitrate)
Add a bitrate atom to a sample entry (description).
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.
ISOErr ISOGetHEVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where, u32 index)
Gets a HEVC parameter set, placing it in the given handle.
ISOErr ISONewVVCSampleDescription(MP4Track theTrack, MP4Handle sampleDescriptionH, u32 dataReferenceIndex, u32 length_size, MP4Handle first_sps, MP4Handle first_pps)
Create a new VVC 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 ISOAddVVCSampleDescriptionPS(MP4Handle sampleEntryH, MP4Handle ps, u32 where)
This adds another parameter set (which is not, in fact, inspected), to the configuration.
ISOErr ISOGetVVCSubpicSampleDescription(MP4Handle sampleEntryH, u32 *dataReferenceIndex, u32 *length_size)
Gets the length size of the VVC subpicture sample entry.
ISOErr MJ2GetTrackMatrix(ISOTrack theTrack, u32 outMatrix[9])
This returns the current matrix.
ISOErr MJ2SetTrackMatrix(ISOTrack theTrack, u32 matrix[9])
This sets the overall transformation matrix for the movie as a whole.
ISOErr MJ2SetTrackLayer(ISOTrack theTrack, s16 layer)
This sets the ordering of the visual tracks.
ISOErr MJ2SetTrackVolume(ISOTrack theTrack, s16 volume)
This sets the normal volume of the track.
ISOErr MJ2GetTrackDimensions(ISOTrack theTrack, u32 *outWidth, u32 *outHeight)
This returns the currently set dimensions.
ISOErr MJ2GetTrackVolume(ISOTrack theTrack, s16 *outVolume)
Returns the currently set track volume.
ISOErr MJ2GetTrackLayer(ISOTrack theTrack, s16 *outLayer)
This returns the currently set track layer.
ISOErr MJ2SetTrackDimensions(ISOTrack theTrack, u32 width, u32 height)
This sets the width and height of a track.
int MP4Err
This is a typedef for function error codes.
Definition MP4Movies.h:34
char ** MP4Handle
MP4Handle is used to pass sections of dynamically allocated memory to the API.
Definition MP4Movies.h:265
ISOMetaItemRecord * ISOMetaItem
This is an opaque handle that contains a reference to a rich meta-data item.
Definition ISOMovies.h:231
#define MP4_FOUR_CHAR_CODE(a, b, c, d)
Makes a four-character code when needed.
Definition MP4OSMacros.h:51
ISOMetaRecord * ISOMeta
This is an opaque handle that contains a reference to rich meta-data.
Definition ISOMovies.h:217
@ ISOUnknownBrand
default 'brand'
Definition ISOMovies.h:151
@ ISO_DASH_MSIX_Brand
DASH indexed media segment.
Definition ISOMovies.h:159
@ ISO_DASH_DSMS_Brand
DASH self-initializing media seg.
Definition ISOMovies.h:155
@ ISO3GP5Brand
3GPP Release 5
Definition ISOMovies.h:145
@ MJ2JPEG2000Brand
brand for Motion JPEG-2000
Definition ISOMovies.h:131
@ ISO_DASH_MSDH_Brand
DASH general format media segment.
Definition ISOMovies.h:157
@ ISO_DASH_Brand
DASH (ISO/IEC 23009-1)
Definition ISOMovies.h:153
@ ISOMpeg4V1Brand
brand for MPEG-4 version 1
Definition ISOMovies.h:135
@ ISOMPEG21Brand
MPEG-21.
Definition ISOMovies.h:149
@ ISOQuickTimeBrand
brand for QuickTime
Definition ISOMovies.h:133
@ ISOMpeg4V2Brand
brand for MPEG-4 version 2
Definition ISOMovies.h:137
@ ISO_DASH_RISX_Brand
DASH representation index segment.
Definition ISOMovies.h:161
@ JP2JPEG2000Brand
brand for JPEG-2000
Definition ISOMovies.h:129
@ ISO3GP6Brand
3GPP Release 6
Definition ISOMovies.h:147
@ ISO_DASH_SISX_Brand
DASH single index segment.
Definition ISOMovies.h:165
@ ISOISOBrand
conforming brand for all files
Definition ISOMovies.h:139
@ ISO_DASH_SSSS_Brand
DASH subsegment index segment.
Definition ISOMovies.h:167
@ ISO3GP4Brand
3GPP Release 4
Definition ISOMovies.h:143
@ ISOISO2Brand
conforming brand for all files
Definition ISOMovies.h:141
@ ISO_DASH_LMSG_Brand
DASH last media segment indicator.
Definition ISOMovies.h:163
@ AVCpps
AVC Picture parameter set.
Definition ISOMovies.h:179
@ SVCpps
SVC Picture parameter set.
Definition ISOMovies.h:182
@ AVCspsext
AVC Sequence parameter set extension.
Definition ISOMovies.h:180
@ AVCsps
AVC Sequence parameter set.
Definition ISOMovies.h:178
@ SVCspsext
SVC SPS extension.
Definition ISOMovies.h:183
@ HEVCsps
HEVC Sequence Parameter Set.
Definition ISOMovies.h:185
@ SVCsps
SVC Sequence parameter set.
Definition ISOMovies.h:181
@ HEVCvps
HEVC Video Parameter Set.
Definition ISOMovies.h:184
@ HEVCpps
HEVC Picture Parameter Set.
Definition ISOMovies.h:186
Structure which contanis all the common parameters of an EntityGroup.
Definition ISOMovies.h:238
These data types are specific to JPEG-2; however, they have "ISO" names.
Definition ISOMovies.h:81
Meta-item records.
Definition ISOMovies.h:223
Meta-data records.
Definition ISOMovies.h:209
RGB color type.
Definition ISOMovies.h:91
Definition MP4Movies.h:247
Definition MP4Movies.h:200