libgpac
Documentation of the core library of GPAC
ISO Base Media File

ISOBMF, 3GPP, AVC and HEVC file format utilities. More...

+ Collaboration diagram for ISO Base Media File:

Modules

 ISO Sample
 
 Generic API
 
 ISOBMFF Reading
 
 ISOBMFF Writing
 
 ISOBMFF MPEG-4 Systems
 
 ISOBMFF Sample Descriptions
 
 Fragmented ISOBMFF Read
 
 ISOBMFF UserData Manipulation
 
 Fragmented ISOBMFF Writing
 
 ISOBMFF RTP Hinting
 
 Subtitles and Timed Text
 
 Content Protection
 
 Meta and Image File Format
 
 iTunes tagging
 
 Track Groups
 
 Subsamples
 
 Sample Groups
 

Typedefs

typedef struct __tag_isom GF_ISOFile
 
typedef u32 GF_ISOTrackID
 

Enumerations

enum  {
  GF_ISOM_REF_OD = GF_4CC( 'm', 'p', 'o', 'd' ) , GF_ISOM_REF_DECODE = GF_4CC( 'd', 'p', 'n', 'd' ) , GF_ISOM_REF_OCR = GF_4CC( 's', 'y', 'n', 'c' ) , GF_ISOM_REF_IPI = GF_4CC( 'i', 'p', 'i', 'r' ) ,
  GF_ISOM_REF_META = GF_4CC( 'c', 'd', 's', 'c' ) , GF_ISOM_REF_HINT = GF_4CC( 'h', 'i', 'n', 't' ) , GF_ISOM_REF_CHAP = GF_4CC( 'c', 'h', 'a', 'p' ) , GF_ISOM_REF_BASE = GF_4CC( 's', 'b', 'a', 's' ) ,
  GF_ISOM_REF_SCAL = GF_4CC( 's', 'c', 'a', 'l' ) , GF_ISOM_REF_TBAS = GF_4CC( 't', 'b', 'a', 's' ) , GF_ISOM_REF_SABT = GF_4CC( 's', 'a', 'b', 't' ) , GF_ISOM_REF_OREF = GF_4CC( 'o', 'r', 'e', 'f' ) ,
  GF_ISOM_REF_FONT = GF_4CC( 'f', 'o', 'n', 't' ) , GF_ISOM_REF_HIND = GF_4CC( 'h', 'i', 'n', 'd' ) , GF_ISOM_REF_VDEP = GF_4CC( 'v', 'd', 'e', 'p' ) , GF_ISOM_REF_VPLX = GF_4CC( 'v', 'p', 'l', 'x' ) ,
  GF_ISOM_REF_SUBT = GF_4CC( 's', 'u', 'b', 't' ) , GF_ISOM_REF_THUMB = GF_4CC( 't', 'h', 'm', 'b' ) , GF_ISOM_REF_ADDA = GF_4CC( 'a', 'd', 'd', 'a' ) , GF_ISOM_REF_ADRC = GF_4CC( 'a', 'd', 'r', 'c' ) ,
  GF_ISOM_REF_ILOC = GF_4CC( 'i', 'l', 'o', 'c' ) , GF_ISOM_REF_AVCP = GF_4CC( 'a', 'v', 'c', 'p' ) , GF_ISOM_REF_SWTO = GF_4CC( 's', 'w', 't', 'o' ) , GF_ISOM_REF_SWFR = GF_4CC( 's', 'w', 'f', 'r' ) ,
  GF_ISOM_REF_TMCD = GF_4CC( 't', 'm', 'c', 'd' ) , GF_ISOM_REF_CDEP = GF_4CC( 'c', 'd', 'e', 'p' ) , GF_ISOM_REF_SCPT = GF_4CC( 's', 'c', 'p', 't' ) , GF_ISOM_REF_SSRC = GF_4CC( 's', 's', 'r', 'c' ) ,
  GF_ISOM_REF_LYRA = GF_4CC( 'l', 'y', 'r', 'a' ) , GF_ISOM_REF_FDEL = GF_4CC( 'f', 'd', 'e', 'l' ) , GF_ISOM_REF_AUXR = GF_4CC( 'a', 'u', 'x', 'r' ) , GF_ISOM_REF_SUBPIC = GF_4CC( 's', 'u', 'b', 'p' )
}
 
