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

Unified Diff: media/filters/ffmpeg_demuxer.h

Issue 2710133003: Replace FFmpegDemuxer thread per element with base::TaskScheduler. (Closed)
Patch Set: Use base::TaskScheduler. Created 3 years, 10 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_demuxer.h
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index 84a8051e234975523382deaf8e16a65bac3f8769..306ff3a67b0dfc1c8b92bb079828bbaf0c5bcaa5 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -32,7 +32,9 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/threading/thread.h"
+#include "base/memory/weak_ptr.h"
+#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decoder_buffer_queue.h"
@@ -294,8 +296,11 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
- // Thread on which all blocking FFmpeg operations are executed.
- base::Thread blocking_thread_;
+ // Blocking pool on which all blocking FFmpeg operations are executed.
gab 2017/02/23 21:37:10 nit: A SequencedTaskRunner isn't a "pool", it's a
DaleCurtis 2017/02/23 23:07:06 We definitely want sequence here. Updated the comm
+ scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
+
+ // Indicates if Stop() has been called.
+ bool stopped_;
// Tracks if there's an outstanding av_read_frame() operation.
//

Powered by Google App Engine
This is Rietveld 408576698