libgpac
Documentation of the core library of GPAC
isom_tools.c File Reference
+ Include dependency graph for isom_tools.c:

Data Structures

struct  LInfo
 
struct  LHVCTrackInfo
 
struct  HEVCTileImport
 
struct  FragCallback
 

Functions

GF_EXPORT GF_Err gf_media_change_par (GF_ISOFile *file, u32 track, s32 ar_num, s32 ar_den, Bool force_par, Bool rewrite_bs)
 
GF_EXPORT GF_Err gf_media_change_color (GF_ISOFile *file, u32 track, s32 fullrange, s32 vidformat, s32 colorprim, s32 transfer, s32 colmatrix)
 
GF_EXPORT GF_Err gf_media_remove_non_rap (GF_ISOFile *file, u32 track, Bool non_ref_only)
 
GF_EXPORT GF_Err gf_media_get_file_hash (const char *file, u8 hash[20])
 
GF_EXPORT GF_Err gf_media_make_isma (GF_ISOFile *mp4file, Bool keepESIDs, Bool keepImage, Bool no_ocr)
 
GF_EXPORT GF_Err gf_media_make_3gpp (GF_ISOFile *mp4file)
 
GF_EXPORT GF_Err gf_media_make_psp (GF_ISOFile *mp4)
 
GF_Err gf_media_get_color_info (GF_ISOFile *file, u32 track, u32 sampleDescriptionIndex, u32 *colour_type, u16 *colour_primaries, u16 *transfer_characteristics, u16 *matrix_coefficients, Bool *full_range_flag)
 
GF_Err gf_isom_set_meta_qt (GF_ISOFile *file)
 
GF_EXPORT GF_Err gf_media_check_qt_prores (GF_ISOFile *mp4)
 
GF_EXPORT GF_ESDgf_media_map_esd (GF_ISOFile *mp4, u32 track, u32 stsd_idx)
 
GF_EXPORT GF_ESDgf_media_map_item_esd (GF_ISOFile *mp4, u32 item_id)
 
static s32 gf_get_DQId (GF_ISOFile *file, u32 track)
 
static Bool gf_isom_has_svc_explicit (GF_ISOFile *file, u32 track)
 
static u32 gf_isom_get_track_id_max (GF_ISOFile *file)
 
GF_EXPORT GF_Err gf_media_split_svc (GF_ISOFile *file, u32 track, Bool splitAll)
 
GF_EXPORT GF_Err gf_media_merge_svc (GF_ISOFile *file, u32 track, Bool mergeAll)
 
static GF_NALUFFParamArrayalloc_hevc_param_array (GF_HEVCConfig *hevc_cfg, u8 type)
 
GF_EXPORT GF_Err gf_media_filter_hevc (GF_ISOFile *file, u32 track, u8 max_temporal_id_plus_one, u8 max_layer_id_plus_one)
 
GF_EXPORT GF_Err gf_media_split_lhvc (GF_ISOFile *file, u32 track, Bool for_temporal_sublayers, Bool splitAll, GF_LHVCExtractoreMode extractor_mode)
 
GF_EXPORT GF_Err gf_media_change_pl (GF_ISOFile *file, u32 track, u32 profile, u32 compat, u32 level)
 GPAC_DISABLE_AV_PARSERS. More...
 
u32 hevc_get_tile_id (HEVCState *hevc, u32 *tile_x, u32 *tile_y, u32 *tile_width, u32 *tile_height)
 
static void hevc_add_trif (GF_ISOFile *file, u32 track, u32 id, Bool full_picture, u32 independent, Bool filtering_disable, u32 tx, u32 ty, u32 tw, u32 th, Bool is_default)
 
GF_EXPORT GF_Err gf_media_split_hevc_tiles (GF_ISOFile *file, u32 signal_mode)
 
static Bool on_frag_event (void *_udta, GF_Event *evt)
 
GF_EXPORT GF_Err gf_media_fragment_file (GF_ISOFile *input, const char *output_file, Double max_duration_sec, Bool use_mfra)
 
GF_Err rfc_6381_get_codec_aac (char *szCodec, u32 codec_id, u8 *dsi, u32 dsi_size, Bool force_sbr)
 
GF_Err rfc_6381_get_codec_m4v (char *szCodec, u32 codec_id, u8 *dsi, u32 dsi_size)
 
GF_Err rfc_6381_get_codec_avc (char *szCodec, u32 subtype, GF_AVCConfig *avcc)
 
GF_Err rfc_6381_get_codec_hevc (char *szCodec, u32 subtype, GF_HEVCConfig *hvcc)
 
GF_Err rfc_6381_get_codec_av1 (char *szCodec, u32 subtype, GF_AV1Config *av1c, COLR colr)
 
GF_Err rfc_6381_get_codec_vpx (char *szCodec, u32 subtype, GF_VPConfig *vpcc, COLR colr)
 
