FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
libmodplug.c File Reference
#include <libmodplug/modplug.h>
#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ModPlugContext
 

Macros

#define MODPLUG_STATIC
 
#define FF_MODPLUG_MAX_FILE_SIZE   (100 * 1<<20)
 
#define FF_MODPLUG_DEF_FILE_SIZE   ( 5 * 1<<20)
 
#define OFFSET(x)   offsetof(ModPlugContext, x)
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 
#define SET_OPT_IF_REQUESTED(libopt, opt, flag)
 
#define ADD_META_MULTIPLE_ENTRIES(entry_name, fname)
 
#define AUDIO_PKT_SIZE   512
 
#define PRINT_INFO(line, name, idvalue)
 

Enumerations

enum  var_name {
  VAR_CH, VAR_N, VAR_NB_IN_CHANNELS, VAR_NB_OUT_CHANNELS,
  VAR_T, VAR_S, VAR_VARS_NB, VAR_W,
  VAR_H, VAR_CW, VAR_CH, VAR_HSUB,
  VAR_VSUB, VARS_NB, VAR_VALUE1, VAR_VALUE2,
  VAR_VARS_NB, VAR_TB, VAR_PTS, VAR_START_PTS,
  VAR_PREV_PTS, VAR_PREV_SELECTED_PTS, VAR_T, VAR_START_T,
  VAR_PREV_T, VAR_PREV_SELECTED_T, VAR_PICT_TYPE, VAR_I,
  VAR_P, VAR_B, VAR_S, VAR_SI,
  VAR_SP, VAR_BI, VAR_PICT_TYPE_I, VAR_PICT_TYPE_P,
  VAR_PICT_TYPE_B, VAR_PICT_TYPE_S, VAR_PICT_TYPE_SI, VAR_PICT_TYPE_SP,
  VAR_PICT_TYPE_BI, VAR_INTERLACE_TYPE, VAR_INTERLACE_TYPE_P, VAR_INTERLACE_TYPE_T,
  VAR_INTERLACE_TYPE_B, VAR_CONSUMED_SAMPLES_N, VAR_SAMPLES_N, VAR_SAMPLE_RATE,
  VAR_N, VAR_SELECTED_N, VAR_PREV_SELECTED_N, VAR_KEY,
  VAR_POS, VAR_SCENE, VAR_CONCATDEC_SELECT, VAR_VARS_NB,
  VAR_PI, VAR_PHI, VAR_E, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_A,
  VAR_SAR, VAR_DAR, VAR_HSUB, VAR_VSUB,
  VAR_OHSUB, VAR_OVSUB, VARS_NB, VAR_FRAME_RATE,
  VAR_INTERLACED, VAR_N, VAR_NB_CONSUMED_SAMPLES, VAR_NB_SAMPLES,
  VAR_POS, VAR_PREV_INPTS, VAR_PREV_INT, VAR_PREV_OUTPTS,
  VAR_PREV_OUTT, VAR_PTS, VAR_SAMPLE_RATE, VAR_STARTPTS,
  VAR_STARTT, VAR_T, VAR_TB, VAR_RTCTIME,
  VAR_RTCSTART, VAR_S, VAR_SR, VAR_FR,
  VAR_VARS_NB, VAR_AVTB, VAR_INTB, VAR_SR,
  VAR_VARS_NB, VAR_W, VAR_H, VAR_A,
  VAR_DAR, VAR_SAR, VAR_HSUB, VAR_VSUB,
  VARS_NB, VAR_IN_W, VAR_IW, VAR_IN_H,
  VAR_IH, VAR_OUT_W, VAR_OW, VAR_OUT_H,
  VAR_OH, VAR_A, VAR_SAR, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VAR_X, VAR_Y,
  VAR_N, VAR_POS, VAR_T, VAR_VARS_NB,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VAR_IN_H,
  VAR_IH, VAR_IN_W, VAR_IW, VAR_SAR,
  VAR_X, VAR_Y, VAR_H, VAR_W,
  VAR_T, VAR_MAX, VARS_NB, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VAR_LINE_H, VAR_LH,
  VAR_MAIN_H, VAR_h, VAR_H, VAR_MAIN_W,
  VAR_w, VAR_W, VAR_MAX_GLYPH_A, VAR_ASCENT,
  VAR_MAX_GLYPH_D, VAR_DESCENT, VAR_MAX_GLYPH_H, VAR_MAX_GLYPH_W,
  VAR_N, VAR_SAR, VAR_T, VAR_TEXT_H,
  VAR_TH, VAR_TEXT_W, VAR_TW, VAR_X,
  VAR_Y, VAR_PICT_TYPE, VAR_PKT_POS, VAR_PKT_DURATION,
  VAR_PKT_SIZE, VAR_VARS_NB, VAR_N, VAR_POS,
  VAR_R, VAR_T, VAR_NB, VAR_N,
  VAR_PTS, VAR_R, VAR_T, VAR_TB,
  VAR_NB, VAR_W, VAR_H, VAR_VAL,
  VAR_MAXVAL, VAR_MINVAL, VAR_NEGVAL, VAR_CLIPVAL,
  VAR_VARS_NB, VAR_W, VAR_H, VAR_X,
  VAR_Y, VAR_BITDEPTHX, VAR_BITDEPTHY, VAR_VARS_NB,
  VAR_MAIN_W, VAR_MW, VAR_MAIN_H, VAR_MH,
  VAR_OVERLAY_W, VAR_OW, VAR_OVERLAY_H, VAR_OH,
  VAR_HSUB, VAR_VSUB, VAR_X, VAR_Y,
  VAR_N, VAR_POS, VAR_T, VAR_VARS_NB,
  VAR_MAIN_iW, VAR_MW, VAR_MAIN_iH, VAR_MH,
  VAR_OVERLAY_iW, VAR_OVERLAY_iH, VAR_OVERLAY_X, VAR_OX,
  VAR_OVERLAY_Y, VAR_OY, VAR_OVERLAY_W, VAR_OW,
  VAR_OVERLAY_H, VAR_OH, VAR_VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_X,
  VAR_Y, VAR_A, VAR_SAR, VAR_DAR,
  VAR_HSUB, VAR_VSUB, VARS_NB, VAR_W,
  VAR_H, VAR_VAL, VAR_YMIN, VAR_UMIN,
  VAR_VMIN, VAR_AMIN, VAR_YMAX, VAR_UMAX,
  VAR_VMAX, VAR_AMAX, VAR_VARS_NB, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_HSUB,
  VAR_VSUB, VAR_N, VAR_T, VAR_VARS_NB,
  VAR_PI, VAR_PHI, VAR_E, VAR_IN_W,
  VAR_IW, VAR_IN_H, VAR_IH, VAR_OUT_W,
  VAR_OW, VAR_OUT_H, VAR_OH, VAR_A,
  VAR_DAR, VAR_SAR, VARS_NB, VAR_W,
  VAR_H, VAR_N, VAR_PTS, VAR_R,
  VAR_T, VAR_TB, VAR_NB, VAR_iW,
  VAR_IN_W, VAR_iH, VAR_IN_H, VAR_oW,
  VAR_OUT_W, VAR_W, VAR_oH, VAR_OUT_H,
  VAR_H, CW, CH, CX,
  CY, VAR_VARS_NB, VAR_IN_W, VAR_IW,
  VAR_IN_H, VAR_IH, VAR_OUT_W, VAR_OW,
  VAR_OUT_H, VAR_OH, VAR_IN, VAR_ON,
  VAR_DURATION, VAR_PDURATION, VAR_TIME, VAR_FRAME,
  VAR_ZOOM, VAR_PZOOM, VAR_X, VAR_PX,
  VAR_Y, VAR_PY, VAR_A, VAR_SAR,
  VAR_DAR, VAR_HSUB, VAR_VSUB, VARS_NB,
  VAR_IN_W, VAR_IW, VAR_IN_H, VAR_IH,
  VAR_OUT_W, VAR_OW, VAR_OUT_H, VAR_OH,
  VAR_A, VAR_SAR, VAR_DAR, VAR_HSUB,
  VAR_VSUB, VAR_OHSUB, VAR_OVSUB, VARS_NB,
  VAR_X, VAR_Y, VAR_W, VAR_H,
  VAR_TIME, VAR_SPEED, VAR_TEMPO, VAR_ORDER,
  VAR_PATTERN, VAR_ROW, VAR_VARS_NB
}
 

