22 #include "libavutil/intreadwrite.h"
97 for (i = 0; i < index_cnt; i++) {
105 if (size < 9 + 4*pmp->num_streams) {
111 if (fsize > 0 && i == 0 && pos > fsize) {
155 for (i = 0; i < num_packets; i++)
#define AVERROR_PATCHWELCOME
int av_add_index_entry(AVStream *st, int64_t pos, int64_t timestamp, int size, int distance, int flags)
Add an index entry into a sorted list.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
AVCodecContext * codec
Codec context associated with this stream.
void av_log(void *avcl, int level, const char *fmt,...) av_printf_format(3
Send the specified message to the log if the level is less than or equal to the current av_log_level...
static int pmp_header(AVFormatContext *s)
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
static av_cold int read_close(AVFormatContext *ctx)
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int pmp_probe(AVProbeData *p)
void * priv_data
Format private data.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
preferred ID for decoding MPEG audio layer 1, 2 or 3
static int pmp_close(AVFormatContext *s)
int width
picture width / height.
static int pmp_seek(AVFormatContext *s, int stream_index, int64_t ts, int flags)
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
This structure contains the data a format has to probe a file.
int64_t duration
Decoding: duration of the stream, in stream time base.
static int pmp_packet(AVFormatContext *s, AVPacket *pkt)
AVInputFormat ff_pmp_demuxer
int64_t nb_frames
number of frames in this stream if known or 0
#define AVERROR_INVALIDDATA
int channels
number of audio channels
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
This structure stores compressed data.