28 #define PP_BNK_MAX_READ_SIZE 4096 29 #define PP_BNK_FILE_HEADER_SIZE 20 30 #define PP_BNK_TRACK_SIZE 20 90 if (track_count == 0 || track_count > INT_MAX)
93 if ((sample_rate != 5512) && (sample_rate != 11025) &&
94 (sample_rate != 22050) && (sample_rate != 44100))
183 "Track %d has truncated data, assuming track count == %d\n",
186 }
else if (ret < 0) {
260 }
else if (ret < 0) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define avpriv_request_sample(...)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
fseek() equivalent for AVIOContext.
int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
AVInputFormat ff_pp_bnk_demuxer
This struct describes the properties of an encoded stream.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AVERROR_EOF
End of file.
static av_cold int read_close(AVFormatContext *ctx)
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
uint64_t channel_layout
Audio only.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
#define i(width, name, range_min, range_max)
static int pp_bnk_probe(const AVProbeData *p)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
enum AVMediaType codec_type
General type of the encoded data.
simple assert() macros that are a bit more flexible than ISO C assert().
static int pp_bnk_read_close(AVFormatContext *s)
int flags
A combination of AV_PKT_FLAG values.
#define PP_BNK_MAX_READ_SIZE
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
common internal API header
static void pp_bnk_parse_track(PPBnkTrack *trk, const uint8_t *buf)
int block_align
Audio only.
#define PP_BNK_TRACK_SIZE
static int read_header(FFV1Context *f)
#define PP_BNK_FILE_HEADER_SIZE
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int pp_bnk_read_header(AVFormatContext *s)
AVIOContext * pb
I/O context.
static int pp_bnk_read_packet(AVFormatContext *s, AVPacket *pkt)
This structure contains the data a format has to probe a file.
int bits_per_raw_sample
This is the number of valid bits in each output sample.
int64_t duration
Decoding: duration of the stream, in stream time base.
int sample_rate
Audio only.
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base...
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
void * priv_data
Format private data.
int bits_per_coded_sample
The number of bits per sample in the codedwords.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
#define av_malloc_array(a, b)
static void pp_bnk_parse_header(PPBnkHeader *hdr, const uint8_t *buf)
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.