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

Unified Diff: media/cast/test/utility/standalone_cast_environment.h

Issue 184813009: Cast Streaming API end-to-end browser_test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix LoggingImplTest + REBASE Created 6 years, 9 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
« no previous file with comments | « media/cast/test/utility/input_builder.cc ('k') | media/cast/test/utility/standalone_cast_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/utility/standalone_cast_environment.h
diff --git a/media/cast/test/utility/standalone_cast_environment.h b/media/cast/test/utility/standalone_cast_environment.h
new file mode 100644
index 0000000000000000000000000000000000000000..39c6e7ca2c5f276a11af6440b6f4afd84212927c
--- /dev/null
+++ b/media/cast/test/utility/standalone_cast_environment.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_CAST_TEST_UTILITY_STANDALONE_CAST_ENVIRONMENT_H_
+#define MEDIA_CAST_TEST_UTILITY_STANDALONE_CAST_ENVIRONMENT_H_
+
+#include "base/threading/thread.h"
+#include "base/threading/thread_checker.h"
+#include "media/cast/cast_environment.h"
+
+namespace media {
+namespace cast {
+
+// A complete CastEnvironment where all task runners are spurned from
+// internally-owned threads. Uses base::DefaultTickClock as a clock.
+class StandaloneCastEnvironment : public CastEnvironment,
+ public base::ThreadChecker {
+ public:
+ explicit StandaloneCastEnvironment(const CastLoggingConfig& logging_config);
+
+ // Stops all threads backing the task runners, blocking the caller until
+ // complete.
+ void Shutdown();
+
+ private:
+ virtual ~StandaloneCastEnvironment();
+
+ base::Thread main_thread_;
+ base::Thread audio_encode_thread_;
+ base::Thread audio_decode_thread_;
+ base::Thread video_encode_thread_;
+ base::Thread video_decode_thread_;
+ base::Thread transport_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(StandaloneCastEnvironment);
+};
+
+} // namespace cast
+} // namespace media
+
+#endif // MEDIA_CAST_TEST_UTILITY_STANDALONE_CAST_ENVIRONMENT_H_
« no previous file with comments | « media/cast/test/utility/input_builder.cc ('k') | media/cast/test/utility/standalone_cast_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698