enum  GF_ISOEditType { GF_ISOM_EDIT_EMPTY = 0x00 , GF_ISOM_EDIT_DWELL = 0x01 , GF_ISOM_EDIT_NORMAL = 0x02 }
 
enum  {
  GF_ISOM_MEDIA_VISUAL = GF_4CC( 'v', 'i', 'd', 'e' ) , GF_ISOM_MEDIA_AUXV = GF_4CC( 'a', 'u', 'x', 'v' ) , GF_ISOM_MEDIA_PICT = GF_4CC( 'p', 'i', 'c', 't' ) , GF_ISOM_MEDIA_AUDIO = GF_4CC( 's', 'o', 'u', 'n' ) ,
  GF_ISOM_MEDIA_HINT = GF_4CC( 'h', 'i', 'n', 't' ) , GF_ISOM_MEDIA_META = GF_4CC( 'm', 'e', 't', 'a' ) , GF_ISOM_MEDIA_TEXT = GF_4CC( 't', 'e', 'x', 't' ) , GF_ISOM_MEDIA_SUBT = GF_4CC( 's', 'b', 't', 'l' ) ,
  GF_ISOM_MEDIA_SUBPIC = GF_4CC( 's', 'u', 'b', 'p' ) , GF_ISOM_MEDIA_MPEG_SUBT = GF_4CC( 's', 'u', 'b', 't' ) , GF_ISOM_MEDIA_CLOSED_CAPTION = GF_4CC( 'c', 'l', 'c', 'p' ) , GF_ISOM_MEDIA_TIMECODE = GF_4CC( 't', 'm', 'c', 'd' ) ,
  GF_ISOM_MEDIA_OD = GF_4CC( 'o', 'd', 's', 'm' ) , GF_ISOM_MEDIA_OCR = GF_4CC( 'c', 'r', 's', 'm' ) , GF_ISOM_MEDIA_SCENE = GF_4CC( 's', 'd', 's', 'm' ) , GF_ISOM_MEDIA_MPEG7 = GF_4CC( 'm', '7', 's', 'm' ) ,
  GF_ISOM_MEDIA_OCI = GF_4CC( 'o', 'c', 's', 'm' ) , GF_ISOM_MEDIA_IPMP = GF_4CC( 'i', 'p', 's', 'm' ) , GF_ISOM_MEDIA_MPEGJ = GF_4CC( 'm', 'j', 's', 'm' ) , GF_ISOM_MEDIA_ESM = GF_4CC( 'g', 'e', 's', 'm' ) ,
  GF_ISOM_MEDIA_DIMS = GF_4CC( 'd', 'i', 'm', 's' ) , GF_ISOM_MEDIA_FLASH = GF_4CC( 'f', 'l', 's', 'h' ) , GF_ISOM_MEDIA_QTVR = GF_4CC( 'q', 't', 'v', 'r' ) , GF_ISOM_MEDIA_JPEG = GF_4CC( 'j', 'p', 'e', 'g' ) ,
  GF_ISOM_MEDIA_JP2 = GF_4CC( 'j', 'p', '2', ' ' ) , GF_ISOM_MEDIA_PNG = GF_4CC( 'p', 'n', 'g', ' ' )
}
 
