GPAC
Open Source Multimedia Framework. For more information, check out http://gpac.wp.mines-telecom.fr
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
media_import.c File Reference
#include <gpac/internal/media_dev.h>
#include <gpac/internal/avilib.h>
#include <gpac/internal/ogg.h>
#include <gpac/internal/vobsub.h>
#include <gpac/xml.h>
#include <gpac/mpegts.h>
#include <gpac/constants.h>
#include "mpeg2_ps.h"
#include <zlib.h>
+ Include dependency graph for media_import.c:

Data Structures

struct  ADTSHeader
 
struct  XMLBreaker
 
struct  GF_TSImport
 

Macros

#define ZLIB_COMPRESS_SAFE   4
 
#define NHML_SCAN_INT(_fmt, _value)
 
#define H263_CACHE_SIZE   4096
 
#define OGG_BUFFER_SIZE   4096
 

Functions

GF_Err gf_import_message (GF_MediaImporter *import, GF_Err e, char *format,...)
 
static GF_Err gf_media_update_par (GF_ISOFile *file, u32 track)
 
static void MP4T_RecomputeBitRate (GF_ISOFile *file, u32 track)
 
static void get_video_timing (Double fps, u32 *timescale, u32 *dts_inc)
 
static GF_Err gf_import_still_image (GF_MediaImporter *import, Bool mult_desc_allowed)
 
static GF_Err gf_import_afx_sc3dmc (GF_MediaImporter *import, Bool mult_desc_allowed)
 
GF_Err gf_import_mp3 (GF_MediaImporter *import)
 
static Bool ADTS_SyncFrame (GF_BitStream *bs, ADTSHeader *hdr, u32 *frame_skipped)
 
static Bool LOAS_LoadFrame (GF_BitStream *bs, GF_M4ADecSpecInfo *acfg, u32 *nb_bytes, u8 *buffer)
 
GF_Err gf_import_aac_loas (GF_MediaImporter *import)
 
GF_Err gf_import_aac_adts (GF_MediaImporter *import)
 
static GF_Err gf_import_cmp (GF_MediaImporter *import, Bool mpeg12)
 
static GF_Err gf_import_avi_video (GF_MediaImporter *import)
 
GF_Err gf_import_avi_audio (GF_MediaImporter *import)
 
GF_Err gf_import_isomedia (GF_MediaImporter *import)
 
GF_Err gf_import_mpeg_ps_video (GF_MediaImporter *import)
 
GF_Err gf_import_mpeg_ps_audio (GF_MediaImporter *import)
 
GF_Err gf_import_nhnt (GF_MediaImporter *import)
 
