FFmpeg  4.0
Data Fields
AVCodecInternal Struct Reference

#include <libavcodec/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
 
DecodeSimpleContext ds
 
DecodeFilterContext filter
 
AVPacketlast_pkt_props
 Properties (timestamps+side data) extracted from the last packet passed for decoding. More...
 
uint8_tbyte_buffer
 temporary buffer used for encoders to store their bitstream More...
 
unsigned int byte_buffer_size
 
voidframe_thread_encoder
 
int skip_samples
 Number of audio samples to skip at the start of the next decoded frame. 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
 
int compat_decode
 
int compat_decode_warned
 
size_t compat_decode_consumed
 
size_t compat_decode_partial_size
 
AVFramecompat_decode_frame
 
int showed_multi_packet_warning
 
int skip_samples_multiplier
 
int nb_draining_errors
 

Detailed Description

Definition at line 129 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 136 of file internal.h.

Referenced by cfhd_close(), decode_end(), ff_frame_thread_free(), ff_frame_thread_init(), ff_rv34_decode_init_thread_copy(), h264_decode_init(), hqx_decode_close(), mimic_decode_end(), png_dec_init(), 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 151 of file internal.h.

Referenced by decode_init(), ff_rv34_decode_init(), frame_worker_thread(), h264_decode_init(), hevc_decode_init(), mimic_decode_init(), png_dec_init(), thread_get_buffer_internal(), 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 157 of file internal.h.

Referenced by avcodec_encode_audio2().

◆ to_free

AVFrame* AVCodecInternal::to_free

Definition at line 159 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

◆ ds

DecodeSimpleContext AVCodecInternal::ds

◆ filter

DecodeFilterContext AVCodecInternal::filter

Definition at line 166 of file internal.h.

Referenced by avcodec_send_packet(), bsfs_init(), bsfs_poll(), and ff_decode_bsfs_uninit().

◆ last_pkt_props

AVPacket* AVCodecInternal::last_pkt_props

Properties (timestamps+side data) extracted from the last packet passed for decoding.

Definition at line 172 of file internal.h.

Referenced by avcodec_close(), avcodec_open2(), decode_simple_internal(), extract_packet_props(), ff_decode_frame_props(), and ff_frame_thread_init().

◆ byte_buffer

uint8_t* AVCodecInternal::byte_buffer

temporary buffer used for encoders to store their bitstream

Definition at line 177 of file internal.h.

Referenced by avcodec_close(), avcodec_encode_audio2(), avcodec_encode_video2(), ff_alloc_packet2(), ff_mpv_encode_picture(), and ff_mpv_reallocate_putbitbuffer().

◆ byte_buffer_size

unsigned int AVCodecInternal::byte_buffer_size

◆ frame_thread_encoder

void* AVCodecInternal::frame_thread_encoder

◆ skip_samples

int AVCodecInternal::skip_samples

Number of audio samples to skip at the start of the next decoded frame.

Definition at line 185 of file internal.h.

Referenced by cng_decode_frame(), decode_fill(), decode_simple_internal(), libopus_decode_init(), and libopus_flush().

◆ 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 195 of file internal.h.

Referenced by avcodec_flush_buffers(), avcodec_receive_packet(), avcodec_send_frame(), avcodec_send_packet(), compat_decode(), decode_simple_internal(), and ff_decode_get_packet().

◆ buffer_pkt

AVPacket* AVCodecInternal::buffer_pkt

buffers for using new encode/decode API through legacy API

Definition at line 200 of file internal.h.

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

◆ buffer_pkt_valid

int AVCodecInternal::buffer_pkt_valid

◆ buffer_frame

AVFrame* AVCodecInternal::buffer_frame

◆ draining_done

int AVCodecInternal::draining_done

◆ compat_decode

int AVCodecInternal::compat_decode

Definition at line 205 of file internal.h.

Referenced by compat_decode().

◆ compat_decode_warned

int AVCodecInternal::compat_decode_warned

Definition at line 206 of file internal.h.

Referenced by compat_decode().

◆ compat_decode_consumed

size_t AVCodecInternal::compat_decode_consumed

Definition at line 209 of file internal.h.

Referenced by compat_decode(), decode_simple_internal(), and ff_decode_get_packet().

◆ compat_decode_partial_size

size_t AVCodecInternal::compat_decode_partial_size

Definition at line 212 of file internal.h.

Referenced by compat_decode().

◆ compat_decode_frame

AVFrame* AVCodecInternal::compat_decode_frame

Definition at line 213 of file internal.h.

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

◆ showed_multi_packet_warning

int AVCodecInternal::showed_multi_packet_warning

Definition at line 215 of file internal.h.

Referenced by decode_simple_internal().

◆ skip_samples_multiplier

int AVCodecInternal::skip_samples_multiplier

Definition at line 217 of file internal.h.

Referenced by aac_decode_frame_int(), avcodec_open2(), and decode_simple_internal().

◆ nb_draining_errors

int AVCodecInternal::nb_draining_errors

Definition at line 220 of file internal.h.

Referenced by avcodec_flush_buffers(), and decode_simple_internal().


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