42 const int *samples_per_frame,
47 if (!samples_per_frame)
74 int stream_index,
int flush)
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.
int av_fifo_size(AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
int av_new_packet(AVPacket *pkt, int size)
Allocate the payload of a packet and initialize its fields with default values.
const int * samples
current samples per frame, pointer to samples_per_frame
const int * samples_per_frame
must be 0-terminated
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size)
Resize an AVFifoBuffer.
int ff_audio_interleave_init(AVFormatContext *s, const int *samples_per_frame, AVRational time_base)
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
int av_get_bits_per_sample(enum CodecID codec_id)
Return codec bits per sample.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
static int ff_interleave_new_audio_packet(AVFormatContext *s, AVPacket *pkt, int stream_index, int flush)
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...
void av_log(void *avcl, int level, const char *fmt,...)
AVCodecContext * codec
codec context
unsigned int nb_streams
A list of all streams in the file.
void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
AVRational time_base
time base of output audio packets
enum AVMediaType codec_type
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
a very simple circular buffer FIFO implementation
rational number numerator/denominator
int sample_size
size of one sample all channels included
void ff_audio_interleave_close(AVFormatContext *s)
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
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 (...
int channels
number of audio channels
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed...
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...