libgpac
Documentation of the core library of GPAC
ff_common.h File Reference
#include <gpac/filters.h>
#include <gpac/list.h>
#include <gpac/constants.h>
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/opt.h>
#include <libavutil/pixdesc.h>
#include <libavutil/dict.h>
#include <libavdevice/avdevice.h>
#include <libswscale/swscale.h>
#include <libavutil/channel_layout.h>
+ Include dependency graph for ff_common.h:

Macros

#define JPEGLIB_H
 
#define AVFMT_URL(_mux)   _mux->filename
 
#define FF_FREE_PCK(_pkt)   av_free_packet(_pkt);
 
#define FF_RELEASE_PCK(_pkt)
 
#define FF_INIT_PCK(ctx, _pkt)   { pkt = &ctx->pkt; av_init_packet(pkt); }
 
#define FF_OFMT_CAST   (AVOutputFormat *)
 
#define FF_IFMT_CAST   (AVInputFormat *)
 

Enumerations

enum  {
  FF_REG_TYPE_DEMUX =0 , FF_REG_TYPE_DECODE , FF_REG_TYPE_DEV_IN , FF_REG_TYPE_ENCODE ,
  FF_REG_TYPE_MUX , FF_REG_TYPE_AVF
}
 

Functions

GF_FilterArgs ffmpeg_arg_translate (const struct AVOption *opt)
 
void ffmpeg_setup_logs (u32 log_class)
 
GF_FilterRegister * ffmpeg_build_register (GF_FilterSession *session, GF_FilterRegister *orig_reg, const GF_FilterArgs *default_args, u32 nb_def_args, u32 reg_type)
 
enum AVPixelFormat ffmpeg_pixfmt_from_gpac (u32 pfmt, Bool no_warn)
 
u32 ffmpeg_pixfmt_to_gpac (enum AVPixelFormat pfmt, Bool no_warn)
 
u32 ffmpeg_pixfmt_from_codec_tag (u32 codec_tag, Bool *is_full_range)
 
Bool ffmpeg_pixfmt_is_fullrange (u32 pfmt)
 
u32 ffmpeg_audio_fmt_from_gpac (u32 sfmt)
 
u32 ffmpeg_audio_fmt_to_gpac (u32 sfmt)
 
u32 ffmpeg_codecid_from_gpac (u32 codec_id, u32 *ff_codectag)
 
u32 ffmpeg_codecid_to_gpac (u32 codec_id)
 
u32 ffmpeg_codecid_to_gpac_audio_fmt (u32 codec_id)
 
u32 ffmpeg_stream_type_from_gpac (u32 streamtype)
 
u32 ffmpeg_stream_type_to_gpac (u32 streamtype)
 
void ffmpeg_set_enc_dec_flags (const AVDictionary *options, AVCodecContext *ctx)
 
void ffmpeg_set_mx_dmx_flags (const AVDictionary *options, AVFormatContext *ctx)
 
u64 ffmpeg_channel_layout_from_gpac (u64 gpac_ch_layout)
 
u64 ffmpeg_channel_layout_to_gpac (u64 ff_ch_layout)
 
void ffmpeg_report_options (GF_Filter *filter, AVDictionary *unknown_options, AVDictionary *all_options)
 
void ffmpeg_register_set_dyn_help (GF_FilterRegister *reg)
 
GF_Err ffmpeg_extradata_from_gpac (u32 gpac_codec_id, const u8 *dsi_in, u32 dsi_in_size, u8 **dsi_out, u32 *dsi_out_size)
 
GF_Err ffmpeg_extradata_to_gpac (u32 gpac_codec_id, const u8 *data, u32 size, u8 **dsi_out, u32 *dsi_out_size)
 
void ffmpeg_tags_from_gpac (GF_FilterPid *pid, AVDictionary **metadata)
 
void ffmpeg_tags_to_gpac (AVDictionary *metadata, GF_FilterPid *pid)
 
void ffmpeg_generate_gpac_dsi (GF_FilterPid *out_pid, u32 gpac_codec_id, u32 color_primaries, u32 transfer_characteristics, u32 colorspace, const u8 *data, u32 size)
 
GF_Err ffmpeg_update_arg (const char *log_name, void *ctx, AVDictionary **options, const char *arg_name, const GF_PropertyValue *arg_val)
 
void ffmpeg_check_threads (GF_Filter *filter, AVDictionary *options, AVCodecContext *codecctx)
 

Macro Definition Documentation

◆ JPEGLIB_H

#define JPEGLIB_H

◆ AVFMT_URL

#define AVFMT_URL (   _mux)    _mux->filename

◆ FF_FREE_PCK

#define FF_FREE_PCK (   _pkt)    av_free_packet(_pkt);

◆ FF_RELEASE_PCK

#define FF_RELEASE_PCK (   _pkt)

◆ FF_INIT_PCK

#define FF_INIT_PCK (   ctx,
  _pkt 
)    { pkt = &ctx->pkt; av_init_packet(pkt); }

◆ FF_OFMT_CAST

#define FF_OFMT_CAST   (AVOutputFormat *)