enum  {
  GF_ISOM_SUBTYPE_MPEG4 = GF_4CC( 'M', 'P', 'E', 'G' ) , GF_ISOM_SUBTYPE_MPEG4_CRYP = GF_4CC( 'E', 'N', 'C', 'M' ) , GF_ISOM_SUBTYPE_RESV = GF_4CC( 'r', 'e', 's', 'v' ) , GF_ISOM_SUBTYPE_AVC_H264 = GF_4CC( 'a', 'v', 'c', '1' ) ,
  GF_ISOM_SUBTYPE_AVC2_H264 = GF_4CC( 'a', 'v', 'c', '2' ) , GF_ISOM_SUBTYPE_AVC3_H264 = GF_4CC( 'a', 'v', 'c', '3' ) , GF_ISOM_SUBTYPE_AVC4_H264 = GF_4CC( 'a', 'v', 'c', '4' ) , GF_ISOM_SUBTYPE_SVC_H264 = GF_4CC( 's', 'v', 'c', '1' ) ,
  GF_ISOM_SUBTYPE_MVC_H264 = GF_4CC( 'm', 'v', 'c', '1' ) , GF_ISOM_SUBTYPE_HVC1 = GF_4CC( 'h', 'v', 'c', '1' ) , GF_ISOM_SUBTYPE_HEV1 = GF_4CC( 'h', 'e', 'v', '1' ) , GF_ISOM_SUBTYPE_HVC2 = GF_4CC( 'h', 'v', 'c', '2' ) ,
  GF_ISOM_SUBTYPE_HEV2 = GF_4CC( 'h', 'e', 'v', '2' ) , GF_ISOM_SUBTYPE_LHV1 = GF_4CC( 'l', 'h', 'v', '1' ) , GF_ISOM_SUBTYPE_LHE1 = GF_4CC( 'l', 'h', 'e', '1' ) , GF_ISOM_SUBTYPE_HVT1 = GF_4CC( 'h', 'v', 't', '1' ) ,
  GF_ISOM_SUBTYPE_VVC1 = GF_4CC( 'v', 'v', 'c', '1' ) , GF_ISOM_SUBTYPE_VVI1 = GF_4CC( 'v', 'v', 'i', '1' ) , GF_ISOM_SUBTYPE_VVS1 = GF_4CC( 'v', 'v', 's', '1' ) , GF_ISOM_SUBTYPE_VVCN = GF_4CC( 'v', 'v', 'c', 'N' ) ,
  GF_ISOM_SUBTYPE_AV01 = GF_4CC('a', 'v', '0', '1') , GF_ISOM_SUBTYPE_OPUS = GF_4CC('O', 'p', 'u', 's') , GF_ISOM_SUBTYPE_FLAC = GF_4CC( 'f', 'L', 'a', 'C' ) , GF_ISOM_SUBTYPE_VP08 = GF_4CC('v', 'p', '0', '8') ,
  GF_ISOM_SUBTYPE_VP09 = GF_4CC('v', 'p', '0', '9') , GF_ISOM_SUBTYPE_VP10 = GF_4CC('v', 'p', '1', '0') , GF_ISOM_SUBTYPE_DVHE = GF_4CC('d', 'v', 'h', 'e') , GF_ISOM_SUBTYPE_DVH1 = GF_4CC('d', 'v', 'h', '1') ,
  GF_ISOM_SUBTYPE_DVA1 = GF_4CC('d', 'v', 'a', '1') , GF_ISOM_SUBTYPE_DVAV = GF_4CC('d', 'v', 'a', 'v') , GF_ISOM_SUBTYPE_DAV1 = GF_4CC('d', 'a', 'v', '1') , GF_ISOM_SUBTYPE_3GP_H263 = GF_4CC( 's', '2', '6', '3' ) ,
  GF_ISOM_SUBTYPE_3GP_AMR = GF_4CC( 's', 'a', 'm', 'r' ) , GF_ISOM_SUBTYPE_3GP_AMR_WB = GF_4CC( 's', 'a', 'w', 'b' ) , GF_ISOM_SUBTYPE_3GP_EVRC = GF_4CC( 's', 'e', 'v', 'c' ) , GF_ISOM_SUBTYPE_3GP_QCELP = GF_4CC( 's', 'q', 'c', 'p' ) ,
  GF_ISOM_SUBTYPE_3GP_SMV = GF_4CC( 's', 's', 'm', 'v' ) , GF_ISOM_SUBTYPE_3GP_DIMS = GF_4CC( 'd', 'i', 'm', 's' ) , GF_ISOM_SUBTYPE_AC3 = GF_4CC( 'a', 'c', '-', '3' ) , GF_ISOM_SUBTYPE_EC3 = GF_4CC( 'e', 'c', '-', '3' ) ,
  GF_ISOM_SUBTYPE_MP3 = GF_4CC( '.', 'm', 'p', '3' ) , GF_ISOM_SUBTYPE_MLPA = GF_4CC( 'm', 'l', 'p', 'a' ) , GF_ISOM_SUBTYPE_MP4A = GF_4CC( 'm', 'p', '4', 'a' ) , GF_ISOM_SUBTYPE_MP4S = GF_4CC( 'm', 'p', '4', 's' ) ,
  GF_ISOM_SUBTYPE_LSR1 = GF_4CC( 'l', 's', 'r', '1' ) , GF_ISOM_SUBTYPE_WVTT = GF_4CC( 'w', 'v', 't', 't' ) , GF_ISOM_SUBTYPE_STXT = GF_4CC( 's', 't', 'x', 't' ) , GF_ISOM_SUBTYPE_STPP = GF_4CC( 's', 't', 'p', 'p' ) ,
  GF_ISOM_SUBTYPE_SBTT = GF_4CC( 's', 'b', 't', 't' ) , GF_ISOM_SUBTYPE_METT = GF_4CC( 'm', 'e', 't', 't' ) , GF_ISOM_SUBTYPE_METX = GF_4CC( 'm', 'e', 't', 'x' ) , GF_ISOM_SUBTYPE_TX3G = GF_4CC( 't', 'x', '3', 'g' ) ,
  GF_ISOM_SUBTYPE_TEXT = GF_4CC( 't', 'e', 'x', 't' ) , GF_ISOM_SUBTYPE_SUBTITLE = GF_4CC( 's', 'b', 't', 'l' ) , GF_ISOM_SUBTYPE_RTP = GF_4CC( 'r', 't', 'p', ' ' ) , GF_ISOM_SUBTYPE_SRTP = GF_4CC( 's', 'r', 't', 'p' ) ,
  GF_ISOM_SUBTYPE_RRTP = GF_4CC( 'r', 'r', 't', 'p' ) , GF_ISOM_SUBTYPE_RTCP = GF_4CC( 'r', 't', 'c', 'p' ) , GF_ISOM_SUBTYPE_FLUTE = GF_4CC( 'f', 'd', 'p', ' ' ) , GF_ISOM_SUBTYPE_XDVB = GF_4CC( 'x', 'd', 'v', 'b' ) ,
  GF_ISOM_SUBTYPE_H263 = GF_4CC( 'h', '2', '6', '3' ) , GF_ISOM_SUBTYPE_JPEG = GF_4CC( 'j', 'p', 'e', 'g' ) , GF_ISOM_SUBTYPE_PNG = GF_4CC( 'p', 'n', 'g', ' ' ) , GF_ISOM_SUBTYPE_MJP2 = GF_4CC( 'm', 'j', 'p', '2' ) ,
  GF_ISOM_SUBTYPE_JP2K = GF_4CC('j','p','2','k') , GF_ISOM_SUBTYPE_MH3D_MHA1 = GF_4CC( 'm', 'h', 'a', '1' ) , GF_ISOM_SUBTYPE_MH3D_MHA2 = GF_4CC( 'm', 'h', 'a', '2' ) , GF_ISOM_SUBTYPE_MH3D_MHM1 = GF_4CC( 'm', 'h', 'm', '1' ) ,
  GF_ISOM_SUBTYPE_MH3D_MHM2 = GF_4CC( 'm', 'h', 'm', '2' ) , GF_ISOM_SUBTYPE_IPCM = GF_4CC( 'i', 'p', 'c', 'm' ) , GF_ISOM_SUBTYPE_FPCM = GF_4CC( 'f', 'p', 'c', 'm' ) , GF_ISOM_SUBTYPE_NCLX = GF_4CC( 'n', 'c', 'l', 'x' ) ,
  GF_ISOM_SUBTYPE_NCLC = GF_4CC( 'n', 'c', 'l', 'c' ) , GF_ISOM_SUBTYPE_PROF = GF_4CC( 'p', 'r', 'o', 'f' ) , GF_ISOM_SUBTYPE_RICC = GF_4CC( 'r', 'I', 'C', 'C' ) , GF_QT_SUBTYPE_RAW = GF_4CC('r','a','w',' ') ,
  GF_QT_SUBTYPE_TWOS = GF_4CC('t','w','o','s') , GF_QT_SUBTYPE_SOWT = GF_4CC('s','o','w','t') , GF_QT_SUBTYPE_FL32 = GF_4CC('f','l','3','2') , GF_QT_SUBTYPE_FL64 = GF_4CC('f','l','6','4') ,
  GF_QT_SUBTYPE_IN24 = GF_4CC('i','n','2','4') , GF_QT_SUBTYPE_IN32 = GF_4CC('i','n','3','2') , GF_QT_SUBTYPE_ULAW = GF_4CC('u','l','a','w') , GF_QT_SUBTYPE_ALAW = GF_4CC('a','l','a','w') ,
  GF_QT_SUBTYPE_ADPCM = GF_4CC(0x6D,0x73,0x00,0x02) , GF_QT_SUBTYPE_IMA_ADPCM = GF_4CC(0x6D,0x73,0x00,0x11) , GF_QT_SUBTYPE_DVCA = GF_4CC('d','v','c','a') , GF_QT_SUBTYPE_QDMC = GF_4CC('Q','D','M','C') ,
  GF_QT_SUBTYPE_QDMC2 = GF_4CC('Q','D','M','2') , GF_QT_SUBTYPE_QCELP = GF_4CC('Q','c','l','p') , GF_QT_SUBTYPE_kMP3 = GF_4CC(0x6D,0x73,0x00,0x55) , GF_QT_SUBTYPE_C608 = GF_4CC( 'c', '6', '0', '8' ) ,
  GF_QT_SUBTYPE_APCH = GF_4CC( 'a', 'p', 'c', 'h' ) , GF_QT_SUBTYPE_APCO = GF_4CC( 'a', 'p', 'c', 'o' ) , GF_QT_SUBTYPE_APCN = GF_4CC( 'a', 'p', 'c', 'n' ) , GF_QT_SUBTYPE_APCS = GF_4CC( 'a', 'p', 'c', 's' ) ,
  GF_QT_SUBTYPE_AP4X = GF_4CC( 'a', 'p', '4', 'x' ) , GF_QT_SUBTYPE_AP4H = GF_4CC( 'a', 'p', '4', 'h' ) , GF_QT_SUBTYPE_YUYV = GF_4CC('y','u','v','2') , GF_QT_SUBTYPE_UYVY = GF_4CC('2','v','u','y') ,
  GF_QT_SUBTYPE_YUV444 = GF_4CC('v','3','0','8') , GF_QT_SUBTYPE_YUVA444 = GF_4CC('v','4','0','8') , GF_QT_SUBTYPE_YUV422_10 = GF_4CC('v','2','1','0') , GF_QT_SUBTYPE_YUV444_10 = GF_4CC('v','4','1','0') ,
  GF_QT_SUBTYPE_YUV422_16 = GF_4CC('v','2','1','6') , GF_QT_SUBTYPE_YUV420 = GF_4CC('j','4','2','0') , GF_QT_SUBTYPE_I420 = GF_4CC('I','4','2','0') , GF_QT_SUBTYPE_IYUV = GF_4CC('I','Y','U','V') ,
  GF_QT_SUBTYPE_YV12 = GF_4CC('y','v','1','2') , GF_QT_SUBTYPE_YVYU = GF_4CC('Y','V','Y','U') , GF_QT_SUBTYPE_RGBA = GF_4CC('R','G','B','A') , GF_QT_SUBTYPE_ABGR = GF_4CC('A','B','G','R') ,
  GF_QT_SUBTYPE_ALAC = GF_4CC('a','l','a','c') , GF_QT_SUBTYPE_LPCM = GF_4CC('l','p','c','m') , GF_ISOM_SUBTYPE_FFV1 = GF_4CC( 'F', 'F', 'V', '1' ) , GF_ISOM_ITEM_TYPE_AUXI = GF_4CC('a', 'u', 'x', 'i') ,
  GF_QT_SUBTYPE_TMCD = GF_4CC( 't', 'm', 'c', 'd' ) , GF_ISOM_SUBTYPE_VC1 = GF_4CC( 'v', 'c', '-', '1' ) , GF_ISOM_SUBTYPE_DVB_SUBS = GF_4CC( 'd', 'v', 'b', 's' ) , GF_ISOM_SUBTYPE_DVB_TELETEXT = GF_4CC( 'd', 'v', 'b', 't' ) ,
  GF_ISOM_SUBTYPE_DTSC = GF_4CC('d','t','s','c') , GF_ISOM_SUBTYPE_DTSH = GF_4CC('d','t','s','h') , GF_ISOM_SUBTYPE_DTSL = GF_4CC('d','t','s','l') , GF_ISOM_SUBTYPE_DTSE = GF_4CC('d','t','s','e') ,
  GF_ISOM_SUBTYPE_DTSX = GF_4CC('d','t','s','x') , GF_ISOM_SUBTYPE_DTSY = GF_4CC('d','t','s','y') , GF_ISOM_SUBTYPE_UNCV = GF_4CC( 'u', 'n', 'c', 'v' ) , GF_ISOM_ITEM_TYPE_UNCI = GF_4CC( 'u', 'n', 'c', 'i' )
}
 
