libgpac
Documentation of the core library of GPAC
avparse.h File Reference

Utility tools for audio and video raw media parsing. More...

#include <gpac/bitstream.h>
#include <gpac/mpeg4_odf.h>
+ Include dependency graph for avparse.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  GF_M4VDecSpecInfo
 
struct  ogg_audio_codec_desc
 
struct  GF_VorbisParser
 
struct  GF_M4ADecSpecInfo
 

Enumerations

enum  {
  GF_M4A_AAC_MAIN = 1 , GF_M4A_AAC_LC = 2 , GF_M4A_AAC_SSR = 3 , GF_M4A_AAC_LTP = 4 ,
  GF_M4A_AAC_SBR = 5 , GF_M4A_AAC_SCALABLE = 6 , GF_M4A_TWINVQ = 7 , GF_M4A_CELP = 8 ,
  GF_M4A_HVXC = 9 , GF_M4A_TTSI = 12 , GF_M4A_MAIN_SYNTHETIC = 13 , GF_M4A_WAVETABLE_SYNTHESIS = 14 ,
  GF_M4A_GENERAL_MIDI = 15 , GF_M4A_ALGO_SYNTH_AUDIO_FX = 16 , GF_M4A_ER_AAC_LC = 17 , GF_M4A_ER_AAC_LTP = 19 ,
  GF_M4A_ER_AAC_SCALABLE = 20 , GF_M4A_ER_TWINVQ = 21 , GF_M4A_ER_BSAC = 22 , GF_M4A_ER_AAC_LD = 23 ,
  GF_M4A_ER_CELP = 24 , GF_M4A_ER_HVXC = 25 , GF_M4A_ER_HILN = 26 , GF_M4A_ER_PARAMETRIC = 27 ,
  GF_M4A_SSC = 28 , GF_M4A_AAC_PS = 29 , GF_M4A_LAYER1 = 32 , GF_M4A_LAYER2 = 33 ,
  GF_M4A_LAYER3 = 34 , GF_M4A_DST = 35 , GF_M4A_ALS = 36 , GF_M4A_USAC = 42
}
 
enum  ObuType {
  OBU_RESERVED_0 = 0 , OBU_SEQUENCE_HEADER = 1 , OBU_TEMPORAL_DELIMITER = 2 , OBU_FRAME_HEADER = 3 ,
  OBU_TILE_GROUP = 4 , OBU_METADATA = 5 , OBU_FRAME = 6 , OBU_REDUNDANT_FRAME_HEADER = 7 ,
  OBU_TILE_LIST = 8 , OBU_RESERVED_9 = 9 , OBU_RESERVED_10 = 10 , OBU_RESERVED_11 = 11 ,
  OBU_RESERVED_12 = 12 , OBU_RESERVED_13 = 13 , OBU_RESERVED_14 = 14 , OBU_PADDING = 15
}
 OBU types. More...
 
enum  ObuMetadataType {
  OBU_METADATA_TYPE_HDR_CLL = 1 , OBU_METADATA_TYPE_HDR_MDCV = 2 , OBU_METADATA_TYPE_SCALABILITY = 3 , OBU_METADATA_TYPE_ITUT_T35 = 4 ,
  OBU_METADATA_TYPE_TIMECODE = 5
}
 OBU metadata types. More...
 

Functions

void gf_media_reduce_aspect_ratio (u32 *width, u32 *height)
 
void gf_media_get_reduced_frame_rate (u32 *timescale, u32 *sample_dur)
 
u32 gf_media_nalu_add_emulation_bytes (const u8 *buffer_src, u8 *buffer_dst, u32 nal_size)
 
u32 gf_media_nalu_emulation_bytes_add_count (u8 *buffer, u32 nal_size)
 
GF_M4VParser * gf_m4v_parser_new (u8 *data, u64 data_size, Bool mpeg12video)
 
GF_M4VParser * gf_m4v_parser_bs_new (GF_BitStream *bs, Bool mpeg12video)
 
void gf_m4v_parser_del (GF_M4VParser *m4v)
 
void gf_m4v_parser_del_no_bs (GF_M4VParser *m4v)
 
GF_Err gf_m4v_parse_config (GF_M4VParser *m4v, GF_M4VDecSpecInfo *dsi)
 
void gf_m4v_parser_reset (GF_M4VParser *m4v, u8 obj_type)
 
GF_Err gf_m4v_parse_frame (GF_M4VParser *m4v, GF_M4VDecSpecInfo *dsi, u8 *frame_type, u32 *time_inc, u64 *size, u64 *start, Bool *is_coded)
 
u64 gf_m4v_get_object_start (GF_M4VParser *m4v)
 
GF_Err gf_m4v_get_config (u8 *rawdsi, u32 rawdsi_size, GF_M4VDecSpecInfo *dsi)
 
GF_Err gf_mpegv12_get_config (u8 *rawdsi, u32 rawdsi_size, GF_M4VDecSpecInfo *dsi)
 
void gf_m4v_rewrite_pl (u8 **io_dsi, u32 *io_dsi_len, u8 PL)
 
GF_Err gf_m4v_rewrite_par (u8 **io_dsi, u32 *io_dsi_len, s32 par_n, s32 par_d)
 
const char * gf_m4v_get_profile_name (u8 video_pl)
 
s32 gf_mv12_next_start_code (u8 *pbuffer, u32 buflen, u32 *optr, u32 *scode)
 
s32 gf_mv12_next_slice_start (u8 *pbuffer, u32 startoffset, u32 buflen, u32 *slice_offset)
 
