FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
mpc8.c File Reference
#include "libavutil/mem.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/unary.h"
#include "apetag.h"
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "avio_internal.h"

Go to the source code of this file.

Data Structures

struct  MPCContext
 

Macros

#define MKMPCTAG(a, b)   ((a) | ((b) << 8))
 Two-byte MPC tag. More...
 
#define TAG_MPCK   MKTAG('M','P','C','K')
 

Enumerations

enum  MPCPacketTags {
  TAG_STREAMHDR = MKMPCTAG('S','H'), TAG_STREAMEND = MKMPCTAG('S','E'), TAG_AUDIOPACKET = MKMPCTAG('A','P'), TAG_SEEKTBLOFF = MKMPCTAG('S','O'),
  TAG_SEEKTABLE = MKMPCTAG('S','T'), TAG_REPLAYGAIN = MKMPCTAG('R','G'), TAG_ENCINFO = MKMPCTAG('E','I')
}
 Reserved MPC tags. More...
 

Functions

static int64_t bs_get_v (const uint8_t **bs)
 
static int mpc8_probe (const AVProbeData *p)
 
static int64_t gb_get_v (GetBitContext *gb)
 
static void mpc8_get_chunk_header (AVIOContext *pb, int *tag, int64_t *size)
 
static int mpc8_parse_seektable (AVFormatContext *s, int64_t off)
 
static int mpc8_handle_chunk (AVFormatContext *s, int tag, int64_t chunk_pos, int64_t size)
 
static int mpc8_read_header (AVFormatContext *s)
 
static int mpc8_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int mpc8_read_seek (AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
 

Variables

static const int mpc8_rate [8] = { 44100, 48000, 37800, 32000, -1, -1, -1, -1 }
 
const FFInputFormat ff_mpc8_demuxer
 

Macro Definition Documentation

◆ MKMPCTAG

#define MKMPCTAG (   a,
  b 
)    ((a) | ((b) << 8))

Two-byte MPC tag.

Definition at line 32 of file mpc8.c.

◆ TAG_MPCK

#define TAG_MPCK   MKTAG('M','P','C','K')

Definition at line 34 of file mpc8.c.

Enumeration Type Documentation

◆ MPCPacketTags

Reserved MPC tags.

Enumerator
TAG_STREAMHDR 
TAG_STREAMEND 
TAG_AUDIOPACKET 
TAG_SEEKTBLOFF 
TAG_SEEKTABLE 
TAG_REPLAYGAIN 
TAG_ENCINFO 

Definition at line 37 of file mpc8.c.

Function Documentation

◆ bs_get_v()

static int64_t bs_get_v ( const uint8_t **  bs)
inlinestatic

Definition at line 60 of file mpc8.c.

Referenced by mpc8_probe().

◆ mpc8_probe()

static int mpc8_probe ( const AVProbeData p)
static

Definition at line 78 of file mpc8.c.

◆ gb_get_v()

static int64_t gb_get_v ( GetBitContext gb)
inlinestatic

Definition at line 111 of file mpc8.c.

Referenced by mpc8_parse_seektable().

◆ mpc8_get_chunk_header()

static void mpc8_get_chunk_header ( AVIOContext pb,
int *  tag,
int64_t size 
)
static

Definition at line 126 of file mpc8.c.

Referenced by mpc8_parse_seektable(), mpc8_read_header(), and mpc8_read_packet().

◆ mpc8_parse_seektable()

static int mpc8_parse_seektable ( AVFormatContext s,
int64_t  off 
)
static

Definition at line 139 of file mpc8.c.

Referenced by mpc8_handle_chunk().

◆ mpc8_handle_chunk()

static int mpc8_handle_chunk ( AVFormatContext s,
int  tag,
int64_t  chunk_pos,
int64_t  size 
)
static

Definition at line 213 of file mpc8.c.

Referenced by mpc8_read_header(), and mpc8_read_packet().

◆ mpc8_read_header()

static int mpc8_read_header ( AVFormatContext s)
static

Definition at line 237 of file mpc8.c.

◆ mpc8_read_packet()

static int mpc8_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 308 of file mpc8.c.

◆ mpc8_read_seek()

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

Definition at line 338 of file mpc8.c.

Variable Documentation

◆ mpc8_rate

const int mpc8_rate[8] = { 44100, 48000, 37800, 32000, -1, -1, -1, -1 }
static

Definition at line 50 of file mpc8.c.

Referenced by mpc8_read_header().

◆ ff_mpc8_demuxer

const FFInputFormat ff_mpc8_demuxer
Initial value:
= {
.p.name = "mpc8",
.p.long_name = NULL_IF_CONFIG_SMALL("Musepack SV8"),
.priv_data_size = sizeof(MPCContext),
}

Definition at line 352 of file mpc8.c.

mpc8_read_seek
static int mpc8_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
Definition: mpc8.c:338
MPCContext
Definition: mpc.h:54
mpc8_read_packet
static int mpc8_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: mpc8.c:308
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
mpc8_read_header
static int mpc8_read_header(AVFormatContext *s)
Definition: mpc8.c:237
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
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
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
mpc8_probe
static int mpc8_probe(const AVProbeData *p)
Definition: mpc8.c:78