FFmpeg
Loading...
Searching...
No Matches
pp_bnk.c File Reference
#include "avformat.h"
#include "avio_internal.h"
#include "demux.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/mem.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 32 of file pp_bnk.c.

Referenced by pp_bnk_read_packet().

◆ PP_BNK_FILE_HEADER_SIZE

#define PP_BNK_FILE_HEADER_SIZE   20

Definition at line 33 of file pp_bnk.c.

Referenced by pp_bnk_read_header().

◆ PP_BNK_TRACK_SIZE

#define PP_BNK_TRACK_SIZE   20

Definition at line 34 of file pp_bnk.c.

Referenced by pp_bnk_read_header().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
PP_BNK_FLAG_PERSIST 
PP_BNK_FLAG_MUSIC 
PP_BNK_FLAG_MASK 

Definition at line 65 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 71 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 80 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 89 of file pp_bnk.c.

◆ pp_bnk_read_header()

static int pp_bnk_read_header ( AVFormatContext * s)
static

Definition at line 112 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,
}
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 pp_bnk_seek(AVFormatContext *s, int stream_index, int64_t pts, int flags)
Definition pp_bnk.c:300
static int pp_bnk_read_packet(AVFormatContext *s, AVPacket *pkt)
Definition pp_bnk.c:224
static int pp_bnk_probe(const AVProbeData *p)
Definition pp_bnk.c:89
static int pp_bnk_read_close(AVFormatContext *s)
Definition pp_bnk.c:291
static int pp_bnk_read_header(AVFormatContext *s)
Definition pp_bnk.c:112

Definition at line 319 of file pp_bnk.c.