FFmpeg
|
Go to the source code of this file.
Data Structures | |
struct | ProgressFrame |
The ProgressFrame structure. More... | |
Functions | |
void | ff_progress_frame_report (ProgressFrame *f, int progress) |
Notify later decoding threads when part of their reference frame is ready. More... | |
void | ff_progress_frame_await (const ProgressFrame *f, int progress) |
Wait for earlier decoding threads to finish reference frames. More... | |
int | ff_progress_frame_alloc (struct AVCodecContext *avctx, ProgressFrame *f) |
This function allocates ProgressFrame.f May be called before ff_progress_frame_get_buffer() in the cases where the AVFrame needs to be accessed before the ff_thread_get_buffer() call in ff_progress_frame_alloc(). More... | |
int | ff_progress_frame_get_buffer (struct AVCodecContext *avctx, ProgressFrame *f, int flags) |
This function sets up the ProgressFrame, i.e. More... | |
void | ff_progress_frame_unref (ProgressFrame *f) |
Give up a reference to the underlying frame contained in a ProgressFrame and reset the ProgressFrame, setting all pointers to NULL. More... | |
void | ff_progress_frame_ref (ProgressFrame *dst, const ProgressFrame *src) |
Set dst->f to src->f and make dst a co-owner of src->f. More... | |
void | ff_progress_frame_replace (ProgressFrame *dst, const ProgressFrame *src) |
Do nothing if dst and src already refer to the same AVFrame; otherwise unreference dst and if src is not blank, put a reference to src's AVFrame in its place (in case src is not blank). More... | |
void ff_progress_frame_report | ( | ProgressFrame * | f, |
int | progress | ||
) |
Notify later decoding threads when part of their reference frame is ready.
Call this when some part of the frame is finished decoding. Later calls with lower values of progress have no effect.
f | The frame being decoded. |
progress | Value, in arbitrary units, of how much of the frame has decoded. |
Definition at line 1888 of file decode.c.
Referenced by decode(), decode_frame(), decode_frame_common(), decode_nal_units(), decode_slice(), decode_tiles(), ff_hevc_hls_filter(), generate_missing_ref(), mimic_decode_frame(), vp3_draw_horiz_band(), vp78_decode_frame(), vp78_decode_mb_row_sliced(), and vp9_decode_frame().
void ff_progress_frame_await | ( | const ProgressFrame * | f, |
int | progress | ||
) |
Wait for earlier decoding threads to finish reference frames.
Call this before accessing some part of a frame, with a given value for progress, and it will return after the responsible decoding thread calls ff_thread_progress_report() with the same or higher value for progress.
f | The frame being referenced. |
progress | Value, in arbitrary units, to wait for. |
int ff_progress_frame_alloc | ( | struct AVCodecContext * | avctx, |
ProgressFrame * | f | ||
) |
This function allocates ProgressFrame.f May be called before ff_progress_frame_get_buffer() in the cases where the AVFrame needs to be accessed before the ff_thread_get_buffer() call in ff_progress_frame_alloc().
Definition at line 1829 of file decode.c.
Referenced by alloc_frame(), and ff_progress_frame_get_buffer().
int ff_progress_frame_get_buffer | ( | struct AVCodecContext * | avctx, |
ProgressFrame * | f, | ||
int | flags | ||
) |
This function sets up the ProgressFrame, i.e.
allocates ProgressFrame.f if needed, and also calls ff_thread_get_buffer() on the frame.
Definition at line 1843 of file decode.c.
Referenced by alloc_frame(), av1_frame_alloc(), decode_frame(), decode_idat_chunk(), mimic_decode_frame(), vp8_alloc_frame(), and vp9_frame_alloc().
void ff_progress_frame_unref | ( | ProgressFrame * | f | ) |
Give up a reference to the underlying frame contained in a ProgressFrame and reset the ProgressFrame, setting all pointers to NULL.
Definition at line 1871 of file decode.c.
Referenced by av1_frame_unref(), decode_frame(), decode_idat_chunk(), ff_hevc_unref_frame(), ff_progress_frame_replace(), ffv1_decode_close(), mimic_decode_end(), mimic_decode_frame(), png_dec_end(), update_frames(), vp3_decode_flush(), vp8_alloc_frame(), vp8_release_frame(), vp9_decode_flush(), vp9_decode_free(), and vp9_frame_unref().
void ff_progress_frame_ref | ( | ProgressFrame * | dst, |
const ProgressFrame * | src | ||
) |
Set dst->f to src->f and make dst a co-owner of src->f.
dst can then be used to wait on progress of the underlying frame.
Definition at line 1863 of file decode.c.
Referenced by ff_progress_frame_replace(), and hevc_ref_frame().
void ff_progress_frame_replace | ( | ProgressFrame * | dst, |
const ProgressFrame * | src | ||
) |
Do nothing if dst and src already refer to the same AVFrame; otherwise unreference dst and if src is not blank, put a reference to src's AVFrame in its place (in case src is not blank).
Definition at line 1878 of file decode.c.
Referenced by av1_frame_replace(), update_frames(), vp9_decode_frame(), and vp9_frame_replace().