Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Manages threads used by Cast Streaming Extensions API. There is a | |
| 6 // singleton object of this class in the renderer. | |
| 7 // | |
| 8 // There are two threads owned by this class: | |
| 9 // 1. Audio encode thread. | |
| 10 // 2. Video encode thread. | |
| 11 // These two threads are started this object is created. | |
| 12 | |
| 13 #ifndef CHROME_RENDERER_MEDIA_CAST_THREADS_H_ | |
| 14 #define CHROME_RENDERER_MEDIA_CAST_THREADS_H_ | |
| 15 | |
| 16 #include "base/lazy_instance.h" | |
| 17 #include "base/threading/thread.h" | |
| 18 | |
| 19 class CastThreads { | |
| 20 public: | |
| 21 scoped_refptr<base::MessageLoopProxy> GetAudioEncodeMessageLoopProxy(); | |
|
scherkus (not reviewing)
2014/02/22 01:08:27
should these be base::SingleThreadTaskRunners inst
| |
| 22 scoped_refptr<base::MessageLoopProxy> GetVideoEncodeMessageLoopProxy(); | |
| 23 | |
| 24 private: | |
| 25 friend struct base::DefaultLazyInstanceTraits<CastThreads>; | |
| 26 | |
| 27 CastThreads(); | |
| 28 | |
| 29 base::Thread audio_encode_thread_; | |
| 30 base::Thread video_encode_thread_; | |
| 31 | |
| 32 DISALLOW_COPY_AND_ASSIGN(CastThreads); | |
| 33 }; | |
| 34 | |
| 35 #endif // CHROME_RENDERER_MEDIA_CAST_THREADS_H_ | |
| OLD | NEW |