void av_free_packet(AVPacket *pkt)
Free a packet.
int64_t pos
byte position in stream, -1 if unknown
static av_always_inline int64_t avio_tell(AVIOContext *s)
ftell() equivalent for AVIOContext.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int avio_read(AVIOContext *s, unsigned char *buf, int size)
Read size bytes from AVIOContext into buf.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
AVStream * avformat_new_stream(AVFormatContext *s, AVCodec *c)
Add a new stream to a media file.
uint64_t channel_layout
Audio channel layout.
int avio_r8(AVIOContext *s)
AVCodecContext * codec
Codec context associated with this stream.
audio channel layout utility functions
enum AVMediaType codec_type
int sample_rate
samples per second
AVIOContext * pb
I/O context.
int64_t start_time
Decoding: pts of the first frame of the stream, in stream time base.
int channels
number of audio channels
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.
#define AVFMT_GENERIC_INDEX