GF_Err rfc_6381_get_codec_dolby_vision (char *szCodec, u32 subtype, GF_DOVIDecoderConfigurationRecord *dovi)
 
GF_Err rfc_6381_get_codec_vvc (char *szCodec, u32 subtype, GF_VVCConfig *vvcc)
 
GF_Err rfc_6381_get_codec_mpegha (char *szCodec, u32 subtype, u8 *dsi, u32 dsi_size, s32 pl)
 
GF_Err rfc_6381_get_codec_uncv (char *szCodec, u32 subtype, u8 *dsi, u32 dsi_size)
 
GF_Err rfc_6381_get_codec_stpp (char *szCodec, u32 subtype, const char *xmlnamespace, const char *xml_schema_loc, const char *mimes)
 
GF_Err rfc6381_codec_name_default (char *szCodec, u32 subtype, u32 codec_id)
 
GF_EXPORT GF_Err gf_media_get_rfc_6381_codec_name (GF_ISOFile *movie, u32 track, u32 stsd_idx, char *szCodec, Bool force_inband, Bool force_sbr)
 
GF_Err gf_media_av1_layer_size_get (GF_ISOFile *file, u32 trackNumber, u32 sample_number, u8 op_index, u32 layer_size[3])
 
GF_EXPORT GF_Err gf_media_isom_apply_qt_key (GF_ISOFile *movie, const char *name, const char *val)
 

Variables

static const u32 ISMA_VIDEO_OD_ID = 20
 
static const u32 ISMA_AUDIO_OD_ID = 10
 
static const u32 ISMA_VIDEO_ES_ID = 201
 
static const u32 ISMA_AUDIO_ES_ID = 101
 
static const u8 ISMA_BIFS_AUDIO []
 
static const u8 ISMA_GF_BIFS_VIDEO []
 
static const u8 ISMA_BIFS_AV []
 
static const u8 ISMA_BIFS_IMAGE []
 
static const u8 ISMA_BIFS_AI []
 
char gf_prog_lf
 
