Libav
Data Fields
AVCodecInternal Struct Reference

#include <internal.h>

Data Fields

int is_copy
 Whether the parent AVCodecContext is a copy of the context which had init() called on it. More...
 
int allocate_progress
 Whether to allocate progress for frame threading. More...
 
int last_audio_frame
 An audio frame with less than required samples has been submitted and padded with silence. More...
 
AVFrameto_free
 
FramePoolpool
 
voidthread_ctx
 
AVPacketpkt
 Current packet as passed into the decoder, to avoid having to pass the packet into every function. More...
 
voidhwaccel_priv_data
 hwaccel-specific private data More...
 
int draining
 checks API usage: after codec draining, flush is required to resume operation More...
 
AVPacketbuffer_pkt
 buffers for using new encode/decode API through legacy API More...
 
int buffer_pkt_valid
 
AVFramebuffer_frame
 
int draining_done
 

Detailed Description

Definition at line 97 of file internal.h.

Field Documentation

◆ is_copy

int AVCodecInternal::is_copy

Whether the parent AVCodecContext is a copy of the context which had init() called on it.

This is used by multithreading - shared tables and picture pointers should be freed from the original context only.

Definition at line 104 of file internal.h.

Referenced by decode_init_thread_copy(), ff_frame_thread_init(), ff_rv34_decode_init_thread_copy(), mimic_decode_end(), and vp3_decode_end().

◆ allocate_progress

int AVCodecInternal::allocate_progress

Whether to allocate progress for frame threading.

The codec must set it to 1 if it uses ff_thread_await/report_progress(), then progress will be allocated in ff_thread_get_buffer(). The frames then MUST be freed with ff_thread_release_buffer().

If the codec does not need to call the progress functions (there are no dependencies between the frames), it should leave this at 0. Then it can decode straight to the user-provided frames (which the user will then free with av_frame_unref()), there is no need to call ff_thread_release_buffer().

Definition at line 119 of file internal.h.

Referenced by decode_init(), ff_h264_decode_init(), ff_rv34_decode_init(), ff_thread_get_buffer(), frame_worker_thread(), hevc_decode_init(), mimic_decode_init(), vp3_decode_init(), vp78_decode_init(), and vp9_decode_init().

◆ last_audio_frame

int AVCodecInternal::last_audio_frame

An audio frame with less than required samples has been submitted and padded with silence.

Reject all subsequent frames.

Definition at line 125 of file internal.h.

Referenced by avcodec_encode_audio2().

◆ to_free

AVFrame* AVCodecInternal::to_free

Definition at line 127 of file internal.h.

Referenced by avcodec_close(), avcodec_flush_buffers(), avcodec_open2(), and unrefcount_frame().

◆ pool

FramePool* AVCodecInternal::pool

◆ thread_ctx

void* AVCodecInternal::thread_ctx

◆ pkt

AVPacket* AVCodecInternal::pkt

Current packet as passed into the decoder, to avoid having to pass the packet into every function.

Definition at line 137 of file internal.h.

Referenced by avcodec_decode_audio4(), avcodec_decode_subtitle2(), avcodec_decode_video2(), ff_decode_frame_props(), and ff_frame_thread_init().

◆ hwaccel_priv_data

void* AVCodecInternal::hwaccel_priv_data

◆ draining

int AVCodecInternal::draining

checks API usage: after codec draining, flush is required to resume operation

Definition at line 147 of file internal.h.

Referenced by avcodec_flush_buffers(), avcodec_receive_frame(), avcodec_receive_packet(), avcodec_send_frame(), avcodec_send_packet(), and do_decode().

◆ buffer_pkt

AVPacket* AVCodecInternal::buffer_pkt

buffers for using new encode/decode API through legacy API

Definition at line 152 of file internal.h.

Referenced by avcodec_close(), avcodec_flush_buffers(), avcodec_open2(), avcodec_receive_frame(), avcodec_receive_packet(), avcodec_send_packet(), do_decode(), and do_encode().

◆ buffer_pkt_valid

int AVCodecInternal::buffer_pkt_valid

◆ buffer_frame

AVFrame* AVCodecInternal::buffer_frame

◆ draining_done

int AVCodecInternal::draining_done

Definition at line 155 of file internal.h.

Referenced by avcodec_flush_buffers(), and do_decode().


The documentation for this struct was generated from the following file: