FFmpeg
Functions
audio_frame_queue.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "audio_frame_queue.h"
#include "internal.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Functions

av_cold void ff_af_queue_init (AVCodecContext *avctx, AudioFrameQueue *afq)
 Initialize AudioFrameQueue. More...
 
void ff_af_queue_close (AudioFrameQueue *afq)
 Close AudioFrameQueue. More...
 
int ff_af_queue_add (AudioFrameQueue *afq, const AVFrame *f)
 Add a frame to the queue. More...
 
void ff_af_queue_remove (AudioFrameQueue *afq, int nb_samples, int64_t *pts, int64_t *duration)
 Remove frame(s) from the queue. More...
 

Function Documentation

◆ ff_af_queue_init()

av_cold void ff_af_queue_init ( AVCodecContext avctx,
AudioFrameQueue afq 
)

◆ ff_af_queue_close()

void ff_af_queue_close ( AudioFrameQueue afq)

◆ ff_af_queue_add()

int ff_af_queue_add ( AudioFrameQueue afq,
const AVFrame f 
)

◆ ff_af_queue_remove()

void ff_af_queue_remove ( AudioFrameQueue afq,
int  nb_samples,
int64_t *  pts,
int64_t *  duration 
)

Remove frame(s) from the queue.

Retrieves the pts of the next available frame, or a generated pts based on the last frame duration if there are no frames left in the queue. The number of requested samples should be the full number of samples represented by the packet that will be output by the encoder. If fewer samples are available in the queue, a smaller value will be used for the output duration.

Parameters
afqqueue context
nb_samplesnumber of samples to remove from the queue
[out]ptsoutput packet pts
[out]durationoutput packet duration

Definition at line 75 of file audio_frame_queue.c.

Referenced by aac_encode_frame(), aptx_encode_frame(), encode_frame(), ffat_encode(), libopus_encode(), libshine_encode_frame(), libvorbis_encode_frame(), mlp_encode_frame(), mp3lame_encode_frame(), opus_encode_frame(), ra144_encode_frame(), and vorbis_encode_frame().