All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libopenmpt.c File Reference
#include <libopenmpt/libopenmpt.h>
#include <libopenmpt/libopenmpt_stream_callbacks_file.h>
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  OpenMPTContext


#define OFFSET(x)   offsetof(OpenMPTContext, x)
#define add_meta(s, name, meta)
#define AUDIO_PKT_SIZE   2048


static void openmpt_logfunc (const char *message, void *userdata)
static int read_header_openmpt (AVFormatContext *s)
static int read_packet_openmpt (AVFormatContext *s, AVPacket *pkt)
static int read_close_openmpt (AVFormatContext *s)
static int read_seek_openmpt (AVFormatContext *s, int stream_idx, int64_t ts, int flags)


static const AVOption options []
static const AVClass class_openmpt
AVInputFormat ff_libopenmpt_demuxer

Macro Definition Documentation

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

Definition at line 42 of file libopenmpt.c.


Definition at line 43 of file libopenmpt.c.

Definition at line 44 of file libopenmpt.c.

#define add_meta (   s,
do { \
const char *value = meta; \
if (value && value[0]) \
av_dict_set(&s->metadata, name, value, 0); \
openmpt_free_string(value); \
} while(0)
const char * s
Definition: avisynth_c.h:768
GLsizei GLboolean const GLfloat * value
Definition: opengl_enc.c:109
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:70
if(ret< 0)
Definition: vf_mcdeint.c:279
const char * name
Definition: opengl_enc.c:103

Definition at line 63 of file libopenmpt.c.

Referenced by read_header_openmpt().

#define AUDIO_PKT_SIZE   2048

Definition at line 141 of file libopenmpt.c.

Referenced by read_packet_openmpt().

Function Documentation

static void openmpt_logfunc ( const char *  message,
void userdata 

Definition at line 54 of file libopenmpt.c.

Referenced by read_header_openmpt().

static int read_header_openmpt ( AVFormatContext s)

Definition at line 71 of file libopenmpt.c.

static int read_packet_openmpt ( AVFormatContext s,
AVPacket pkt 

Definition at line 143 of file libopenmpt.c.

static int read_close_openmpt ( AVFormatContext s)

Definition at line 180 of file libopenmpt.c.

static int read_seek_openmpt ( AVFormatContext s,
int  stream_idx,
int64_t  ts,
int  flags 

Definition at line 188 of file libopenmpt.c.

Variable Documentation

const AVOption options[]
Initial value:
= {
{ "sample_rate", "set sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, { .i64 = 48000 }, 1000, INT_MAX, A | D },
{ "layout", "set channel layout", OFFSET(layout), AV_OPT_TYPE_CHANNEL_LAYOUT, { .i64 = AV_CH_LAYOUT_STEREO }, 0, INT64_MAX, A | D },
{ "subsong", "set subsong", OFFSET(subsong), AV_OPT_TYPE_INT, { .i64 = -2 }, -2, INT_MAX, A | D, "subsong"},
{ "all", "all", 0, AV_OPT_TYPE_CONST, { .i64 = -1}, 0, 0, A | D, "subsong" },
{ "auto", "auto", 0, AV_OPT_TYPE_CONST, { .i64 = -2}, 0, 0, A | D, "subsong" },
{ NULL }
#define NULL
Definition: coverity.c:32
#define A
Definition: libopenmpt.c:43
#define OFFSET(x)
Definition: libopenmpt.c:42
#define D
Definition: libopenmpt.c:44
uint64_t layout

Definition at line 45 of file libopenmpt.c.

const AVClass class_openmpt
Initial value:
= {
.class_name = "libopenmpt",
.item_name = av_default_item_name,
.option = options,
Definition: version.h:86
static const AVOption options[]
Definition: libopenmpt.c:45

Definition at line 195 of file libopenmpt.c.

AVInputFormat ff_libopenmpt_demuxer
Initial value:
= {
.name = "libopenmpt",
.long_name = NULL_IF_CONFIG_SMALL("Tracker formats (libopenmpt)"),
.priv_data_size = sizeof(OpenMPTContext),
.priv_class = &class_openmpt,
.extensions = "669,amf,ams,dbm,digi,dmf,dsm,far,gdm,imf,it,j2b,m15,mdl,med,mmcmp,mms,mo3,mod,mptm,mt2,mtm,nst,okt,plm,ppm,psm,pt36,ptm,s3m,sfx,sfx2,stk,stm,ult,umx,wow,xm,xpk",
static int read_packet_openmpt(AVFormatContext *s, AVPacket *pkt)
Definition: libopenmpt.c:143
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:153
static int read_header_openmpt(AVFormatContext *s)
Definition: libopenmpt.c:71
static int read_close_openmpt(AVFormatContext *s)
Definition: libopenmpt.c:180
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
static const AVClass class_openmpt
Definition: libopenmpt.c:195
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:528
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
static int read_seek_openmpt(AVFormatContext *s, int stream_idx, int64_t ts, int flags)
Definition: libopenmpt.c:188

Definition at line 202 of file libopenmpt.c.