#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.
Definition in file libmodplug.c.
| #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 108 of file libmodplug.c.
Referenced by modplug_load_metadata().
| #define AUDIO_PKT_SIZE 512 |
Definition at line 161 of file libmodplug.c.
Referenced by modplug_read_header(), and modplug_read_packet().
| #define D AV_OPT_FLAG_DECODING_PARAM |
Definition at line 82 of file libmodplug.c.
| #define FF_MODPLUG_DEF_FILE_SIZE ( 5 * 1<<20) |
| #define FF_MODPLUG_MAX_FILE_SIZE (100 * 1<<20) |
Definition at line 78 of file libmodplug.c.
| #define OFFSET | ( | x | ) | offsetof(ModPlugContext, x) |
Definition at line 81 of file libmodplug.c.
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 262 of file libmodplug.c.
Referenced by modplug_read_packet().
| #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 101 of file libmodplug.c.
Referenced by modplug_read_header().
| enum var_name |
Definition at line 70 of file libmodplug.c.
| static int modplug_load_metadata | ( | AVFormatContext * | s | ) | [static] |
| static int modplug_read_close | ( | AVFormatContext * | s | ) | [static] |
Definition at line 333 of file libmodplug.c.
| static int modplug_read_header | ( | AVFormatContext * | s, | |
| AVFormatParameters * | ap | |||
| ) | [static] |
Definition at line 163 of file libmodplug.c.
| static int modplug_read_packet | ( | AVFormatContext * | s, | |
| AVPacket * | pkt | |||
| ) | [static] |
Definition at line 268 of file libmodplug.c.
| static int modplug_read_seek | ( | AVFormatContext * | s, | |
| int | stream_idx, | |||
| int64_t | ts, | |||
| int | flags | |||
| ) | [static] |
Definition at line 341 of file libmodplug.c.
| static void write_text | ( | uint8_t * | dst, | |
| const char * | s, | |||
| int | linesize, | |||
| int | x, | |||
| int | y | |||
| ) | [static] |
Definition at line 251 of file libmodplug.c.
Initial value:
{
.name = "libmodplug",
.long_name = NULL_IF_CONFIG_SMALL("ModPlug demuxer"),
.priv_data_size = sizeof(ModPlugContext),
.read_header = modplug_read_header,
.read_packet = modplug_read_packet,
.read_close = modplug_read_close,
.read_seek = modplug_read_seek,
.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",
.priv_class = &modplug_class,
}
Definition at line 357 of file libmodplug.c.
const AVClass modplug_class [static] |
Initial value:
{
.class_name = "ModPlug demuxer",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
}
Definition at line 350 of file libmodplug.c.
Initial value:
{
{"noise_reduction", "Enable noise reduction 0(off)-1(on)", OFFSET(noise_reduction), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, D},
{"reverb_depth", "Reverb level 0(quiet)-100(loud)", OFFSET(reverb_depth), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 100, D},
{"reverb_delay", "Reverb delay in ms, usually 40-200ms", OFFSET(reverb_delay), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, D},
{"bass_amount", "XBass level 0(quiet)-100(loud)", OFFSET(bass_amount), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 100, D},
{"bass_range", "XBass cutoff in Hz 10-100", OFFSET(bass_range), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 100, D},
{"surround_depth", "Surround level 0(quiet)-100(heavy)", OFFSET(surround_depth), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 100, D},
{"surround_delay", "Surround delay in ms, usually 5-40ms", OFFSET(surround_delay), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, D},
{"max_size", "Max file size supported (in bytes). Default is 5MB. Set to 0 for no limit (not recommended)",
OFFSET(max_size), AV_OPT_TYPE_INT, {.dbl = FF_MODPLUG_DEF_FILE_SIZE}, 0, FF_MODPLUG_MAX_FILE_SIZE, D},
{"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, {.dbl = 0}, 0, 1, D},
{"video_stream_w", "Video stream width in char (one char = 8x8px)", OFFSET(w), AV_OPT_TYPE_INT, {.dbl = 30}, 20, 512, D},
{"video_stream_h", "Video stream height in char (one char = 8x8px)", OFFSET(h), AV_OPT_TYPE_INT, {.dbl = 30}, 20, 512, D},
{"video_stream_ptxt", "Print speed, tempo, order, ... in video stream", OFFSET(print_textinfo), AV_OPT_TYPE_INT, {.dbl = 1}, 0, 1, D},
{NULL},
}
Definition at line 83 of file libmodplug.c.
const char* var_names[] [static] |
Initial value:
{
"x", "y",
"w", "h",
"t",
"speed", "tempo", "order", "pattern", "row",
NULL
}
Definition at line 62 of file libmodplug.c.
1.5.8