FFmpeg
Data Structures | Macros | Functions | Variables
scd.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/internal.h"
#include "libavutil/macros.h"
#include "libavutil/avassert.h"
#include "libavformat/internal.h"
#include "avformat.h"

Go to the source code of this file.

Data Structures

struct  SCDOffsetTable
 
struct  SCDHeader
 
struct  SCDTrackHeader
 
struct  SCDDemuxContext
 

Macros

#define SCD_MAGIC
 
#define SCD_MIN_HEADER_SIZE   20
 
#define SCD_OFFSET_HEADER_SIZE   28
 
#define SCD_TRACK_HEADER_SIZE   32
 
#define SCD_TRACK_ID_PCM   0
 
#define SCD_TRACK_ID_OGG   6
 
#define SCD_TRACK_ID_MP3   7
 
#define SCD_TRACK_ID_MS_ADPCM   12
 

Functions

static int scd_probe (const AVProbeData *p)
 
static int scd_read_table (AVFormatContext *s, SCDOffsetTable *table)
 
static int scd_read_offsets (AVFormatContext *s)
 
static int scd_read_track (AVFormatContext *s, SCDTrackHeader *track, int index)
 
static int scd_read_header (AVFormatContext *s)
 
static int scd_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int scd_seek (AVFormatContext *s, int stream_index, int64_t pts, int flags)
 
static int scd_read_close (AVFormatContext *s)
 

Variables

const AVInputFormat ff_scd_demuxer
 

Macro Definition Documentation

◆ SCD_MAGIC

#define SCD_MAGIC
Value:
((uint64_t)MKBETAG('S', 'E', 'D', 'B') << 32 | \
MKBETAG('S', 'S', 'C', 'F'))

Definition at line 32 of file scd.c.

◆ SCD_MIN_HEADER_SIZE

#define SCD_MIN_HEADER_SIZE   20

Definition at line 34 of file scd.c.

◆ SCD_OFFSET_HEADER_SIZE

#define SCD_OFFSET_HEADER_SIZE   28

Definition at line 35 of file scd.c.

◆ SCD_TRACK_HEADER_SIZE

#define SCD_TRACK_HEADER_SIZE   32

Definition at line 36 of file scd.c.

◆ SCD_TRACK_ID_PCM

#define SCD_TRACK_ID_PCM   0

Definition at line 38 of file scd.c.

◆ SCD_TRACK_ID_OGG

#define SCD_TRACK_ID_OGG   6

Definition at line 39 of file scd.c.

◆ SCD_TRACK_ID_MP3

#define SCD_TRACK_ID_MP3   7

Definition at line 40 of file scd.c.

◆ SCD_TRACK_ID_MS_ADPCM

#define SCD_TRACK_ID_MS_ADPCM   12

Definition at line 41 of file scd.c.

Function Documentation

◆ scd_probe()

static int scd_probe ( const AVProbeData p)
static

Definition at line 84 of file scd.c.

◆ scd_read_table()

static int scd_read_table ( AVFormatContext s,
SCDOffsetTable table 
)
static

Definition at line 92 of file scd.c.

Referenced by scd_read_offsets().

◆ scd_read_offsets()

static int scd_read_offsets ( AVFormatContext s)
static

Definition at line 115 of file scd.c.

Referenced by scd_read_header().

◆ scd_read_track()

static int scd_read_track ( AVFormatContext s,
SCDTrackHeader track,
int  index 
)
static

Definition at line 146 of file scd.c.

Referenced by scd_read_header().

◆ scd_read_header()

static int scd_read_header ( AVFormatContext s)
static

Definition at line 237 of file scd.c.

◆ scd_read_packet()

static int scd_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 287 of file scd.c.

◆ scd_seek()

static int scd_seek ( AVFormatContext s,
int  stream_index,
int64_t  pts,
int  flags 
)
static

Definition at line 343 of file scd.c.

◆ scd_read_close()

static int scd_read_close ( AVFormatContext s)
static

Definition at line 357 of file scd.c.

Variable Documentation

◆ ff_scd_demuxer

const AVInputFormat ff_scd_demuxer
Initial value:
= {
.name = "scd",
.long_name = NULL_IF_CONFIG_SMALL("Square Enix SCD"),
.priv_data_size = sizeof(SCDDemuxContext),
.flags_internal = FF_FMT_INIT_CLEANUP,
}

Definition at line 368 of file scd.c.

SCDDemuxContext
Definition: scd.c:78
FF_FMT_INIT_CLEANUP
#define FF_FMT_INIT_CLEANUP
For an AVInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
Definition: internal.h:49
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:149
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:141
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:527
read_probe
static int read_probe(const AVProbeData *pd)
Definition: jvdec.c:55
scd_read_close
static int scd_read_close(AVFormatContext *s)
Definition: scd.c:357
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:117
MKBETAG
#define MKBETAG(a, b, c, d)
Definition: macros.h:56
scd_read_header
static int scd_read_header(AVFormatContext *s)
Definition: scd.c:237
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_reading.c:42
scd_probe
static int scd_probe(const AVProbeData *p)
Definition: scd.c:84
scd_seek
static int scd_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
Definition: scd.c:343
scd_read_packet
static int scd_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: scd.c:287