Functions

static int modplug_load_metadata (AVFormatContext *s)
 
static int modplug_read_header (AVFormatContext *s)
 
static void write_text (uint8_t *dst, const char *s, int linesize, int x, int y)
 
static int modplug_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int modplug_read_close (AVFormatContext *s)
 
static int modplug_read_seek (AVFormatContext *s, int stream_idx, int64_t ts, int flags)
 
static int modplug_probe (const AVProbeData *p)
 

Variables

static const char *const var_names []
 
static const AVOption options []
 
static const char modplug_extensions [] = "669,abc,amf,ams,dbm,dmf,dsm,far,it,mdl,med,mid,mod,mt2,mtm,okt,psm,ptm,s3m,stm,ult,umx,xm,itgz,itr,itz,mdgz,mdr,mdz,s3gz,s3r,s3z,xmgz,xmr,xmz"
 
static const AVClass modplug_class
 
AVInputFormat ff_libmodplug_demuxer
 

Detailed Description

ModPlug demuxer

Todo:
better probing than extensions matching

Definition in file libmodplug.c.

Macro Definition Documentation

◆ MODPLUG_STATIC

#define MODPLUG_STATIC

Definition at line 25 of file libmodplug.c.

◆ FF_MODPLUG_MAX_FILE_SIZE