enum  GF_ISOSearchMode {
  GF_ISOM_SEARCH_FORWARD = 1 , GF_ISOM_SEARCH_BACKWARD = 2 , GF_ISOM_SEARCH_SYNC_FORWARD = 3 , GF_ISOM_SEARCH_SYNC_BACKWARD = 4 ,
  GF_ISOM_SEARCH_SYNC_SHADOW = 5
}
 
enum  {
  GF_ISOM_BRAND_ISOM = GF_4CC( 'i', 's', 'o', 'm' ) , GF_ISOM_BRAND_ISO2 = GF_4CC( 'i', 's', 'o', '2' ) , GF_ISOM_BRAND_MP41 = GF_4CC( 'm', 'p', '4', '1' ) , GF_ISOM_BRAND_MP42 = GF_4CC( 'm', 'p', '4', '2' ) ,
  GF_ISOM_BRAND_MJP2 = GF_4CC( 'm', 'j', 'p', '2' ) , GF_ISOM_BRAND_MJ2S = GF_4CC( 'm', 'j', '2', 's' ) , GF_ISOM_BRAND_3GP4 = GF_4CC('3', 'g', 'p', '4') , GF_ISOM_BRAND_3GP5 = GF_4CC('3', 'g', 'p', '5') ,
  GF_ISOM_BRAND_3GP6 = GF_4CC('3', 'g', 'p', '6') , GF_ISOM_BRAND_3GG5 = GF_4CC('3', 'g', 'g', '5') , GF_ISOM_BRAND_3GG6 = GF_4CC('3', 'g', 'g', '6') , GF_ISOM_BRAND_3G2A = GF_4CC('3', 'g', '2', 'a') ,
  GF_ISOM_BRAND_AVC1 = GF_4CC('a', 'v', 'c', '1') , GF_ISOM_BRAND_MP21 = GF_4CC('m', 'p', '2', '1') , GF_ISOM_BRAND_ISO4 = GF_4CC( 'i', 's', 'o', '4' ) , GF_ISOM_BRAND_HEIF = GF_4CC('h', 'e', 'i', 'f') ,
  GF_ISOM_BRAND_MIF1 = GF_4CC('m', 'i', 'f', '1') , GF_ISOM_BRAND_HEIC = GF_4CC('h', 'e', 'i', 'c') , GF_ISOM_BRAND_HEIM = GF_4CC('h', 'e', 'i', 'm') , GF_ISOM_BRAND_AVIF = GF_4CC('a', 'v', 'i', 'f') ,
  GF_ISOM_BRAND_AVCI = GF_4CC('a', 'v', 'c', 'i') , GF_ISOM_BRAND_VVIC = GF_4CC('v', 'v', 'i', 'c') , GF_ISOM_BRAND_ISO1 = GF_4CC( 'i', 's', 'o', '1' ) , GF_ISOM_BRAND_ISO3 = GF_4CC( 'i', 's', 'o', '3' ) ,
  GF_ISOM_BRAND_ISO5 = GF_4CC( 'i', 's', 'o', '5' ) , GF_ISOM_BRAND_ISO6 = GF_4CC( 'i', 's', 'o', '6' ) , GF_ISOM_BRAND_ISO7 = GF_4CC( 'i', 's', 'o', '7' ) , GF_ISOM_BRAND_ISO8 = GF_4CC( 'i', 's', 'o', '8' ) ,
  GF_ISOM_BRAND_ISO9 = GF_4CC( 'i', 's', 'o', '9' ) , GF_ISOM_BRAND_ISOA = GF_4CC( 'i', 's', 'o', 'a' ) , GF_ISOM_BRAND_QT = GF_4CC( 'q', 't', ' ', ' ' ) , GF_ISOM_BRAND_JP2 = GF_4CC( 'j', 'p', '2', ' ' ) ,
  GF_ISOM_BRAND_MSNV = GF_4CC( 'M', 'S', 'N', 'V' ) , GF_ISOM_BRAND_M4A = GF_4CC( 'M', '4', 'A', ' ' ) , GF_ISOM_BRAND_M4V = GF_4CC( 'M', '4', 'V', ' ' ) , GF_ISOM_BRAND_HVCE = GF_4CC( 'h', 'v', 'c', 'e' ) ,
  GF_ISOM_BRAND_HVCI = GF_4CC( 'h', 'v', 'c', 'i' ) , GF_ISOM_BRAND_HVTI = GF_4CC( 'h', 'v', 't', 'i' ) , GF_ISOM_BRAND_AV01 = GF_4CC( 'a', 'v', '0', '1') , GF_ISOM_BRAND_OPUS = GF_4CC( 'O', 'p', 'u', 's') ,
  GF_ISOM_BRAND_ISMA = GF_4CC( 'I', 'S', 'M', 'A' ) , GF_ISOM_BRAND_DASH = GF_4CC('d','a','s','h') , GF_ISOM_BRAND_DSMS = GF_4CC('d','s','m','s') , GF_ISOM_BRAND_MSDH = GF_4CC('m','s','d','h') ,
  GF_ISOM_BRAND_MSIX = GF_4CC('m','s','i','x') , GF_ISOM_BRAND_RISX = GF_4CC('r','i','s','x') , GF_ISOM_BRAND_LMSG = GF_4CC('l','m','s','g') , GF_ISOM_BRAND_SISX = GF_4CC('s','i','s','x') ,
  GF_ISOM_BRAND_SSSS = GF_4CC('s','s','s','s') , GF_ISOM_BRAND_CMFC = GF_4CC('c','m','f','c') , GF_ISOM_BRAND_CMF2 = GF_4CC('c','m','f','2') , GF_ISOM_BRAND_ODCF = GF_4CC('o','d','c','f') ,
  GF_ISOM_BRAND_OPF2 = GF_4CC('o','p','f','2') , GF_ISOM_BRAND_COMP = GF_4CC( 'c', 'o', 'm', 'p' ) , GF_ISOM_BRAND_ISOC = GF_4CC( 'i', 's', 'o', 'C' )
}
 
