FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
pp_bnk.c File Reference
#include "avformat.h"
#include "demux.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"

Go to the source code of this file.

Data Structures

struct  PPBnkHeader
 
struct  PPBnkTrack
 
struct  PPBnkCtxTrack
 
struct  PPBnkCtx
 

Macros

#define PP_BNK_MAX_READ_SIZE   4096
 
#define PP_BNK_FILE_HEADER_SIZE   20
 
#define PP_BNK_TRACK_SIZE   20
 

Enumerations

enum  { PP_BNK_FLAG_PERSIST = (1 << 0), PP_BNK_FLAG_MUSIC = (1 << 1), PP_BNK_FLAG_MASK = (PP_BNK_FLAG_PERSIST | PP_BNK_FLAG_MUSIC) }
 

Functions

static void pp_bnk_parse_header (PPBnkHeader *hdr, const uint8_t *buf)
 
static void pp_bnk_parse_track (PPBnkTrack *trk, const uint8_t *buf)
 
static int pp_bnk_probe (const AVProbeData *p)
 
static int pp_bnk_read_header (AVFormatContext *s)
 
static int pp_bnk_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static int pp_bnk_read_close (AVFormatContext *s)
 
static int pp_bnk_seek (AVFormatContext *s, int stream_index, int64_t pts, int flags)
 

Variables

const FFInputFormat ff_pp_bnk_demuxer
 

Macro Definition Documentation

◆ PP_BNK_MAX_READ_SIZE

#define PP_BNK_MAX_READ_SIZE   4096

Definition at line 30 of file pp_bnk.c.

◆ PP_BNK_FILE_HEADER_SIZE

#define PP_BNK_FILE_HEADER_SIZE   20

Definition at line 31 of file pp_bnk.c.

◆ PP_BNK_TRACK_SIZE

#define PP_BNK_TRACK_SIZE   20

Definition at line 32 of file pp_bnk.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PP_BNK_FLAG_PERSIST 
PP_BNK_FLAG_MUSIC 
PP_BNK_FLAG_MASK 

Definition at line 63 of file pp_bnk.c.

Function Documentation

◆ pp_bnk_parse_header()

static void pp_bnk_parse_header ( PPBnkHeader hdr,
const uint8_t *  buf 
)
static

Definition at line 69 of file pp_bnk.c.

Referenced by pp_bnk_read_header().

◆ pp_bnk_parse_track()

static void pp_bnk_parse_track ( PPBnkTrack trk,
const uint8_t *  buf 
)
static

Definition at line 78 of file pp_bnk.c.

Referenced by pp_bnk_read_header().

◆ pp_bnk_probe()

static int pp_bnk_probe ( const AVProbeData p)
static

Definition at line 87 of file pp_bnk.c.

◆ pp_bnk_read_header()

static int pp_bnk_read_header ( AVFormatContext s)
static

Definition at line 110 of file pp_bnk.c.

◆ pp_bnk_read_packet()

static int pp_bnk_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 224 of file pp_bnk.c.

◆ pp_bnk_read_close()

static int pp_bnk_read_close ( AVFormatContext s)
static

Definition at line 291 of file pp_bnk.c.

◆ pp_bnk_seek()

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

Definition at line 300 of file pp_bnk.c.

Variable Documentation

◆ ff_pp_bnk_demuxer

const FFInputFormat ff_pp_bnk_demuxer
Initial value:
= {
.p.name = "pp_bnk",
.p.long_name = NULL_IF_CONFIG_SMALL("Pro Pinball Series Soundbank"),
.priv_data_size = sizeof(PPBnkCtx),
.flags_internal = FF_INFMT_FLAG_INIT_CLEANUP,
}

Definition at line 319 of file pp_bnk.c.

pp_bnk_seek
static int pp_bnk_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
Definition: pp_bnk.c:300
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
pp_bnk_probe
static int pp_bnk_probe(const AVProbeData *p)
Definition: pp_bnk.c:87
pp_bnk_read_close
static int pp_bnk_read_close(AVFormatContext *s)
Definition: pp_bnk.c:291
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
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
PPBnkCtx
Definition: pp_bnk.c:56
pp_bnk_read_header
static int pp_bnk_read_header(AVFormatContext *s)
Definition: pp_bnk.c:110
pp_bnk_read_packet
static int pp_bnk_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition: pp_bnk.c:224
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30