diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-01-24 15:00:22 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-08-01 15:45:25 +0200 |
commit | a691878d1d2185856e9a7d83022f880df1473737 (patch) | |
tree | bd8c1dda1bf0702a9e0c8db8551f6e97f9837b92 /libavcodec/decode.h | |
parent | 6b12208646fc8dc6d28da4f5c5ae57ea91c29412 (diff) |
lavc: convert frame threading to the receive_frame() patternthread_receive
Reorganize the code such that the frame threading code does not call the
decoders directly, but instead calls back into the generic decoding
code. This avoids duplicating the logic that wraps the decoder
invocation and will be useful in the following commits.
Diffstat (limited to 'libavcodec/decode.h')
-rw-r--r-- | libavcodec/decode.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/decode.h b/libavcodec/decode.h index 1b40f714e1..3ee272ddec 100644 --- a/libavcodec/decode.h +++ b/libavcodec/decode.h @@ -94,4 +94,11 @@ int ff_copy_palette(void *dst, const AVPacket *src, void *logctx); */ int ff_decode_preinit(AVCodecContext *avctx); +/** + * Do the actual decoding and obtain a decoded frame from the decoder, if + * available. When frame threading is used, this is invoked by the worker + * threads, otherwise by the top layer directly. + */ +int ff_decode_receive_frame(AVCodecContext *avctx, AVFrame *frame); + #endif /* AVCODEC_DECODE_H */ |