u8 gf_mp3_num_channels (u32 hdr)
 
u16 gf_mp3_sampling_rate (u32 hdr)
 
u16 gf_mp3_window_size (u32 hdr)
 
u32 gf_mp3_bit_rate (u32 hdr)
 
u8 gf_mp3_object_type_indication (u32 hdr)
 
u8 gf_mp3_layer (u32 hdr)
 
u16 gf_mp3_frame_size (u32 hdr)
 
u32 gf_mp3_get_next_header (FILE *fin)
 
u32 gf_mp3_get_next_header_mem (const u8 *buffer, u32 size, u32 *pos)
 
u8 gf_mp3_version (u32 hdr)
 
const char * gf_mp3_version_name (u32 hdr)
 
Bool gf_vorbis_parse_header (GF_VorbisParser *vp, u8 *data, u32 data_len)
 
u32 gf_vorbis_check_frame (GF_VorbisParser *vp, u8 *data, u32 data_len)
 
Bool gf_opus_parse_header (GF_OpusConfig *cfg, u8 *data, u32 data_len)
 
u32 gf_opus_check_frame (GF_OpusConfig *cfg, u8 *data, u32 data_len)
 
u64 gf_mpegh_escaped_value (GF_BitStream *bs, u32 nBits1, u32 nBits2, u32 nBits3)
 
s32 gf_mpegh_get_mhas_pl (u8 *ptr, u32 size, u64 *chan_layout)
 
u32 gf_id3_read_size (GF_BitStream *bs)
 
u32 gf_m4a_get_channel_cfg (u32 nb_chan)
 
GF_Err gf_m4a_get_config (u8 *dsi, u32 dsi_size, GF_M4ADecSpecInfo *cfg)
 
u32 gf_m4a_get_profile (GF_M4ADecSpecInfo *cfg)
 
GF_Err gf_m4a_write_config (GF_M4ADecSpecInfo *cfg, u8 **dsi, u32 *dsi_size)
 
GF_Err gf_m4a_write_config_bs (GF_BitStream *bs, GF_M4ADecSpecInfo *cfg)
 
GF_Err gf_m4a_parse_config (GF_BitStream *bs, GF_M4ADecSpecInfo *cfg, Bool size_known)
 
GF_Err gf_m4a_parse_program_config_element (GF_BitStream *bs, GF_M4ADecSpecInfo *cfg)
 
GF_Err gf_m4a_write_program_config_element_bs (GF_BitStream *bs, GF_M4ADecSpecInfo *cfg)
 
const char * gf_m4a_object_type_name (u32 objectType)
 
const char * gf_m4a_get_profile_name (u8 audio_pl)
 
Bool gf_ac3_parser (u8 *buffer, u32 buffer_size, u32 *pos, GF_AC3Config *out_hdr, Bool full_parse)
 
Bool gf_ac3_parser_bs (GF_BitStream *bs, GF_AC3Config *hdr, Bool full_parse)
 
Bool gf_eac3_parser (u8 *buffer, u32 buffer_size, u32 *pos, GF_AC3Config *hdr, Bool full_parse)
 
Bool gf_eac3_parser_bs (GF_BitStream *bs, GF_AC3Config *hdr, Bool full_parse)
 
u32 gf_eac3_get_chan_loc_count (u32 chan_loc)
 
u64 gf_ac3_get_channel_layout (GF_AC3Config *ac3)
 
u32 gf_ac3_get_total_channels (u32 acmod)
 
u32 gf_ac3_get_surround_channels (u32 acmod)
 
u32 gf_ac3_get_bitrate (u32 brcode)
 
GF_Err gf_avc_get_sps_info (u8 *sps, u32 sps_size, u32 *sps_id, u32 *width, u32 *height, s32 *par_n, s32 *par_d)
 
GF_Err gf_avc_get_pps_info (u8 *pps, u32 pps_size, u32 *pps_id, u32 *sps_id)
 
GF_Err gf_hevc_get_sps_info (u8 *sps_data, u32 sps_size, u32 *sps_id, u32 *width, u32 *height, s32 *par_n, s32 *par_d)
 
GF_Err gf_vvc_get_sps_info (u8 *sps_data, u32 sps_size, u32 *sps_id, u32 *width, u32 *height, s32 *par_n, s32 *par_d)
 
const char * gf_vvc_get_profile_name (u8 video_prof)
 
const char * gf_avc_hevc_get_chroma_format_name (u8 chroma_format)
 
const char * gf_avc_get_profile_name (u8 profile_idc)
 
Bool gf_avcc_use_extensions (u8 profile_idc)
 
const char * gf_hevc_get_profile_name (u8 profile_idc)
 
void gf_img_parse (GF_BitStream *bs, u32 *codecid, u32 *width, u32 *height, u8 **dsi, u32 *dsi_len)
 
GF_Err gf_img_jpeg_dec (u8 *jpg, u32 jpg_size, u32 *width, u32 *height, u32 *pixel_format, u8 *dst, u32 *dst_size, u32 dst_nb_comp)
 
GF_Err gf_img_png_dec (u8 *png, u32 png_size, u32 *width, u32 *height, u32 *pixel_format, u8 *dst, u32 *dst_size)
 
GF_Err gf_img_png_enc (u8 *data, u32 width, u32 height, s32 stride, u32 pixel_format, u8 *dst, u32 *dst_size)
 
const char * gf_av1_get_obu_name (ObuType obu_type)
 

Variables

static const u32 GF_M4ASampleRates []
 
static const u32 GF_M4ANumChannels []
 

Detailed Description

>