OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_CAST_CAST_ENVIRONMENT_H_ | 5 #ifndef MEDIA_CAST_CAST_ENVIRONMENT_H_ |
6 #define MEDIA_CAST_CAST_ENVIRONMENT_H_ | 6 #define MEDIA_CAST_CAST_ENVIRONMENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // primarily encoding / decoding but also re-sampling. | 28 // primarily encoding / decoding but also re-sampling. |
29 AUDIO, | 29 AUDIO, |
30 // The video encoder thread is where the video processing is done. | 30 // The video encoder thread is where the video processing is done. |
31 VIDEO, | 31 VIDEO, |
32 }; | 32 }; |
33 | 33 |
34 CastEnvironment( | 34 CastEnvironment( |
35 scoped_ptr<base::TickClock> clock, | 35 scoped_ptr<base::TickClock> clock, |
36 scoped_refptr<base::SingleThreadTaskRunner> main_thread_proxy, | 36 scoped_refptr<base::SingleThreadTaskRunner> main_thread_proxy, |
37 scoped_refptr<base::SingleThreadTaskRunner> audio_thread_proxy, | 37 scoped_refptr<base::SingleThreadTaskRunner> audio_thread_proxy, |
38 scoped_refptr<base::SingleThreadTaskRunner> video_thread_proxy, | 38 scoped_refptr<base::SingleThreadTaskRunner> video_thread_proxy); |
39 const CastLoggingConfig& logging_config); | |
40 | 39 |
41 // These are the same methods in message_loop.h, but are guaranteed to either | 40 // These are the same methods in message_loop.h, but are guaranteed to either |
42 // get posted to the MessageLoop if it's still alive, or be deleted otherwise. | 41 // get posted to the MessageLoop if it's still alive, or be deleted otherwise. |
43 // They return true iff the thread existed and the task was posted. Note that | 42 // They return true iff the thread existed and the task was posted. Note that |
44 // even if the task is posted, there's no guarantee that it will run, since | 43 // even if the task is posted, there's no guarantee that it will run, since |
45 // the target thread may already have a Quit message in its queue. | 44 // the target thread may already have a Quit message in its queue. |
46 bool PostTask(ThreadId identifier, | 45 bool PostTask(ThreadId identifier, |
47 const tracked_objects::Location& from_here, | 46 const tracked_objects::Location& from_here, |
48 const base::Closure& task); | 47 const base::Closure& task); |
49 | 48 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 scoped_ptr<base::TickClock> clock_; | 86 scoped_ptr<base::TickClock> clock_; |
88 scoped_ptr<LoggingImpl> logging_; | 87 scoped_ptr<LoggingImpl> logging_; |
89 | 88 |
90 DISALLOW_COPY_AND_ASSIGN(CastEnvironment); | 89 DISALLOW_COPY_AND_ASSIGN(CastEnvironment); |
91 }; | 90 }; |
92 | 91 |
93 } // namespace cast | 92 } // namespace cast |
94 } // namespace media | 93 } // namespace media |
95 | 94 |
96 #endif // MEDIA_CAST_CAST_ENVIRONMENT_H_ | 95 #endif // MEDIA_CAST_CAST_ENVIRONMENT_H_ |
OLD | NEW |