37 if (!memcmp(p->
buf,
"pmpm\1\0\0\0", 8))
105 for (i = 0; i < index_cnt; i++) {
137 for (i = 0; i < num_packets; i++)
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.
#define AV_LOG_WARNING
Something somehow does not look correct.
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
static int pmp_seek(AVFormatContext *s, int stream_idx, int64_t ts, int flags)
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
Allocate a buffer, reusing the given one if large enough.
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static int read_header(FFV1Context *f)
#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.
static int pmp_probe(AVProbeData *p)
unsigned int avio_rl32(AVIOContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
static int pmp_close(AVFormatContext *s)
int avio_r8(AVIOContext *s)
AVCodecContext * codec
codec context
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
int width
picture width / height.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
static int read_probe(AVProbeData *p)
enum AVMediaType codec_type
static int pmp_header(AVFormatContext *s, AVFormatParameters *ap)
int sample_rate
samples per second
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
struct PMPContext PMPContext
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.
unsigned int avio_rl16(AVIOContext *s)
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
int eof_reached
true if eof reached
int channels
number of audio channels
void * priv_data
Format private data.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
preferred ID for decoding MPEG audio layer 1, 2 or 3