enum  GF_ISOSampleRollType { GF_ISOM_SAMPLE_ROLL_NONE =0 , GF_ISOM_SAMPLE_ROLL , GF_ISOM_SAMPLE_PREROLL , GF_ISOM_SAMPLE_PREROLL_NONE }
 

Detailed Description

This section documents the reading and writing of ISOBMF (MP4, 3GPP, AVC, HEVC HEIF ...) The library supports:

All the READ function in this API can be used in EDIT/WRITE mode. However, some unexpected errors or values may happen in that case, depending on how much modifications you made (timing, track with 0 samples, ...). On the other hand, none of the EDIT/WRITE functions will work in READ mode.

The output structure of a edited file will sometimes be different from the original file, but the media-data and meta-data will be identical. The only change happens in the file media-data container(s) during edition

When editing the file, you MUST set the final name of the modified file to something different. This API doesn't allow file overwriting.

Typedef Documentation

◆ GF_ISOFile

typedef struct __tag_isom GF_ISOFile

isomedia file

◆ GF_ISOTrackID

typedef u32 GF_ISOTrackID

a track ID value - just a 32 bit value but typedefed for API safety

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Track reference types

Some track may depend on other tracks for several reasons. They reference these tracks through the following Reference Types

Enumerator
GF_ISOM_REF_OD 

