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"
#include "demux.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 FFInputFormat 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 33 of file scd.c.

◆ SCD_MIN_HEADER_SIZE

#define SCD_MIN_HEADER_SIZE   20

Definition at line 35 of file scd.c.

◆ SCD_OFFSET_HEADER_SIZE

#define SCD_OFFSET_HEADER_SIZE   28

Definition at line 36 of file scd.c.

◆ SCD_TRACK_HEADER_SIZE

#define SCD_TRACK_HEADER_SIZE   32

Definition at line 37 of file scd.c.

◆ SCD_TRACK_ID_PCM

#define SCD_TRACK_ID_PCM   0

Definition at line 39 of file scd.c.

◆ SCD_TRACK_ID_OGG

#define SCD_TRACK_ID_OGG   6

Definition at line 40 of file scd.c.

◆ SCD_TRACK_ID_MP3

#define SCD_TRACK_ID_MP3   7

Definition at line 41 of file scd.c.

◆ SCD_TRACK_ID_MS_ADPCM

#define SCD_TRACK_ID_MS_ADPCM   12

Definition at line 42 of file scd.c.

Function Documentation

◆ scd_probe()

static int scd_probe ( const AVProbeData p)
static

Definition at line 85 of file scd.c.

◆ scd_read_table()

static int scd_read_table ( AVFormatContext s,
SCDOffsetTable table 
)
static

Definition at line 93 of file scd.c.

Referenced by scd_read_offsets().

◆ scd_read_offsets()

static int scd_read_offsets ( AVFormatContext s)
static

Definition at line 116 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 147 of file scd.c.

Referenced by scd_read_header().

◆ scd_read_header()

static int scd_read_header ( AVFormatContext s)
static

Definition at line 238 of file scd.c.

◆ scd_read_packet()

static int scd_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 288 of file scd.c.

◆ scd_seek()

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

Definition at line 344 of file scd.c.

◆ scd_read_close()

static int scd_read_close ( AVFormatContext s)
static

Definition at line 358 of file scd.c.

Variable Documentation

◆ ff_scd_demuxer

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

Definition at line 369 of file scd.c.

SCDDemuxContext
Definition: scd.c:79
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:151
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:143
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:41
FF_INFMT_FLAG_INIT_CLEANUP
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
Definition: demux.h:35
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:550
scd_read_close
static int scd_read_close(AVFormatContext *s)
Definition: scd.c:358
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:106
MKBETAG
#define MKBETAG(a, b, c, d)
Definition: macros.h:56
scd_read_header
static int scd_read_header(AVFormatContext *s)
Definition: scd.c:238
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
scd_probe
static int scd_probe(const AVProbeData *p)
Definition: scd.c:85
scd_seek
static int scd_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
Definition: scd.c:344
scd_read_packet
static int scd_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: scd.c:288