FFmpeg
Data Structures | Macros | Functions | Variables
mpc.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "apetag.h"
#include "id3v1.h"
#include "libavutil/dict.h"

Go to the source code of this file.

Data Structures

struct  MPCFrame
 
struct  MPCContext
 

Macros

#define MPC_FRAMESIZE   1152
 
#define DELAY_FRAMES   32
 

Functions

static int mpc_probe (const AVProbeData *p)
 
static int mpc_read_header (AVFormatContext *s)
 
static int mpc_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int mpc_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 Seek to the given position If position is unknown but is within the limits of file then packets are skipped unless desired position is reached. More...
 

Variables

static const int mpc_rate [4] = { 44100, 48000, 37800, 32000 }
 
const FFInputFormat ff_mpc_demuxer
 

Macro Definition Documentation

◆ MPC_FRAMESIZE

#define MPC_FRAMESIZE   1152

Definition at line 32 of file mpc.c.

◆ DELAY_FRAMES

#define DELAY_FRAMES   32

Definition at line 33 of file mpc.c.

Function Documentation

◆ mpc_probe()

static int mpc_probe ( const AVProbeData p)
static

Definition at line 50 of file mpc.c.

◆ mpc_read_header()

static int mpc_read_header ( AVFormatContext s)
static

Definition at line 58 of file mpc.c.

◆ mpc_read_packet()

static int mpc_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 123 of file mpc.c.

◆ mpc_read_seek()

static int mpc_read_seek ( AVFormatContext s,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Seek to the given position If position is unknown but is within the limits of file then packets are skipped unless desired position is reached.

Also this function makes use of the fact that timestamp == frameno

Definition at line 188 of file mpc.c.

Variable Documentation

◆ mpc_rate

const int mpc_rate[4] = { 44100, 48000, 37800, 32000 }
static

Definition at line 35 of file mpc.c.

Referenced by mpc_read_header().

◆ ff_mpc_demuxer

const FFInputFormat ff_mpc_demuxer
Initial value:
= {
.p.name = "mpc",
.p.long_name = NULL_IF_CONFIG_SMALL("Musepack"),
.p.extensions = "mpc",
.priv_data_size = sizeof(MPCContext),
}

Definition at line 223 of file mpc.c.

mpc_read_packet
static int mpc_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mpc.c:123
MPCContext
Definition: mpc.h:54
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:151
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
mpc_read_header
static int mpc_read_header(AVFormatContext *s)
Definition: mpc.c:58
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:94
mpc_read_seek
static int mpc_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Seek to the given position If position is unknown but is within the limits of file then packets are s...
Definition: mpc.c:188
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
mpc_probe
static int mpc_probe(const AVProbeData *p)
Definition: mpc.c:50