FFmpeg
Data Fields
PerThreadContext Struct Reference

Context used by codec threads and stored in their AVCodecInternal thread_ctx. More...

Data Fields

struct FrameThreadContextparent
 
pthread_t thread
 
int thread_init
 
unsigned pthread_init_cnt
 Number of successfully initialized mutexes/conditions. More...
 
pthread_cond_t input_cond
 Used to wait for a new packet from the main thread. More...
 
pthread_cond_t progress_cond
 Used by child threads to wait for progress to change. More...
 
pthread_cond_t output_cond
 Used by the main thread to wait for frames to finish. More...
 
pthread_mutex_t mutex
 Mutex used to protect the contents of the PerThreadContext. More...
 
pthread_mutex_t progress_mutex
 Mutex used to protect frame progress values and progress_cond. More...
 
AVCodecContextavctx
 Context used to decode packets passed to this thread. More...
 
AVPacketavpkt
 Input packet (for decoding) or output (for encoding). More...
 
DecodedFrames df
 Decoded frames from a single decode iteration. More...
 
int result
 The result of the last codec decode/encode() call. More...
 
atomic_int state
 
int die
 Set when the thread should exit. More...
 
int hwaccel_serializing
 
int async_serializing
 
int hwaccel_threadsafe
 
atomic_int debug_threads
 Set if the FF_DEBUG_THREADS option is set. More...
 

Detailed Description

Context used by codec threads and stored in their AVCodecInternal thread_ctx.

Definition at line 81 of file pthread_frame.c.

Field Documentation

◆ parent

struct FrameThreadContext* PerThreadContext::parent

Definition at line 82 of file pthread_frame.c.

◆ thread

pthread_t PerThreadContext::thread

Definition at line 84 of file pthread_frame.c.

◆ thread_init

int PerThreadContext::thread_init

Definition at line 85 of file pthread_frame.c.

◆ pthread_init_cnt

unsigned PerThreadContext::pthread_init_cnt

Number of successfully initialized mutexes/conditions.

Definition at line 86 of file pthread_frame.c.

◆ input_cond

pthread_cond_t PerThreadContext::input_cond

Used to wait for a new packet from the main thread.

Definition at line 87 of file pthread_frame.c.

◆ progress_cond

pthread_cond_t PerThreadContext::progress_cond

Used by child threads to wait for progress to change.

Definition at line 88 of file pthread_frame.c.

Referenced by submit_packet().

◆ output_cond

pthread_cond_t PerThreadContext::output_cond

Used by the main thread to wait for frames to finish.

Definition at line 89 of file pthread_frame.c.

◆ mutex

pthread_mutex_t PerThreadContext::mutex

Mutex used to protect the contents of the PerThreadContext.

Definition at line 91 of file pthread_frame.c.

◆ progress_mutex

pthread_mutex_t PerThreadContext::progress_mutex

Mutex used to protect frame progress values and progress_cond.

Definition at line 92 of file pthread_frame.c.

Referenced by submit_packet().

◆ avctx

AVCodecContext* PerThreadContext::avctx

Context used to decode packets passed to this thread.

Definition at line 94 of file pthread_frame.c.

Referenced by ff_thread_flush(), and submit_packet().

◆ avpkt

AVPacket* PerThreadContext::avpkt

Input packet (for decoding) or output (for encoding).

Definition at line 96 of file pthread_frame.c.

◆ df

DecodedFrames PerThreadContext::df

Decoded frames from a single decode iteration.

Definition at line 101 of file pthread_frame.c.

◆ result

int PerThreadContext::result

The result of the last codec decode/encode() call.

Definition at line 102 of file pthread_frame.c.

◆ state

atomic_int PerThreadContext::state

Definition at line 104 of file pthread_frame.c.

Referenced by submit_packet().

◆ die

int PerThreadContext::die

Set when the thread should exit.

Definition at line 106 of file pthread_frame.c.

◆ hwaccel_serializing

int PerThreadContext::hwaccel_serializing

Definition at line 108 of file pthread_frame.c.

◆ async_serializing

int PerThreadContext::async_serializing

Definition at line 109 of file pthread_frame.c.

◆ hwaccel_threadsafe

int PerThreadContext::hwaccel_threadsafe

Definition at line 115 of file pthread_frame.c.

Referenced by update_context_from_thread().

◆ debug_threads

atomic_int PerThreadContext::debug_threads

Set if the FF_DEBUG_THREADS option is set.

Definition at line 117 of file pthread_frame.c.


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