PerThreadContext Struct Reference

Context used by codec threads and stored in their AVCodecContext thread_opaque. More...


Public Types


Data Fields

Used to wait for a new packet from the main thread.
Used by child threads to wait for progress to change.
Used by the main thread to wait for frames to finish.
Mutex used to protect the contents of the PerThreadContext.
Mutex used to protect frame progress values and progress_cond.
Context used to decode packets passed to this thread.
Input packet (for decoding) or output (for encoding).
Size allocated for avpkt.data.
Output frame (for decoding) or input (for encoding).
The output of got_picture_ptr from the last avcodec_decode_video() call.
The result of the last codec decode/encode() call.
enum PerThreadContext:: { ... } state
AVFrame released_buffers [MAX_BUFFERS]
Array of frames passed to ff_thread_release_buffer().
volatile int progress [MAX_BUFFERS][2]
Array of progress values used by ff_thread_get_buffer().
volatile uint8_t progress_used [MAX_BUFFERS]
AVFrame the codec passed to get_buffer().

Detailed Description

Context used by codec threads and stored in their AVCodecContext thread_opaque.

Definition at line 93 of file pthread.c.


Member Enumeration Documentation

anonymous enum

Enumerator:
STATE_INPUT_READY Set when the thread is awaiting a packet.
STATE_SETTING_UP Set before the codec has called ff_thread_finish_setup().
STATE_GET_BUFFER Set when the codec calls get_buffer().

State is returned to STATE_SETTING_UP afterwards.

STATE_SETUP_FINISHED Set after the codec has called ff_thread_finish_setup().

Definition at line 114 of file pthread.c.


Field Documentation

Size allocated for avpkt.data.

Definition at line 108 of file pthread.c.

Referenced by submit_packet().

Context used to decode packets passed to this thread.

Definition at line 105 of file pthread.c.

Referenced by allocate_progress(), ff_thread_decode_frame(), ff_thread_flush(), ff_thread_release_buffer(), frame_thread_free(), frame_thread_init(), frame_worker_thread(), and submit_packet().

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

Definition at line 107 of file pthread.c.

Referenced by ff_thread_decode_frame(), frame_thread_free(), frame_thread_init(), frame_worker_thread(), and submit_packet().

Output frame (for decoding) or input (for encoding).

Definition at line 110 of file pthread.c.

Referenced by ff_thread_decode_frame(), and frame_worker_thread().

The output of got_picture_ptr from the last avcodec_decode_video() call.

Definition at line 111 of file pthread.c.

Referenced by ff_thread_decode_frame(), ff_thread_flush(), frame_worker_thread(), and park_frame_worker_threads().

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

Definition at line 98 of file pthread.c.

Referenced by frame_thread_free(), frame_thread_init(), frame_worker_thread(), and submit_packet().

Mutex used to protect the contents of the PerThreadContext.

Definition at line 102 of file pthread.c.

Referenced by frame_thread_free(), frame_thread_init(), frame_worker_thread(), and submit_packet().

Definition at line 129 of file pthread.c.

Referenced by ff_thread_release_buffer(), and release_delayed_buffers().

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

Definition at line 100 of file pthread.c.

Referenced by ff_thread_decode_frame(), frame_thread_free(), frame_thread_init(), frame_worker_thread(), and park_frame_worker_threads().

Definition at line 94 of file pthread.c.

Referenced by ff_thread_get_buffer(), ff_thread_release_buffer(), frame_thread_init(), frame_worker_thread(), release_delayed_buffers(), and submit_packet().

volatile int PerThreadContext::progress[MAX_BUFFERS][2]

Array of progress values used by ff_thread_get_buffer().

Definition at line 134 of file pthread.c.

Referenced by allocate_progress(), frame_worker_thread(), and free_progress().

Used by child threads to wait for progress to change.

Definition at line 99 of file pthread.c.

Referenced by ff_thread_await_progress(), ff_thread_finish_setup(), ff_thread_get_buffer(), ff_thread_report_progress(), frame_thread_free(), frame_thread_init(), frame_worker_thread(), and submit_packet().

Mutex used to protect frame progress values and progress_cond.

Definition at line 103 of file pthread.c.

Referenced by ff_thread_await_progress(), ff_thread_decode_frame(), ff_thread_finish_setup(), ff_thread_get_buffer(), ff_thread_report_progress(), frame_thread_free(), frame_thread_init(), frame_worker_thread(), park_frame_worker_threads(), and submit_packet().

Definition at line 135 of file pthread.c.

Referenced by allocate_progress(), frame_worker_thread(), and free_progress().

Array of frames passed to ff_thread_release_buffer().

Frames are released after all threads referencing them are finished.

Definition at line 128 of file pthread.c.

Referenced by ff_thread_release_buffer(), and release_delayed_buffers().

AVFrame the codec passed to get_buffer().

Definition at line 137 of file pthread.c.

Referenced by ff_thread_get_buffer(), and submit_packet().

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

Definition at line 112 of file pthread.c.

Referenced by ff_thread_decode_frame(), ff_thread_get_buffer(), frame_worker_thread(), and submit_packet().

Referenced by ff_thread_can_start_frame(), ff_thread_decode_frame(), ff_thread_finish_setup(), ff_thread_get_buffer(), frame_worker_thread(), park_frame_worker_threads(), and submit_packet().

Definition at line 96 of file pthread.c.

Referenced by frame_thread_free(), and frame_thread_init().

Definition at line 97 of file pthread.c.

Referenced by frame_thread_free(), and frame_thread_init().


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

Generated on Fri Oct 26 02:50:16 2012 for FFmpeg by doxygen 1.5.8

AltStyle によって変換されたページ (->オリジナル) /