static char base32_chars [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
 
static const char * ttml_namespaces []
 
static const int TTML_NAMESPACES_COUNT = GF_ARRAY_LENGTH(ttml_namespaces)
 

Data Structure Documentation

◆ LInfo

struct LInfo
Data Fields
u8 layer_id_plus_one
u8 min_temporal_id
u8 max_temporal_id

◆ LHVCTrackInfo

struct LHVCTrackInfo
+ Collaboration diagram for LHVCTrackInfo:
Data Fields
u32 track_num
u32 layer_id
GF_HEVCConfig * lhvccfg
GF_BitStream * bs
u32 data_offset
u32 data_size
u32 temporal_id_sample
u32 max_temporal_id_sample
LInfo layers[64]
u32 width
u32 height
Bool has_samples
Bool non_tsa_vcl

◆ HEVCTileImport

struct HEVCTileImport
Data Fields
u32 track
u32 track_id
u32 sample_count
u32 tx
u32 ty
u32 tw
u32 th
u32 data_offset
GF_BitStream * sample_data
u32 nb_nalus_in_sample
Bool all_intra

◆ FragCallback

struct FragCallback
Data Fields
u32 filter_idx_plus_one
u32 last_prog
GF_FilterSession * fsess

Function Documentation

◆ gf_media_get_color_info()

GF_Err gf_media_get_color_info ( GF_ISOFile *  file,
u32  track,
u32  sampleDescriptionIndex,
u32 colour_type,
u16 colour_primaries,
u16 transfer_characteristics,
u16 matrix_coefficients,
Bool full_range_flag 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_set_meta_qt()

GF_Err gf_isom_set_meta_qt ( GF_ISOFile *  file)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_get_DQId()

static s32 gf_get_DQId ( GF_ISOFile *  file,
u32  track 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_has_svc_explicit()

static Bool gf_isom_has_svc_explicit ( GF_ISOFile *  file,
u32  track 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_get_track_id_max()

static u32 gf_isom_get_track_id_max ( GF_ISOFile *  file)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ alloc_hevc_param_array()

static GF_NALUFFParamArray* alloc_hevc_param_array ( GF_HEVCConfig hevc_cfg,
u8  type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hevc_get_tile_id()

u32 hevc_get_tile_id ( HEVCState hevc,
u32 tile_x,
u32 tile_y,
u32 tile_width,
u32 tile_height 
)
+ Here is the caller graph for this function:

◆ hevc_add_trif()

static void hevc_add_trif ( GF_ISOFile *  file,
u32  track,
u32  id,
Bool  full_picture,
u32  independent,
Bool  filtering_disable,
u32  tx,
u32  ty,
u32  tw,
u32  th,
Bool  is_default 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_frag_event()

static Bool on_frag_event ( void *  _udta,
GF_Event evt 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_aac()

GF_Err rfc_6381_get_codec_aac ( char *  szCodec,
u32  codec_id,
u8 dsi,
u32  dsi_size,
Bool  force_sbr 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_m4v()

GF_Err rfc_6381_get_codec_m4v ( char *  szCodec,
u32  codec_id,
u8 dsi,
u32  dsi_size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_avc()

GF_Err rfc_6381_get_codec_avc ( char *  szCodec,
u32  subtype,
GF_AVCConfig avcc 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_hevc()

GF_Err rfc_6381_get_codec_hevc ( char *  szCodec,
u32  subtype,
GF_HEVCConfig hvcc 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_av1()

GF_Err rfc_6381_get_codec_av1 ( char *  szCodec,
u32  subtype,
GF_AV1Config av1c,
COLR  colr 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_vpx()

GF_Err rfc_6381_get_codec_vpx ( char *  szCodec,
u32  subtype,
GF_VPConfig vpcc,
COLR  colr 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_dolby_vision()

GF_Err rfc_6381_get_codec_dolby_vision ( char *  szCodec,
u32  subtype,
GF_DOVIDecoderConfigurationRecord dovi 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_vvc()

GF_Err rfc_6381_get_codec_vvc ( char *  szCodec,
u32  subtype,
GF_VVCConfig vvcc 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_mpegha()

GF_Err rfc_6381_get_codec_mpegha ( char *  szCodec,
u32  subtype,
u8 dsi,
u32  dsi_size,
s32  pl 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_uncv()

GF_Err rfc_6381_get_codec_uncv ( char *  szCodec,
u32  subtype,
u8 dsi,
u32  dsi_size 
)
+ Here is the caller graph for this function:

◆ rfc_6381_get_codec_stpp()

GF_Err rfc_6381_get_codec_stpp ( char *  szCodec,
u32  subtype,
const char *  xmlnamespace,
const char *  xml_schema_loc,
const char *  mimes 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rfc6381_codec_name_default()

GF_Err rfc6381_codec_name_default ( char *  szCodec,
u32  subtype,
u32  codec_id 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ ISMA_VIDEO_OD_ID

const u32 ISMA_VIDEO_OD_ID = 20
static

◆ ISMA_AUDIO_OD_ID

const u32 ISMA_AUDIO_OD_ID = 10
static

◆ ISMA_VIDEO_ES_ID

const u32 ISMA_VIDEO_ES_ID = 201
static

◆ ISMA_AUDIO_ES_ID

const u32 ISMA_AUDIO_ES_ID = 101
static

◆ ISMA_BIFS_AUDIO

const u8 ISMA_BIFS_AUDIO[]
static
Initial value:
=
{
0xC0, 0x10, 0x12, 0x81, 0x30, 0x2A, 0x05, 0x7C
}

◆ ISMA_GF_BIFS_VIDEO

const u8 ISMA_GF_BIFS_VIDEO[]
static
Initial value:
=
{
0xC0, 0x10, 0x12, 0x60, 0x42, 0x82, 0x28, 0x29,
0xD0, 0x4F, 0x00
}

◆ ISMA_BIFS_AV

const u8 ISMA_BIFS_AV[]
static
Initial value:
=
{
0xC0, 0x10, 0x12, 0x81, 0x30, 0x2A, 0x05, 0x72,
0x60, 0x42, 0x82, 0x28, 0x29, 0xD0, 0x4F, 0x00
}

◆ ISMA_BIFS_IMAGE

const u8 ISMA_BIFS_IMAGE[]
static
Initial value:
=
{
0xC0, 0x11, 0xA4, 0xCD, 0x53, 0x6A, 0x0A, 0x44,
0x13, 0x00
}

◆ ISMA_BIFS_AI

const u8 ISMA_BIFS_AI[]
static
Initial value:
=
{
0xC0, 0x11, 0xA5, 0x02, 0x60, 0x54, 0x0A, 0xE4,
0xCD, 0x53, 0x6A, 0x0A, 0x44, 0x13, 0x00
}

◆ gf_prog_lf

char gf_prog_lf
extern

◆ base32_chars

char base32_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"
static

◆ ttml_namespaces

const char* ttml_namespaces[]
static
Initial value:
= {
"im3t", "http://www.w3.org/ns/ttml/profile/imsc1.2/text",
"im2t", "http://www.w3.org/ns/ttml/profile/imsc1.1/text",
"im2i", "http://www.w3.org/ns/ttml/profile/imsc1.1/image",
"im1t", "http://www.w3.org/ns/ttml/profile/imsc1/text",
"im1i", "http://www.w3.org/ns/ttml/profile/imsc1/image"
}

◆ TTML_NAMESPACES_COUNT

const int TTML_NAMESPACES_COUNT = GF_ARRAY_LENGTH(ttml_namespaces)
static