audio_frame_queue.h File Reference
#include "avcodec.h"
Include dependency graph for audio_frame_queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  AudioFrame
 
struct  AudioFrameQueue
 

Typedefs

typedef struct AudioFrame AudioFrame
 
typedef struct AudioFrameQueue AudioFrameQueue
 

Functions

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, int *duration)
 Remove frame(s) from the queue. More...
 

Typedef Documentation

typedef struct AudioFrame AudioFrame

Function Documentation

int ff_af_queue_add ( AudioFrameQueue afq,
const AVFrame f 
)

Add a frame to the queue.

Parameters
afqqueue context
fframe to add to the queue

Definition at line 43 of file audio_frame_queue.c.

Referenced by aac_encode_frame(), amr_decode_fix_avctx(), encode_frame(), Faac_encode_frame(), libopus_encode(), libshine_encode_frame(), mp3lame_encode_frame(), oggvorbis_encode_frame(), and ra144_encode_frame().

void ff_af_queue_init ( AVCodecContext avctx,
AudioFrameQueue afq 
)

Initialize AudioFrameQueue.

Parameters
avctxcontext to use for time_base and av_log
afqqueue context

Definition at line 27 of file audio_frame_queue.c.

Referenced by aac_encode_init(), amr_decode_fix_avctx(), encode_init(), Faac_encode_init(), libopus_encode_init(), libshine_encode_init(), mp3lame_encode_init(), oggvorbis_encode_init(), and ra144_encode_init().

void ff_af_queue_remove ( AudioFrameQueue afq,
int  nb_samples,
int64_t *  pts,
int *  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 74 of file audio_frame_queue.c.

Referenced by aac_encode_frame(), amr_decode_fix_avctx(), encode_frame(), Faac_encode_frame(), libopus_encode(), libshine_encode_frame(), mp3lame_encode_frame(), oggvorbis_encode_frame(), and ra144_encode_frame().