FFmpeg
Loading...
Searching...
No Matches
scd.c File Reference
#include <stddef.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/internal.h"
#include "libavutil/macros.h"
#include "libavutil/mem.h"
#include "libavformat/internal.h"
#include "avformat.h"
#include "avio_internal.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'))
#define MKBETAG(a, b, c, d)
Definition macros.h:56

Definition at line 36 of file scd.c.

Referenced by scd_probe(), and scd_read_header().

◆ SCD_MIN_HEADER_SIZE

#define SCD_MIN_HEADER_SIZE   20

Definition at line 38 of file scd.c.

Referenced by scd_read_header().

◆ SCD_OFFSET_HEADER_SIZE

#define SCD_OFFSET_HEADER_SIZE   28

Definition at line 39 of file scd.c.

Referenced by scd_read_offsets().

◆ SCD_TRACK_HEADER_SIZE

#define SCD_TRACK_HEADER_SIZE   32

Definition at line 40 of file scd.c.

Referenced by scd_read_track().

◆ SCD_TRACK_ID_PCM

#define SCD_TRACK_ID_PCM   0

Definition at line 42 of file scd.c.

Referenced by scd_read_packet(), and scd_read_track().

◆ SCD_TRACK_ID_OGG

#define SCD_TRACK_ID_OGG   6

Definition at line 43 of file scd.c.

Referenced by scd_read_track().

◆ SCD_TRACK_ID_MP3

#define SCD_TRACK_ID_MP3   7

Definition at line 44 of file scd.c.

Referenced by scd_read_packet(), and scd_read_track().

◆ SCD_TRACK_ID_MS_ADPCM

#define SCD_TRACK_ID_MS_ADPCM   12

Definition at line 45 of file scd.c.

Referenced by scd_read_track().

Function Documentation

◆ scd_probe()

static int scd_probe ( const AVProbeData * p)
static

Definition at line 88 of file scd.c.

◆ scd_read_table()

static int scd_read_table ( AVFormatContext * s,
SCDOffsetTable * table )
static

Definition at line 96 of file scd.c.

Referenced by scd_read_offsets().

◆ scd_read_offsets()

static int scd_read_offsets ( AVFormatContext * s)
static

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

Referenced by scd_read_header().

◆ scd_read_header()

static int scd_read_header ( AVFormatContext * s)
static

Definition at line 242 of file scd.c.

◆ scd_read_packet()

static int scd_read_packet ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 292 of file scd.c.

◆ scd_seek()

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

Definition at line 348 of file scd.c.

◆ scd_read_close()

static int scd_read_close ( AVFormatContext * s)
static

Definition at line 362 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,
}
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_probe(const AVProbeData *p)
Definition cdg.c:30
#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
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static av_cold int read_close(AVFormatContext *ctx)
Definition libcdio.c:143
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition libcdio.c:151
static int scd_read_header(AVFormatContext *s)
Definition scd.c:242
static int scd_read_close(AVFormatContext *s)
Definition scd.c:362
static int scd_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
Definition scd.c:348
static int scd_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition scd.c:292
static int scd_probe(const AVProbeData *p)
Definition scd.c:88

Definition at line 373 of file scd.c.