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

Unified Diff: chrome/renderer/media/cast_threads.h

Issue 174403002: Cast: Don't create threads for each CastSessionDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SingleThreadTaskRunner Created 6 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
« no previous file with comments | « chrome/renderer/media/cast_session_delegate.cc ('k') | chrome/renderer/media/cast_threads.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/cast_threads.h
diff --git a/chrome/renderer/media/cast_threads.h b/chrome/renderer/media/cast_threads.h
new file mode 100644
index 0000000000000000000000000000000000000000..49addef564e7ed996c960149305b2c65ab15fad0
--- /dev/null
+++ b/chrome/renderer/media/cast_threads.h
@@ -0,0 +1,37 @@
+// 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.
+
+// Manages threads used by Cast Streaming Extensions API. There is a
+// singleton object of this class in the renderer.
+//
+// There are two threads owned by this class:
+// 1. Audio encode thread.
+// 2. Video encode thread.
+// These two threads are started this object is created.
+
+#ifndef CHROME_RENDERER_MEDIA_CAST_THREADS_H_
+#define CHROME_RENDERER_MEDIA_CAST_THREADS_H_
+
+#include "base/lazy_instance.h"
+#include "base/threading/thread.h"
+
+class CastThreads {
+ public:
+ scoped_refptr<base::SingleThreadTaskRunner>
+ GetAudioEncodeMessageLoopProxy();
+ scoped_refptr<base::SingleThreadTaskRunner>
+ GetVideoEncodeMessageLoopProxy();
+
+ private:
+ friend struct base::DefaultLazyInstanceTraits<CastThreads>;
+
+ CastThreads();
+
+ base::Thread audio_encode_thread_;
+ base::Thread video_encode_thread_;
+
+ DISALLOW_COPY_AND_ASSIGN(CastThreads);
+};
+
+#endif // CHROME_RENDERER_MEDIA_CAST_THREADS_H_
« no previous file with comments | « chrome/renderer/media/cast_session_delegate.cc ('k') | chrome/renderer/media/cast_threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698