43 if (!memcmp(p->
buf,
"NuppelVideo", 12))
45 if (!memcmp(p->
buf,
"MythTVVideo", 12))
51 #define PKTSIZE(s) (s & 0xffffff)
73 if (vst && subtype ==
'R') {
134 is_mythtv = !memcmp(id_string,
"MythTVVideo", 12);
144 if (aspect > 0.9999 && aspect < 1.0001)
156 ctx->
v_id = stream_nr++;
172 ctx->
a_id = stream_nr++;
178 ast->codec->channels = 2;
179 ast->codec->sample_rate = 44100;
180 ast->codec->bit_rate = 2 * 2 * 44100 * 8;
181 ast->codec->block_align = 2 * 2;
182 ast->codec->bits_per_coded_sample = 16;
205 return ret < 0 ? ret :
AVERROR(EIO);
229 memcpy(pkt->
data, hdr, copyhdrsize);
249 if (ret < 0)
return ret;
int64_t pos
byte position in stream, -1 if unknown
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
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 int read_header(FFV1Context *f)
void av_free_packet(AVPacket *pkt)
Free a packet.
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).
enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
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.
int flags
A combination of AV_PKT_FLAG values.
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.
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_probe(AVProbeData *p)
enum AVMediaType codec_type
int sample_rate
samples per second
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
This structure contains the data a format has to probe a file.
int eof_reached
true if eof reached
int channels
number of audio channels
void * priv_data
Format private data.
enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps)
#define MKTAG(a, b, c, d)
AVRational r_frame_rate
Real base framerate of the stream.
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...