#define FF_MODPLUG_MAX_FILE_SIZE   (100 * 1<<20)

Definition at line 79 of file libmodplug.c.

◆ FF_MODPLUG_DEF_FILE_SIZE

#define FF_MODPLUG_DEF_FILE_SIZE   ( 5 * 1<<20)

Definition at line 80 of file libmodplug.c.

◆ OFFSET

#define OFFSET (   x)    offsetof(ModPlugContext, x)

Definition at line 82 of file libmodplug.c.

◆ D

Definition at line 83 of file libmodplug.c.

◆ SET_OPT_IF_REQUESTED

#define SET_OPT_IF_REQUESTED (   libopt,
  opt,
  flag 
)
Value:
do { \
if (modplug->opt) { \
settings.libopt = modplug->opt; \
settings.mFlags |= flag; \
} \
} while (0)

Definition at line 102 of file libmodplug.c.

◆ ADD_META_MULTIPLE_ENTRIES

#define ADD_META_MULTIPLE_ENTRIES (   entry_name,
  fname 
)
Value:
do { \
if (n_## entry_name ##s) { \
unsigned i, n = 0; \
for (i = 0; i < n_## entry_name ##s; i++) { \
char item_name[64] = {0}; \
fname(f, i, item_name); \
if (!*item_name) \
continue; \
if (n) \
av_dict_set(&s->metadata, #entry_name, "\n", AV_DICT_APPEND); \
av_dict_set(&s->metadata, #entry_name, item_name, AV_DICT_APPEND); \
n++; \
} \
\
extra = av_asprintf(", %u/%u " #entry_name "%s", \
n, n_## entry_name ##s, n > 1 ? "s" : ""); \
if (!extra) \
return AVERROR(ENOMEM); \
av_dict_set(&s->metadata, "extra info", extra, AV_DICT_APPEND); \
av_free(extra); \
} \
} while (0)

Definition at line 109 of file libmodplug.c.

◆ AUDIO_PKT_SIZE

#define AUDIO_PKT_SIZE   512

Definition at line 162 of file libmodplug.c.

◆ PRINT_INFO

#define PRINT_INFO (   line,
  name,
  idvalue 
)
Value:
do { \
snprintf(intbuf, sizeof(intbuf), "%.0f", var_values[idvalue]); \
write_text(pkt->data, name ":", modplug->linesize, 0+1, line+1); \
write_text(pkt->data, intbuf, modplug->linesize, 10+1, line+1); \
} while (0)

Definition at line 263 of file libmodplug.c.

Enumeration Type Documentation

◆ var_name

enum var_name
Enumerator
VAR_CH 
VAR_N 
VAR_NB_IN_CHANNELS 
VAR_NB_OUT_CHANNELS 
VAR_T 
VAR_S 
VAR_VARS_NB 
VAR_W 
VAR_H 
VAR_CW 
VAR_CH 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_VALUE1 
VAR_VALUE2 
VAR_VARS_NB 
VAR_TB 
VAR_PTS 
VAR_START_PTS 
VAR_PREV_PTS 
VAR_PREV_SELECTED_PTS 
VAR_T 
VAR_START_T 
VAR_PREV_T 
VAR_PREV_SELECTED_T 
VAR_PICT_TYPE 
VAR_I 
VAR_P 
VAR_B 
VAR_S 
VAR_SI 
VAR_SP 
VAR_BI 
VAR_PICT_TYPE_I 
VAR_PICT_TYPE_P 
VAR_PICT_TYPE_B 
VAR_PICT_TYPE_S 
VAR_PICT_TYPE_SI 
VAR_PICT_TYPE_SP 
VAR_PICT_TYPE_BI 
VAR_INTERLACE_TYPE 
VAR_INTERLACE_TYPE_P 
VAR_INTERLACE_TYPE_T 
VAR_INTERLACE_TYPE_B 
VAR_CONSUMED_SAMPLES_N 
VAR_SAMPLES_N 
VAR_SAMPLE_RATE 
VAR_N 
VAR_SELECTED_N 
VAR_PREV_SELECTED_N 
VAR_KEY 
VAR_POS 
VAR_SCENE 
VAR_CONCATDEC_SELECT 
VAR_VARS_NB 
VAR_PI 
VAR_PHI 
VAR_E 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
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R_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_A 
VAR_DAR 
VAR_SAR 
VARS_NB 
VAR_W 
VAR_H 
VAR_N 
VAR_PTS 
VAR_R 
VAR_T 
VAR_TB 
VAR_NB 
VAR_iW 
VAR_IN_W 
VAR_iH 
VAR_IN_H 
VAR_oW 
VAR_OUT_W 
VAR_W 
VAR_oH 
VAR_OUT_H 
VAR_H 
CW 
CH 
CX 
CY 
VAR_VARS_NB 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_IN 
VAR_ON 
VAR_DURATION 
VAR_PDURATION 
VAR_TIME 
VAR_FRAME 
VAR_ZOOM 
VAR_PZOOM 
VAR_X 
VAR_PX 
VAR_Y 
VAR_PY 
VAR_A 
VAR_SAR 
VAR_DAR 
VAR_HSUB 
VAR_VSUB 
VARS_NB 
VAR_IN_W 
VAR_IW 
VAR_IN_H 
VAR_IH 
VAR_OUT_W 
VAR_OW 
VAR_OUT_H 
VAR_OH 
VAR_A 
VAR_SAR 
VAR_DAR 
VAR_HSUB 
VAR_VSUB 
VAR_OHSUB 
VAR_OVSUB 
VARS_NB 
VAR_X 
VAR_Y 
VAR_W 
VAR_H 
VAR_TIME 
VAR_SPEED 
VAR_TEMPO 
VAR_ORDER 
VAR_PATTERN 
VAR_ROW 
VAR_VARS_NB 

Definition at line 71 of file libmodplug.c.

Function Documentation

◆ modplug_load_metadata()

static int modplug_load_metadata ( AVFormatContext s)
static

Definition at line 133 of file libmodplug.c.

Referenced by modplug_read_header().

◆ modplug_read_header()

static int modplug_read_header ( AVFormatContext s)
static

Definition at line 164 of file libmodplug.c.

◆ write_text()

static void write_text ( uint8_t dst,
const char *  s,
int  linesize,
int  x,
int  y 
)
static

Definition at line 252 of file libmodplug.c.

◆ modplug_read_packet()

static int modplug_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 269 of file libmodplug.c.

◆ modplug_read_close()

static int modplug_read_close ( AVFormatContext s)
static

Definition at line 334 of file libmodplug.c.

◆ modplug_read_seek()

static int modplug_read_seek ( AVFormatContext s,
int  stream_idx,
int64_t  ts,
int  flags 
)
static

Definition at line 342 of file libmodplug.c.

◆ modplug_probe()

static int modplug_probe ( const AVProbeData p)
static

Definition at line 353 of file libmodplug.c.

Variable Documentation

◆ var_names

const char* const var_names[]
static
Initial value:
= {
"x", "y",
"w", "h",
"t",
"speed", "tempo", "order", "pattern", "row",
}

Definition at line 63 of file libmodplug.c.

Referenced by modplug_read_header().

◆ options

const AVOption options[]
static
Initial value:
= {
{"noise_reduction", "Enable noise reduction 0(off)-1(on)", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D},
{"reverb_depth", "Reverb level 0(quiet)-100(loud)", OFFSET(reverb_depth), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 100, D},
{"reverb_delay", "Reverb delay in ms, usually 40-200ms", OFFSET(reverb_delay), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, D},
{"bass_amount", "XBass level 0(quiet)-100(loud)", OFFSET(bass_amount), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 100, D},
{"bass_range", "XBass cutoff in Hz 10-100", OFFSET(bass_range), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 100, D},
{"surround_depth", "Surround level 0(quiet)-100(heavy)", OFFSET(surround_depth), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 100, D},
{"surround_delay", "Surround delay in ms, usually 5-40ms", OFFSET(surround_delay), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, D},
{"max_size", "Max file size supported (in bytes). Default is 5MB. Set to 0 for no limit (not recommended)",
{"video_stream_expr", "Color formula", OFFSET(color_eval), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D},
{"video_stream", "Make demuxer output a video stream", OFFSET(video_stream), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D},
{"video_stream_w", "Video stream width in char (one char = 8x8px)", OFFSET(w), AV_OPT_TYPE_INT, {.i64 = 30}, 20, 512, D},
{"video_stream_h", "Video stream height in char (one char = 8x8px)", OFFSET(h), AV_OPT_TYPE_INT, {.i64 = 30}, 20, 512, D},
{"video_stream_ptxt", "Print speed, tempo, order, ... in video stream", OFFSET(print_textinfo), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, D},
{NULL},
}

Definition at line 84 of file libmodplug.c.

◆ modplug_extensions

const char modplug_extensions[] = "669,abc,amf,ams,dbm,dmf,dsm,far,it,mdl,med,mid,mod,mt2,mtm,okt,psm,ptm,s3m,stm,ult,umx,xm,itgz,itr,itz,mdgz,mdr,mdz,s3gz,s3r,s3z,xmgz,xmr,xmz"
static

Definition at line 351 of file libmodplug.c.

Referenced by modplug_probe().

◆ modplug_class

const AVClass modplug_class
static
Initial value:
= {
.class_name = "ModPlug demuxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 364 of file libmodplug.c.

◆ ff_libmodplug_demuxer

AVInputFormat ff_libmodplug_demuxer
Initial value:
= {
.name = "libmodplug",
.long_name = NULL_IF_CONFIG_SMALL("ModPlug demuxer"),
.priv_data_size = sizeof(ModPlugContext),
.extensions = modplug_extensions,
.priv_class = &modplug_class,
}

Definition at line 371 of file libmodplug.c.

item_name
item_name
Definition: libkvazaar.c:290
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
options
static const AVOption options[]
Definition: libmodplug.c:84
n
int n
Definition: avisynth_c.h:760
av_asprintf
char * av_asprintf(const char *fmt,...)
Definition: avstring.c:113
w
uint8_t w
Definition: llviddspenc.c:38
name
const char * name
Definition: avisynth_c.h:867
AVPacket::data
uint8_t * data
Definition: avcodec.h:1477
AV_DICT_APPEND
#define AV_DICT_APPEND
If the entry already exists, append to it.
Definition: dict.h:77
modplug_read_packet
static int modplug_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: libmodplug.c:269
modplug_probe
static int modplug_probe(const AVProbeData *p)
Definition: libmodplug.c:353
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
modplug_read_close
static int modplug_read_close(AVFormatContext *s)
Definition: libmodplug.c:334
D
#define D
Definition: libmodplug.c:83
s
#define s(width, name)
Definition: cbs_vp9.c:257
f
#define f(width, name)
Definition: cbs_vp9.c:255
OFFSET
#define OFFSET(x)
Definition: libmodplug.c:82
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:530
NULL
#define NULL
Definition: coverity.c:32
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
modplug_read_seek
static int modplug_read_seek(AVFormatContext *s, int stream_idx, int64_t ts, int flags)
Definition: libmodplug.c:342
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:191
FF_MODPLUG_DEF_FILE_SIZE
#define FF_MODPLUG_DEF_FILE_SIZE
Definition: libmodplug.c:80
for
for(j=16;j >0;--j)
Definition: h264pred_template.c:469
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
line
Definition: graph2dot.c:48
flag
#define flag(name)
Definition: cbs_av1.c:557
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259
modplug_class
static const AVClass modplug_class
Definition: libmodplug.c:364
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
video_stream
static AVStream * video_stream
Definition: demuxing_decoding.c:41
pkt
static AVPacket pkt
Definition: demuxing_decoding.c:54
modplug_read_header
static int modplug_read_header(AVFormatContext *s)
Definition: libmodplug.c:164
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
modplug_extensions
static const char modplug_extensions[]
Definition: libmodplug.c:351
FF_MODPLUG_MAX_FILE_SIZE
#define FF_MODPLUG_MAX_FILE_SIZE
Definition: libmodplug.c:79
h
h
Definition: vp9dsp_template.c:2038
ModPlugContext
Definition: libmodplug.c:33
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:227