ref type for the OD track dependencies

GF_ISOM_REF_DECODE 

ref type for stream dependencies

GF_ISOM_REF_OCR 

ref type for OCR (Object Clock Reference) dependencies

GF_ISOM_REF_IPI 

ref type for IPI (Intellectual Property Information) dependencies

GF_ISOM_REF_META 

this track describes the referenced tr

GF_ISOM_REF_HINT 

ref type for Hint tracks

GF_ISOM_REF_CHAP 

ref type for QT Chapter tracks

GF_ISOM_REF_BASE 

ref type for the SVC and SHVC base tracks

GF_ISOM_REF_SCAL 

ref type for the SVC and SHVC extractor reference tracks

GF_ISOM_REF_TBAS 

ref type for the SHVC tile base tracks

GF_ISOM_REF_SABT 

ref type for the SHVC tile tracks

GF_ISOM_REF_OREF 

ref type for the SHVC oinf track

GF_ISOM_REF_FONT 

this track uses fonts carried/defined in the referenced track

GF_ISOM_REF_HIND 

this track depends on the referenced hint track, i.e., it should only be used if the referenced hint track is used.

GF_ISOM_REF_VDEP 

this track contains auxiliary depth video information for the referenced video track

GF_ISOM_REF_VPLX 

this track contains auxiliary parallax video information for the referenced video track

