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

Unified Diff: media/base/android/media_codec_loop.h

Issue 2491613004: Make base::Timer sequence-friendly. (Closed)
Patch Set: add back commented out DCHECK in Stop() Created 3 years, 7 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/base/android/media_codec_loop.h
diff --git a/media/base/android/media_codec_loop.h b/media/base/android/media_codec_loop.h
index 2ee738cf1c5ab03062b947121ada0f82461e8c46..15110feba0f38928f7c002fb452cbd09014b7a8b 100644
--- a/media/base/android/media_codec_loop.h
+++ b/media/base/android/media_codec_loop.h
@@ -11,7 +11,9 @@
#include <vector>
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/single_thread_task_runner.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
@@ -101,10 +103,6 @@
// | |
// [Ready] [Error]
-namespace base {
-class SingleThreadTaskRunner;
-}
-
namespace media {
class MEDIA_EXPORT MediaCodecLoop {
@@ -197,15 +195,15 @@ class MEDIA_EXPORT MediaCodecLoop {
virtual ~Client() {}
};
- // We will take ownership of |media_codec|. We will not destroy it until
- // we are destructed. |media_codec| may not be null.
- // |sdk_level| is temporary. It is used only to decouple MediaCodecLoop from
- // BuildInfo, until we get BuildInfo into a mockable state.
+ // We will take ownership of |media_codec|. We will not destroy it until we
+ // are destructed. |media_codec| may not be null. |sdk_level| is temporary.
+ // It is used only to decouple MediaCodecLoop from BuildInfo, until we get
+ // BuildInfo into a mockable state. If |timer_task_runner| is non-null,
+ // timers are redirected to it.
MediaCodecLoop(int sdk_level,
Client* client,
std::unique_ptr<MediaCodecBridge> media_codec,
- scoped_refptr<base::SingleThreadTaskRunner> =
- scoped_refptr<base::SingleThreadTaskRunner>());
+ scoped_refptr<base::SingleThreadTaskRunner> timer_task_runner);
~MediaCodecLoop();
// Optionally set the tick clock used for testing. It is our caller's
« no previous file with comments | « content/browser/service_worker/service_worker_job_unittest.cc ('k') | media/base/android/media_codec_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698