| @@ -20,7 +20,7 @@ · 19 unmodified lines |
| 20 | | 20 | |
| 21 | /** | 21 | /** |
| 22 | * @file | 22 | * @file |
| 23 | * Multithreading support functions | 23 | * Multithreading API for decoders |
| 24 | * @author Alexander Strange <astrange@ithinksw.com> | 24 | * @author Alexander Strange <astrange@ithinksw.com> |
| 25 | */ | 25 | */ |
| 26 | | 26 | |
| @@ -31,27 +31,6 @@ · 4 unmodified lines |
| 31 | | 31 | |
| 32 | #include "avcodec.h" | 32 | #include "avcodec.h" |
| 33 | | 33 | |
| 34 | /** | | |
| 35 | * Wait for decoding threads to finish and reset internal state. | | |
| 36 | * Called by avcodec_flush_buffers(). | | |
| 37 | * | | |
| 38 | * @param avctx The context. | | |
| 39 | */ | | |
| 40 | void ff_thread_flush(AVCodecContext *avctx); | | |
| 41 | | | |
| 42 | /** | | |
| 43 | * Submit a new frame to a decoding thread. | | |
| 44 | * Returns the next available frame in picture. *got_picture_ptr | | |
| 45 | * will be 0 if none is available. | | |
| 46 | * The return value on success is the size of the consumed packet for | | |
| 47 | * compatibility with FFCodec.decode. This means the decoder | | |
| 48 | * has to consume the full packet. | | |
| 49 | * | | |
| 50 | * Parameters are the same as FFCodec.decode. | | |
| 51 | */ | | |
| 52 | int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture, | | |
| 53 | int *got_picture_ptr, AVPacket *avpkt); | | |
| 54 | | | |
| 55 | int ff_thread_can_start_frame(AVCodecContext *avctx); | 34 | int ff_thread_can_start_frame(AVCodecContext *avctx); |
| 56 | | 35 | |
| 57 | /** | 36 | /** |
| @@ -74,11 +53,9 @@ void ff_thread_finish_setup(AVCodecContext *avctx); · 16 unmodified lines |
| 74 | */ | 53 | */ |
| 75 | int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags); | 54 | int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags); |
| 76 | | 55 | |
| 77 | int ff_thread_init(AVCodecContext *s); | | |
| 78 | int ff_slice_thread_execute_with_mainfunc(AVCodecContext *avctx, | 56 | int ff_slice_thread_execute_with_mainfunc(AVCodecContext *avctx, |
| 79 | int (*action_func2)(AVCodecContext *c, void *arg, int jobnr, int threadnr), | 57 | int (*action_func2)(AVCodecContext *c, void *arg, int jobnr, int threadnr), |
| 80 | int (*main_func)(AVCodecContext *c), void *arg, int *ret, int job_count); | 58 | int (*main_func)(AVCodecContext *c), void *arg, int *ret, int job_count); |
| 81 | void ff_thread_free(AVCodecContext *s); | | |
| 82 | int ff_slice_thread_allocz_entries(AVCodecContext *avctx, int count); | 59 | int ff_slice_thread_allocz_entries(AVCodecContext *avctx, int count); |
| 83 | int ff_slice_thread_init_progress(AVCodecContext *avctx); | 60 | int ff_slice_thread_init_progress(AVCodecContext *avctx); |
| 84 | void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n); | 61 | void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n); |