libgpac
Documentation of the core library of GPAC
Media Exporter

Media exporting and extraction. More...

+ Collaboration diagram for Media Exporter:

Data Structures

struct  __track_exporter
 

Enumerations

enum  {
  GF_EXPORT_NATIVE = 1, GF_EXPORT_RAW_SAMPLES = (1<<1), GF_EXPORT_NHNT = (1<<2), GF_EXPORT_REMUX = (1<<3),
  GF_EXPORT_MP4 = (1<<4), GF_EXPORT_UNUSED = (1<<4), GF_EXPORT_NHML = (1<<6), GF_EXPORT_SAF = (1<<7),
  GF_EXPORT_WEBVTT_META = (1<<8), GF_EXPORT_WEBVTT_META_EMBEDDED = (1<<9), GF_EXPORT_MERGE = (1<<10), GF_EXPORT_NO_FILE_EXT = (1 << 11),
  GF_EXPORT_USE_QCP = (1<<12), GF_EXPORT_NHML_FULL = (1<<13), GF_EXPORT_SVC_LAYER = (1<<14), GF_EXPORT_WEBVTT_NOMERGE = (1<<15),
  GF_EXPORT_SIX = (1<<16), GF_EXPORT_PROBE_ONLY = (1<<30), GF_EXPORT_DO_ABORT = 0x80000000
}
 

Functions

GF_Err gf_media_export (GF_MediaExporter *dump)
 
GF_Err gf_webvtt_dump_iso_track (GF_MediaExporter *dumper, u32 trackNumber, Bool merge, Bool box_dump)
 

Detailed Description

This section documents functions for media exporting and extraction.


Data Structure Documentation

◆ __track_exporter

struct __track_exporter

track dumper

Data Fields
GF_ISOFile * file

source ISOBMF file

u32 trackID

ID of track/PID/... to be dumped

u32 sample_num

sample number to export for GF_EXPORT_RAW_SAMPLES only

char * out_name

output name, if no extension set the extension will be added based on track type

u32 flags

dump type and flags

char * in_name

non-ISOBMF source file (AVI, TS)

FILE * dump_file

optional FILE for output

u32 print_stats_graph

filter session dump flags

u32 track_type

track type: 0: none specified, 1: video, 2: audio

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Track dumper formats and flags

Enumerator
GF_EXPORT_NATIVE 

track dumper types are formatted as flags for conveniency for authoring tools, but never used as a OR'ed set

GF_EXPORT_RAW_SAMPLES 

raw samples (including hint tracks for rtp)

GF_EXPORT_NHNT 

NHNT format (any MPEG-4 media)

GF_EXPORT_REMUX 

full remux of source file - equivalent to gpac -i in_name:FID=1 reframer:FID=2:SID=1 -o out_name:SID=2

GF_EXPORT_MP4 

MP4 (all except OD)

GF_EXPORT_UNUSED 

currently unused

GF_EXPORT_NHML 

NHML format (any media)

GF_EXPORT_SAF 

SAF format

GF_EXPORT_WEBVTT_META 

WebVTT metadata format (any media)

GF_EXPORT_WEBVTT_META_EMBEDDED 

WebVTT metadata format: media data will be embedded in webvtt

GF_EXPORT_MERGE 

following ones are real flags

for MP4 extraction, indicates track should be added to dest file if any for raw extraction, indicates data shall be appended at the end of output file if present

GF_EXPORT_NO_FILE_EXT 

don't infer file extension

GF_EXPORT_USE_QCP 

indicates QCP file format possible as well as native (EVRC and SMV audio only)

GF_EXPORT_NHML_FULL 

indicates full NHML dump

GF_EXPORT_SVC_LAYER 

exports a single svc layer

GF_EXPORT_WEBVTT_NOMERGE 

Don't merge identical cues in consecutive samples

GF_EXPORT_SIX 

Experimental Streaming Instructions

GF_EXPORT_PROBE_ONLY 

ony probes extraction format

Function Documentation

◆ gf_media_export()

GF_Err gf_media_export ( GF_MediaExporter *  dump)

Dumps a given media track

Parameters
dumpthe track dumper object
Returns
error if any

◆ gf_webvtt_dump_iso_track()

GF_Err gf_webvtt_dump_iso_track ( GF_MediaExporter *  dumper,
u32  trackNumber,
Bool  merge,
Bool  box_dump 
)

dumps a webvtt tracl to a given file

Parameters
dumpermedia dumper object
trackNumberthe target track to dump
mergeif GF_TRUE, merge vtt cues while dumping them
box_dumpif GF_TRUE, dumps box structures
Returns
error if any