Go to the documentation of this file.
32 for (
i = 0;
i <
s->nb_streams;
i++) {
42 const int *samples_per_frame,
47 if (!samples_per_frame)
54 for (
i = 0;
i <
s->nb_streams;
i++) {
79 int stream_index,
int flush)
136 for (
i = 0;
i <
s->nb_streams;
i++) {
static int get_packet(URLContext *s, int for_header)
Interact with the server by receiving and sending RTMP packets until there is some significant data (...
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
enum AVMediaType codec_type
General type of the encoded data.
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
Feed data from a user-supplied callback to an AVFifoBuffer.
unsigned fifo_size
size of currently allocated FIFO
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
const int * samples
current samples per frame, pointer to samples_per_frame
AVRational time_base
time base of output audio packets
int sample_size
size of one sample all channels included
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size)
Resize an AVFifoBuffer.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
static void flush(AVCodecContext *avctx)
Rational number (pair of numerator and denominator).
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
void ff_audio_interleave_close(AVFormatContext *s)
AVFifoBuffer * av_fifo_alloc_array(size_t nmemb, size_t size)
Initialize an AVFifoBuffer.
int ff_audio_interleave_init(AVFormatContext *s, const int *samples_per_frame, AVRational time_base)
int av_fifo_size(const AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
const int * samples_per_frame
must be 0-terminated
void av_fifo_freep(AVFifoBuffer **f)
Free an AVFifoBuffer and reset pointer to NULL.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int ff_audio_rechunk_interleave(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush, int(*get_packet)(AVFormatContext *, AVPacket *, AVPacket *, int), int(*compare_ts)(AVFormatContext *, AVPacket *, AVPacket *))
Rechunk audio PCM packets per AudioInterleaveContext->samples_per_frame and interleave them correctly...
static int interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)