◆ FF_IFMT_CAST

#define FF_IFMT_CAST   (AVInputFormat *)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FF_REG_TYPE_DEMUX 
FF_REG_TYPE_DECODE 
FF_REG_TYPE_DEV_IN 
FF_REG_TYPE_ENCODE 
FF_REG_TYPE_MUX 
FF_REG_TYPE_AVF 

Function Documentation

◆ ffmpeg_arg_translate()

GF_FilterArgs ffmpeg_arg_translate ( const struct AVOption *  opt)

◆ ffmpeg_setup_logs()

void ffmpeg_setup_logs ( u32  log_class)

◆ ffmpeg_build_register()

GF_FilterRegister* ffmpeg_build_register ( GF_FilterSession *  session,
GF_FilterRegister *  orig_reg,
const GF_FilterArgs default_args,
u32  nb_def_args,
u32  reg_type 
)

◆ ffmpeg_pixfmt_from_gpac()

enum AVPixelFormat ffmpeg_pixfmt_from_gpac ( u32  pfmt,
Bool  no_warn 
)

◆ ffmpeg_pixfmt_to_gpac()

u32 ffmpeg_pixfmt_to_gpac ( enum AVPixelFormat  pfmt,
Bool  no_warn 
)

◆ ffmpeg_pixfmt_from_codec_tag()

u32 ffmpeg_pixfmt_from_codec_tag ( u32  codec_tag,
Bool is_full_range 
)

◆ ffmpeg_pixfmt_is_fullrange()

Bool ffmpeg_pixfmt_is_fullrange ( u32  pfmt)

◆ ffmpeg_audio_fmt_from_gpac()

u32 ffmpeg_audio_fmt_from_gpac ( u32  sfmt)

◆ ffmpeg_audio_fmt_to_gpac()

u32 ffmpeg_audio_fmt_to_gpac ( u32  sfmt)

◆ ffmpeg_codecid_from_gpac()

u32 ffmpeg_codecid_from_gpac ( u32  codec_id,
u32 ff_codectag 
)

◆ ffmpeg_codecid_to_gpac()

u32 ffmpeg_codecid_to_gpac ( u32  codec_id)

◆ ffmpeg_codecid_to_gpac_audio_fmt()

u32 ffmpeg_codecid_to_gpac_audio_fmt ( u32  codec_id)

◆ ffmpeg_stream_type_from_gpac()

u32 ffmpeg_stream_type_from_gpac ( u32  streamtype)

◆ ffmpeg_stream_type_to_gpac()

u32 ffmpeg_stream_type_to_gpac ( u32  streamtype)

◆ ffmpeg_set_enc_dec_flags()

void ffmpeg_set_enc_dec_flags ( const AVDictionary *  options,
AVCodecContext *  ctx 
)

◆ ffmpeg_set_mx_dmx_flags()

void ffmpeg_set_mx_dmx_flags ( const AVDictionary *  options,
AVFormatContext *  ctx 
)

◆ ffmpeg_channel_layout_from_gpac()

u64 ffmpeg_channel_layout_from_gpac ( u64  gpac_ch_layout)

◆ ffmpeg_channel_layout_to_gpac()

u64 ffmpeg_channel_layout_to_gpac ( u64  ff_ch_layout)

◆ ffmpeg_report_options()

void ffmpeg_report_options ( GF_Filter *  filter,
AVDictionary *  unknown_options,
AVDictionary *  all_options 
)

◆ ffmpeg_register_set_dyn_help()

void ffmpeg_register_set_dyn_help ( GF_FilterRegister *  reg)

◆ ffmpeg_extradata_from_gpac()

GF_Err ffmpeg_extradata_from_gpac ( u32  gpac_codec_id,
const u8 dsi_in,
u32  dsi_in_size,
u8 **  dsi_out,
u32 dsi_out_size 
)

◆ ffmpeg_extradata_to_gpac()

GF_Err ffmpeg_extradata_to_gpac ( u32  gpac_codec_id,
const u8 data,
u32  size,
u8 **  dsi_out,
u32 dsi_out_size 
)

◆ ffmpeg_tags_from_gpac()

void ffmpeg_tags_from_gpac ( GF_FilterPid *  pid,
AVDictionary **  metadata 
)

◆ ffmpeg_tags_to_gpac()

void ffmpeg_tags_to_gpac ( AVDictionary *  metadata,
GF_FilterPid *  pid 
)

◆ ffmpeg_generate_gpac_dsi()

void ffmpeg_generate_gpac_dsi ( GF_FilterPid *  out_pid,
u32  gpac_codec_id,
u32  color_primaries,
u32  transfer_characteristics,
u32  colorspace,
const u8 data,
u32  size 
)

◆ ffmpeg_update_arg()

GF_Err ffmpeg_update_arg ( const char *  log_name,
void *  ctx,
AVDictionary **  options,
const char *  arg_name,
const GF_PropertyValue *  arg_val 
)

◆ ffmpeg_check_threads()

void ffmpeg_check_threads ( GF_Filter *  filter,
AVDictionary *  options,
AVCodecContext *  codecctx 
)