22 #include "libavutil/channel_layout.h"
23 #include "libavutil/intreadwrite.h"
24 #include "libavutil/intfloat.h"
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_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.
AVCodecContext * codec
Codec context associated with this stream.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int index
stream index in AVFormatContext
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...
#define AV_CH_LAYOUT_STEREO
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
void av_freep(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
unsigned char * buf
Buffer must have AVPROBE_PADDING_SIZE of extra allocated bytes filled with zero.
enum AVStreamParseType need_parsing
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
AVStream * avformat_new_stream(AVFormatContext *s, const AVCodec *c)
Add a new stream to a media file.
#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.
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
AVRational avg_frame_rate
Average framerate.
int flags
A combination of AV_PKT_FLAG values.
uint64_t channel_layout
Audio channel layout.
AVRational av_d2q(double d, int max) av_const
Convert a double precision floating point number to a rational.
const AVCodecTag ff_codec_bmp_tags[]
int width
picture width / height.
void * av_malloc(size_t size) av_malloc_attrib 1(1)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
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
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
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.
#define MKTAG(a, b, c, d)
static av_always_inline double av_int2double(uint64_t i)
Reinterpret a 64-bit integer as a double.
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
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...