static void nhml_node_start (void *sax_cbck, const char *node_name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static void nhml_node_end (void *sax_cbck, const char *node_name, const char *name_space)
 
GF_Err gf_import_sample_from_xml (GF_MediaImporter *import, GF_ISOSample *samp, char *xml_file, char *xmlFrom, char *xmlTo, u32 *max_size)
 
static GF_Err compress_sample_data (GF_ISOSample *samp, u32 *max_size, char **dict, u32 offset)
 
static void nhml_on_progress (void *cbk, u64 done, u64 tot)
 
GF_Err gf_import_nhml_dims (GF_MediaImporter *import, Bool dims_doc)
 
GF_Err gf_import_amr_evrc_smv (GF_MediaImporter *import)
 
GF_Err gf_import_qcp (GF_MediaImporter *import)
 
Bool H263_IsStartCode (GF_BitStream *bs)
 
u32 H263_NextStartCode (GF_BitStream *bs)
 
static void h263_get_pic_size (GF_BitStream *bs, u32 fmt, u32 *w, u32 *h)
 
GF_Err gf_import_h263 (GF_MediaImporter *import)
 
GF_Err gf_media_avc_rewrite_samples (GF_ISOFile *file, u32 track, u32 prev_size, u32 new_size)
 
static GF_Err gf_import_avc_h264 (GF_MediaImporter *import)
 
static GF_HEVCParamArrayget_hevc_param_array (GF_HEVCConfig *hevc_cfg, u8 type)
 
static GF_Err gf_import_hevc (GF_MediaImporter *import)
 
Bool OGG_ReadPage (FILE *f_in, ogg_sync_state *oy, ogg_page *oggpage)
 
static u32 get_ogg_serial_no_for_stream (char *fileName, u32 stream_num, Bool is_video)
 
GF_Err gf_import_ogg_video (GF_MediaImporter *import)
 
GF_Err gf_import_ogg_audio (GF_MediaImporter *import)
 
GF_Err gf_import_raw_unit (GF_MediaImporter *import)
 
GF_Err gf_import_saf (GF_MediaImporter *import)
 
static void m2ts_set_track_mpeg4_probe_info (GF_M2TS_ES *es, GF_ESD *esd, struct __track_import_info *tk_info)
 
static void m2ts_set_tracks_mpeg4_probe_info (GF_MediaImporter *import, GF_M2TS_Program *prog, GF_List *ESDescriptors)
 
static void m2ts_set_track_mpeg4_creation_info (GF_MediaImporter *import, u32 *mtype, u32 *stype, u32 *oti)
 
static void m2ts_create_track (GF_TSImport *tsimp, u32 mtype, u32 stype, u32 oti, u32 mpeg4_es_id, Bool is_in_iod)
 
void m2ts_rewrite_avc_sample (GF_MediaImporter *import, GF_TSImport *tsimp)
 
static void hevc_cfg_add_nalu (GF_HEVCConfig *hevccfg, u8 nal_type, char *data, u32 data_len)
 
void on_m2ts_import_data (GF_M2TS_Demuxer *ts, u32 evt_type, void *par)
 
GF_Err gf_import_mpeg_ts (GF_MediaImporter *import)
 
GF_Err gf_import_vobsub (GF_MediaImporter *import)
 
GF_Err gf_import_ac3 (GF_MediaImporter *import)
 
GF_Err gf_media_import_chapters_file (GF_MediaImporter *import)
 
GF_Err gf_media_import_chapters (GF_ISOFile *file, char *chap_file, Double import_fps)
 
GF_Err gf_media_import (GF_MediaImporter *importer)
 

Variables

static const char * QCP_QCELP_GUID_1 = "\x41\x6D\x7F\x5E\x15\xB1\xD0\x11\xBA\x91\x00\x80\x5F\xB4\xB9\x7E"
 
static const char * QCP_QCELP_GUID_2 = "\x42\x6D\x7F\x5E\x15\xB1\xD0\x11\xBA\x91\x00\x80\x5F\xB4\xB9\x7E"
 
static const char * QCP_EVRC_GUID = "\x8D\xD4\x89\xE6\x76\x90\xB5\x46\x91\xEF\x73\x6A\x51\x00\xCE\xB4"
 
static const char * QCP_SMV_GUID = "\x75\x2B\x7C\x8D\x97\xA7\x46\xED\x98\x5E\xD5\x3C\x8C\xC7\x5F\x84"
 

Data Structure Documentation

struct ADTSHeader
+ Collaboration diagram for ADTSHeader:
Data Fields
Bool is_mp2
Bool no_crc
u32 profile
u32 sr_idx
u32 nb_ch
u32 frame_size
u32 hdr_size
struct XMLBreaker
+ Collaboration diagram for XMLBreaker:
Data Fields
Bool from_is_start
Bool from_is_end
Bool to_is_start
Bool to_is_end
u64 from_pos
u64 to_pos
char * from_id
char * to_id
GF_List * id_stack
GF_SAXParser * sax
struct GF_TSImport
+ Collaboration diagram for GF_TSImport:
Data Fields
GF_MediaImporter * import
u32 track
u32 nb_i
u32 nb_p
u32 nb_b
u64 last_dts
GF_AVCConfig * avccfg
AVCState avc
GF_HEVCConfig * hevccfg
HEVCState hevc
Bool force_next_au_start
Bool stream_setup
u32 nb_video
u32 nb_video_configured
u32 nb_audio
u32 nb_audio_configured

Macro Definition Documentation

#define ZLIB_COMPRESS_SAFE   4
#define NHML_SCAN_INT (   _fmt,
  _value 
)
Value:
{\
if (strstr(att->value, "0x")) { u32 __i; sscanf(att->value+2, "%x", &__i); _value = __i; }\
else if (strstr(att->value, "0X")) { u32 __i; sscanf(att->value+2, "%X", &__i); _value = __i; }\
else sscanf(att->value, _fmt, &_value); \
}\
uint32_t u32
Definition: setup.h:246
#define H263_CACHE_SIZE   4096
#define OGG_BUFFER_SIZE   4096

Function Documentation

