Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Unified Diff: media/filters/ffmpeg_video_decoder.cc

Issue 148423005: Use FF_THREAD_SLICE threading mode in FFmpeg for MediaSource streams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/ffmpeg_video_decoder.cc
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
index ff14e89d3711196a713a3e562ee2d975fae758d9..1d784c73961c79081b2328d0aded98b5a4ae4902 100644
--- a/media/filters/ffmpeg_video_decoder.cc
+++ b/media/filters/ffmpeg_video_decoder.cc
@@ -55,8 +55,10 @@ static int GetThreadCount(AVCodecID codec_id) {
}
FFmpegVideoDecoder::FFmpegVideoDecoder(
- const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
+ const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
+ ThreadingMode threading_mode)
: task_runner_(task_runner),
+ threading_mode_(threading_mode),
weak_factory_(this),
state_(kUninitialized) {
}
@@ -369,6 +371,8 @@ bool FFmpegVideoDecoder::ConfigureDecoder() {
// for damaged macroblocks, and set our error detection sensitivity.
codec_context_->error_concealment = FF_EC_GUESS_MVS | FF_EC_DEBLOCK;
codec_context_->thread_count = GetThreadCount(codec_context_->codec_id);
+ codec_context_->thread_type =
+ threading_mode_ == THREADING_SLICE ? FF_THREAD_SLICE : FF_THREAD_FRAME;
codec_context_->opaque = this;
codec_context_->flags |= CODEC_FLAG_EMU_EDGE;
codec_context_->get_buffer = GetVideoBufferImpl;

Powered by Google App Engine
This is Rietveld 408576698