diff --git a/src/codec/video/VideoDecoderFFmpegHW.cpp b/src/codec/video/VideoDecoderFFmpegHW.cpp index 715a1de4..a7498bf0 100644 --- a/src/codec/video/VideoDecoderFFmpegHW.cpp +++ b/src/codec/video/VideoDecoderFFmpegHW.cpp @@ -1,8 +1,8 @@ /****************************************************************************** - QtAV: Media play library based on Qt and FFmpeg - Copyright (C) 2013-2015 Wang Bin + QtAV: Multimedia framework based on Qt and FFmpeg + Copyright (C) 2012-2016 Wang Bin -* This file is part of QtAV +* This file is part of QtAV (from 2013) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -114,6 +114,7 @@ bool VideoDecoderFFmpegHWPrivate::prepare() { //// From vlc begin codec_ctx->thread_safe_callbacks = true; //? + codec_ctx->thread_count = threads; #ifdef _MSC_VER #pragma warning(disable:4065) //vc: switch has default but no case #endif //_MSC_VER @@ -225,8 +226,9 @@ VideoDecoderFFmpegHW::VideoDecoderFFmpegHW(VideoDecoderFFmpegHWPrivate &d): .arg(tr("Not implemented for all codecs")) .arg(tr("OptimizedCopy: copy from USWC memory optimized by SSE4.1")) .arg(tr("GenericCopy: slowest. Generic cpu copy"))); - setProperty("detail_threads", QString("%1\n%2\n%3") + setProperty("detail_threads", QString("%1\n%2\n%3\n%4") .arg(tr("Number of decoding threads. Set before open. Maybe no effect for some decoders")) + .arg(tr("Multithread decoding may crash")) .arg(tr("0: auto")) .arg(tr("1: single thread decoding"))); Q_UNUSED(QObject::tr("ZeroCopy")); diff --git a/src/codec/video/VideoDecoderFFmpegHW.h b/src/codec/video/VideoDecoderFFmpegHW.h index 957f1349..28383ecd 100644 --- a/src/codec/video/VideoDecoderFFmpegHW.h +++ b/src/codec/video/VideoDecoderFFmpegHW.h @@ -1,8 +1,8 @@ /****************************************************************************** - QtAV: Media play library based on Qt and FFmpeg - Copyright (C) 2013-2015 Wang Bin + QtAV: Multimedia framework based on Qt and FFmpeg + Copyright (C) 2012-2016 Wang Bin -* This file is part of QtAV +* This file is part of QtAV (from 2013) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/src/codec/video/VideoDecoderFFmpegHW_p.h b/src/codec/video/VideoDecoderFFmpegHW_p.h index 28cf768d..3ee84c04 100644 --- a/src/codec/video/VideoDecoderFFmpegHW_p.h +++ b/src/codec/video/VideoDecoderFFmpegHW_p.h @@ -1,8 +1,8 @@ /****************************************************************************** - QtAV: Media play library based on Qt and FFmpeg - Copyright (C) 2013-2015 Wang Bin + QtAV: Multimedia framework based on Qt and FFmpeg + Copyright (C) 2012-2016 Wang Bin -* This file is part of QtAV +* This file is part of QtAV (from 2013) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -83,7 +83,7 @@ public: int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags); QString description; - int threads; + int threads; // multithread decoding may crash for some decoders (dxva, videotoolbox) // false for not intel gpu. my test result is intel gpu is supper fast and lower cpu usage if use optimized uswc copy. but nv is worse. // TODO: flag enable, disable, auto VideoDecoderFFmpegHW::CopyMode copy_mode;