GF_Err gf_import_message ( GF_MediaImporter import,
GF_Err  e,
char *  format,
  ... 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err gf_media_update_par ( GF_ISOFile *  file,
u32  track 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MP4T_RecomputeBitRate ( GF_ISOFile *  file,
u32  track 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void get_video_timing ( Double  fps,
u32 timescale,
u32 dts_inc 
)
static

+ Here is the caller graph for this function:

static GF_Err gf_import_still_image ( GF_MediaImporter import,
Bool  mult_desc_allowed 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err gf_import_afx_sc3dmc ( GF_MediaImporter import,
Bool  mult_desc_allowed 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_mp3 ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool ADTS_SyncFrame ( GF_BitStream *  bs,
ADTSHeader hdr,
u32 frame_skipped 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool LOAS_LoadFrame ( GF_BitStream *  bs,
GF_M4ADecSpecInfo acfg,
u32 nb_bytes,
u8 buffer 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_aac_loas ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_aac_adts ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err gf_import_cmp ( GF_MediaImporter import,
Bool  mpeg12 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err gf_import_avi_video ( GF_MediaImporter import)
static

! not tested

+ Here is the caller graph for this function:

GF_Err gf_import_avi_audio ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_isomedia ( GF_MediaImporter import)

+ Here is the caller graph for this function:

GF_Err gf_import_mpeg_ps_video ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_mpeg_ps_audio ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_nhnt ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nhml_node_start ( void *  sax_cbck,
const char *  node_name,
const char *  name_space,
const GF_XMLAttribute attributes,
u32  nb_attributes 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nhml_node_end ( void *  sax_cbck,
const char *  node_name,
const char *  name_space 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_sample_from_xml ( GF_MediaImporter import,
GF_ISOSample samp,
char *  xml_file,
char *  xmlFrom,
char *  xmlTo,
u32 max_size 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err compress_sample_data ( GF_ISOSample samp,
u32 max_size,
char **  dict,
u32  offset 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nhml_on_progress ( void *  cbk,
u64  done,
u64  tot 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_nhml_dims ( GF_MediaImporter import,
Bool  dims_doc 
)

+ Here is the caller graph for this function:

GF_Err gf_import_amr_evrc_smv ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_qcp ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool H263_IsStartCode ( GF_BitStream *  bs)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 H263_NextStartCode ( GF_BitStream *  bs)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void h263_get_pic_size ( GF_BitStream *  bs,
u32  fmt,
u32 w,
u32 h 
)
static

+ Here is the caller graph for this function:

GF_Err gf_import_h263 ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_media_avc_rewrite_samples ( GF_ISOFile *  file,
u32  track,
u32  prev_size,
u32  new_size 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static GF_Err gf_import_avc_h264 ( GF_MediaImporter import)
static

+ Here is the caller graph for this function:

static GF_HEVCParamArray* get_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:

static GF_Err gf_import_hevc ( GF_MediaImporter import)
static

+ Here is the caller graph for this function:

Bool OGG_ReadPage ( FILE *  f_in,
ogg_sync_state oy,
ogg_page oggpage 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 get_ogg_serial_no_for_stream ( char *  fileName,
u32  stream_num,
Bool  is_video 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_ogg_video ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_ogg_audio ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_raw_unit ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_saf ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void m2ts_set_track_mpeg4_probe_info ( GF_M2TS_ES *  es,
GF_ESD esd,
struct __track_import_info tk_info 
)
static

+ Here is the caller graph for this function:

static void m2ts_set_tracks_mpeg4_probe_info ( GF_MediaImporter import,
GF_M2TS_Program prog,
GF_List *  ESDescriptors 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void m2ts_set_track_mpeg4_creation_info ( GF_MediaImporter import,
u32 mtype,
u32 stype,
u32 oti 
)
static

+ Here is the caller graph for this function:

static void m2ts_create_track ( GF_TSImport tsimp,
u32  mtype,
u32  stype,
u32  oti,
u32  mpeg4_es_id,
Bool  is_in_iod 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void m2ts_rewrite_avc_sample ( GF_MediaImporter import,
GF_TSImport tsimp 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void hevc_cfg_add_nalu ( GF_HEVCConfig hevccfg,
u8  nal_type,
char *  data,
u32  data_len 
)
static

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void on_m2ts_import_data ( GF_M2TS_Demuxer *  ts,
u32  evt_type,
void *  par 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_mpeg_ts ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_vobsub ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_import_ac3 ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_media_import_chapters_file ( GF_MediaImporter import)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_media_import_chapters ( GF_ISOFile *  file,
char *  chap_file,
Double  import_fps 
)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GF_Err gf_media_import ( GF_MediaImporter importer)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const char* QCP_QCELP_GUID_1 = "\x41\x6D\x7F\x5E\x15\xB1\xD0\x11\xBA\x91\x00\x80\x5F\xB4\xB9\x7E"
static
const char* QCP_QCELP_GUID_2 = "\x42\x6D\x7F\x5E\x15\xB1\xD0\x11\xBA\x91\x00\x80\x5F\xB4\xB9\x7E"
static
const char* QCP_EVRC_GUID = "\x8D\xD4\x89\xE6\x76\x90\xB5\x46\x91\xEF\x73\x6A\x51\x00\xCE\xB4"
static
const char* QCP_SMV_GUID = "\x75\x2B\x7C\x8D\x97\xA7\x46\xED\x98\x5E\xD5\x3C\x8C\xC7\x5F\x84"
static