X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fthread.h;h=7f018fc441b68b20602fc6985255ec556932f2b0;hb=1c4ab37c38e4ede6bbdf95221ad6cbf1bbcb7e9d;hp=d9186d68506aa555079b35431b10727d4e024a4d;hpb=37b00b47cbeecd66bb34c5c7c534d016d6e8da24;p=ffmpeg diff --git a/libavcodec/thread.h b/libavcodec/thread.h index d9186d68506..7f018fc441b 100644 --- a/libavcodec/thread.h +++ b/libavcodec/thread.h @@ -1,20 +1,20 @@ /* * Copyright (c) 2008 Alexander Strange * - * This file is part of FFmpeg. + * This file is part of Libav. * - * FFmpeg is free software; you can redistribute it and/or + * Libav is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * FFmpeg is distributed in the hope that it will be useful, + * Libav is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software + * License along with Libav; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -31,17 +31,20 @@ #include "avcodec.h" /** - * Waits for decoding threads to finish and resets internal - * state. Called by avcodec_flush_buffers(). + * Wait for decoding threads to finish and reset internal state. + * Called by avcodec_flush_buffers(). * * @param avctx The context. */ void ff_thread_flush(AVCodecContext *avctx); /** - * Submits a new frame to a decoding thread. + * Submit a new frame to a decoding thread. * Returns the next available frame in picture. *got_picture_ptr * will be 0 if none is available. + * The return value on success is the size of the consumed packet for + * compatiblity with avcodec_decode_video2(). This means the decoder + * has to consume the full packet. * * Parameters are the same as avcodec_decode_video2(). */ @@ -59,8 +62,7 @@ int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture, void ff_thread_finish_setup(AVCodecContext *avctx); /** - * Notifies later decoding threads when part of their reference picture - * is ready. + * Notify later decoding threads when part of their reference picture is ready. * Call this when some part of the picture is finished decoding. * Later calls with lower values of progress have no effect. * @@ -72,7 +74,7 @@ void ff_thread_finish_setup(AVCodecContext *avctx); void ff_thread_report_progress(AVFrame *f, int progress, int field); /** - * Waits for earlier decoding threads to finish reference pictures + * Wait for earlier decoding threads to finish reference pictures. * Call this before accessing some part of a picture, with a given * value for progress, and it will return after the responsible decoding * thread calls ff_thread_report_progress() with the same or @@ -108,4 +110,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f); */ void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f); +int ff_thread_init(AVCodecContext *s); +void ff_thread_free(AVCodecContext *s); + #endif /* AVCODEC_THREAD_H */