FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
libgme.c File Reference

libgme demuxer More...

#include <gme/gme.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  GMEContext
 

Macros

#define OFFSET(x)   offsetof(GMEContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 
#define AUDIO_PKT_SIZE   512
 

Functions

static void add_meta (AVFormatContext *s, const char *name, const char *value)
 
static int load_metadata (AVFormatContext *s)
 
static int read_header_gme (AVFormatContext *s)
 
static int read_packet_gme (AVFormatContext *s, AVPacket *pkt)
 
static int read_close_gme (AVFormatContext *s)
 
static int read_seek_gme (AVFormatContext *s, int stream_idx, int64_t ts, int flags)
 
static int probe_gme (AVProbeData *p)
 

Variables

static const AVOption options []
 
static const AVClass class_gme
 
AVInputFormat ff_libgme_demuxer
 

Detailed Description

libgme demuxer

Definition in file libgme.c.

Macro Definition Documentation

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

Definition at line 42 of file libgme.c.

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 43 of file libgme.c.

Definition at line 44 of file libgme.c.

#define AUDIO_PKT_SIZE   512

Definition at line 78 of file libgme.c.

Referenced by read_packet_gme().

Function Documentation

static void add_meta ( AVFormatContext s,
const char *  name,
const char *  value 
)
static

Definition at line 52 of file libgme.c.

Referenced by load_metadata().

static int load_metadata ( AVFormatContext s)
static

Definition at line 58 of file libgme.c.

Referenced by read_header_gme().

static int read_header_gme ( AVFormatContext s)
static

Definition at line 80 of file libgme.c.

static int read_packet_gme ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 137 of file libgme.c.

static int read_close_gme ( AVFormatContext s)
static

Definition at line 156 of file libgme.c.

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

Definition at line 164 of file libgme.c.

static int probe_gme ( AVProbeData p)
static

Definition at line 172 of file libgme.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{"track_index", "set track that should be played", OFFSET(track_index), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, A|D},
{"sample_rate", "set sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 44100}, 1000, 999999, A|D},
{"max_size", "set max file size supported (in bytes)", OFFSET(max_size), AV_OPT_TYPE_INT64, {.i64 = 50 * 1024 * 1024}, 0, SIZE_MAX, A|D},
{NULL}
}

Definition at line 45 of file libgme.c.

const AVClass class_gme
static
Initial value:
= {
.class_name = "Game Music Emu demuxer",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 184 of file libgme.c.

AVInputFormat ff_libgme_demuxer
Initial value:
= {
.name = "libgme",
.long_name = NULL_IF_CONFIG_SMALL("Game Music Emu demuxer"),
.priv_data_size = sizeof(GMEContext),
.priv_class = &class_gme,
}

Definition at line 191 of file libgme.c.