GF_ISOM_REF_SUBT 

this track contains subtitle, timed text or overlay graphical information for the referenced track or any track in the alternate group to which the track belongs, if any

GF_ISOM_REF_THUMB 

thumbnail track

GF_ISOM_REF_ADDA 

additional audio track

GF_ISOM_REF_ADRC 

DRC metadata

GF_ISOM_REF_ILOC 

item->track location

GF_ISOM_REF_AVCP 

AVC dep stream

GF_ISOM_REF_SWTO 

AVC switch to

GF_ISOM_REF_SWFR 

AVC switch from

GF_ISOM_REF_TMCD 

Time code

GF_ISOM_REF_CDEP 

Structural dependency

GF_ISOM_REF_SCPT 

transcript

GF_ISOM_REF_SSRC 

nonprimary source description

GF_ISOM_REF_LYRA 

layer audio track dependency

GF_ISOM_REF_FDEL 

File Delivery Item Information Extension

GF_ISOM_REF_AUXR 

Item auxiliary reference

GF_ISOM_REF_SUBPIC 

ref type for the VVC subpicture tracks

◆ GF_ISOEditType

Track Edit list type

Enumerator
GF_ISOM_EDIT_EMPTY 

empty segment in the track (no media for this segment)

GF_ISOM_EDIT_DWELL 

