| @@ -102,12 +102,24 @@ void ff_progress_frame_report(ProgressFrame *f, int progress); · 101 unmodified lines |
| 102 | void ff_progress_frame_await(const ProgressFrame *f, int progress); | 102 | void ff_progress_frame_await(const ProgressFrame *f, int progress); |
| 103 | | 103 | |
| 104 | /** | 104 | /** |
| 105 | * This function sets up the ProgressFrame, i.e. gets ProgressFrame.f | 105 | * This function allocates ProgressFrame.f |
| 106 | * and also calls ff_thread_get_buffer() on the frame. | 106 | * May be called before ff_progress_frame_get_buffer() in the cases where the |
| | 107 | * AVFrame needs to be accessed before the ff_thread_get_buffer() call in |
| | 108 | * ff_progress_frame_alloc(). |
| 107 | * | 109 | * |
| 108 | * @note: This must only be called by codecs with the | 110 | * @note: This must only be called by codecs with the |
| 109 | * FF_CODEC_CAP_USES_PROGRESSFRAMES internal cap. | 111 | * FF_CODEC_CAP_USES_PROGRESSFRAMES internal cap. |
| 110 | */ | 112 | */ |
| | 113 | int ff_progress_frame_alloc(struct AVCodecContext *avctx, ProgressFrame *f); |
| | 114 | |
| | 115 | /** |
| | 116 | * This function sets up the ProgressFrame, i.e. allocates ProgressFrame.f |
| | 117 | * if needed, and also calls ff_thread_get_buffer() on the frame. |
| | 118 | * |
| | 119 | * @note: This must only be called by codecs with the |
| | 120 | * FF_CODEC_CAP_USES_PROGRESSFRAMES internal cap. |
| | 121 | * @see ff_progress_frame_alloc |
| | 122 | */ |
| 111 | int ff_progress_frame_get_buffer(struct AVCodecContext *avctx, | 123 | int ff_progress_frame_get_buffer(struct AVCodecContext *avctx, |
| 112 | ProgressFrame *f, int flags); | 124 | ProgressFrame *f, int flags); |
| 113 | | 125 | |