51 if (!memcmp(p->
buf,
"NuppelVideo", 12))
53 if (!memcmp(p->
buf,
"MythTVVideo", 12))
59 #define PKTSIZE(s) (s & 0xffffff)
84 if (vst && subtype ==
'R') {
160 int is_mythtv,
width,
height, v_packs, a_packs, ret;
164 is_mythtv = !memcmp(id_string,
"MythTVVideo", 12);
174 if (aspect > 0.9999 && aspect < 1.0001)
207 ctx->
a_id = ast->index;
211 ast->codec->channels = 2;
213 ast->codec->sample_rate = 44100;
214 ast->codec->bit_rate = 2 * 2 * 44100 * 8;
215 ast->codec->block_align = 2 * 2;
216 ast->codec->bits_per_coded_sample = 16;
245 return ret < 0 ? ret :
AVERROR(EIO);
271 memcpy(pkt->
data, hdr, copyhdrsize);
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
void av_free_packet(AVPacket *pkt)
Free a packet.
int64_t pos
byte position in stream, -1 if unknown
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int index
stream index in AVFormatContext
#define AV_CH_LAYOUT_STEREO
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 av_always_inline double av_int2double(uint64_t i)
Reinterpret a 64-bit integer as a double.
enum AVStreamParseType need_parsing
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int avio_rl32(AVIOContext *s)
#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
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.
AVRational avg_frame_rate
Average framerate.
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
audio channel layout utility functions
AVRational av_d2q(double d, int max)
Convert a double precision floating point number to a rational.
const AVCodecTag ff_codec_bmp_tags[]
int width
picture width / height.
static av_always_inline int64_t avio_skip(AVIOContext *s, int64_t offset)
Skip given number of bytes forward.
internal header for RIFF based (de)muxers do NOT include this in end user applications ...
static int read_header(FFV1Context *f)
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
This structure contains the data a format has to probe a file.
enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
int eof_reached
true if eof reached
int channels
number of audio channels
void * priv_data
Format private data.
#define MKTAG(a, b, c, d)
This structure stores compressed data.
uint64_t avio_rl64(AVIOContext *s)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...