dwelled segment in the track (one media sample for this segment)

GF_ISOM_EDIT_NORMAL 

normal segment in the track

◆ anonymous enum

anonymous enum

Generic Media Types (YOU HAVE TO USE ONE OF THESE TYPES FOR COMPLIANT ISO MEDIA FILES)

◆ anonymous enum

anonymous enum

specific media sub-types - you shall make sure the media sub type is what you expect

◆ GF_ISOSearchMode

direction for sample search (including SyncSamples search) Function using search allways specify the desired time in composition (presentation) time (Sample N-1) DesiredTime (Sample N)

Enumerator
GF_ISOM_SEARCH_FORWARD 

FORWARD: will give the next sample given the desired time (eg, N)

GF_ISOM_SEARCH_BACKWARD 

BACKWARD: will give the previous sample given the desired time (eg, N-1)

GF_ISOM_SEARCH_SYNC_FORWARD 

SYNCFORWARD: will search from the desired point in time for a sync sample if any. If no sync info, behaves as FORWARD

GF_ISOM_SEARCH_SYNC_BACKWARD 

SYNCBACKWARD: will search till the desired point in time for a sync sample if any. If no sync info, behaves as BACKWARD

GF_ISOM_SEARCH_SYNC_SHADOW 

SYNCSHADOW: use the sync shadow information to retrieve the sample. If no SyncShadow info, behave as SYNCBACKWARD

Warning
deprecated in ISOBMFF

◆ anonymous enum

anonymous enum

Predefined File Brand codes (MPEG-4 and JPEG2000)

◆ GF_ISOSampleRollType

sample roll information type

Enumerator
GF_ISOM_SAMPLE_ROLL_NONE 

no roll info associated

GF_ISOM_SAMPLE_ROLL 

roll info describes a roll operation

GF_ISOM_SAMPLE_PREROLL 

roll info describes an audio preroll

GF_ISOM_SAMPLE_PREROLL_NONE 

roll info describes audio preroll but is not set for this sample