| 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 20 matching lines...) Expand all Loading... |
| 31 // done, primarily decoding but also error concealment and re-sampling. | 31 // done, primarily decoding but also error concealment and re-sampling. |
| 32 AUDIO_DECODER, | 32 AUDIO_DECODER, |
| 33 // The video encoder thread is where the video encode processing is done. | 33 // The video encoder thread is where the video encode processing is done. |
| 34 VIDEO_ENCODER, | 34 VIDEO_ENCODER, |
| 35 // The video decoder thread is where the video decode processing is done. | 35 // The video decoder thread is where the video decode processing is done. |
| 36 VIDEO_DECODER, | 36 VIDEO_DECODER, |
| 37 // The transport thread is where the transport processing is done. | 37 // The transport thread is where the transport processing is done. |
| 38 TRANSPORT, | 38 TRANSPORT, |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 CastEnvironment(base::TickClock* clock, | 41 CastEnvironment(scoped_ptr<base::TickClock> clock, |
| 42 scoped_refptr<base::TaskRunner> main_thread_proxy, | 42 scoped_refptr<base::TaskRunner> main_thread_proxy, |
| 43 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy, | 43 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy, |
| 44 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy, | 44 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy, |
| 45 scoped_refptr<base::TaskRunner> video_encode_thread_proxy, | 45 scoped_refptr<base::TaskRunner> video_encode_thread_proxy, |
| 46 scoped_refptr<base::TaskRunner> video_decode_thread_proxy, | 46 scoped_refptr<base::TaskRunner> video_decode_thread_proxy, |
| 47 scoped_refptr<base::TaskRunner> transport_thread_proxy, | 47 scoped_refptr<base::TaskRunner> transport_thread_proxy, |
| 48 const CastLoggingConfig& config); | 48 const CastLoggingConfig& config); |
| 49 | 49 |
| 50 // These are the same methods in message_loop.h, but are guaranteed to either | 50 // These are the same methods in message_loop.h, but are guaranteed to either |
| 51 // get posted to the MessageLoop if it's still alive, or be deleted otherwise. | 51 // get posted to the MessageLoop if it's still alive, or be deleted otherwise. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 70 | 70 |
| 71 scoped_refptr<base::TaskRunner> GetMessageTaskRunnerForThread( | 71 scoped_refptr<base::TaskRunner> GetMessageTaskRunnerForThread( |
| 72 ThreadId identifier); | 72 ThreadId identifier); |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 virtual ~CastEnvironment(); | 75 virtual ~CastEnvironment(); |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 friend class base::RefCountedThreadSafe<CastEnvironment>; | 78 friend class base::RefCountedThreadSafe<CastEnvironment>; |
| 79 | 79 |
| 80 base::TickClock* const clock_; // Not owned by this class. | 80 scoped_ptr<base::TickClock> clock_; |
| 81 scoped_refptr<base::TaskRunner> main_thread_proxy_; | 81 scoped_refptr<base::TaskRunner> main_thread_proxy_; |
| 82 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy_; | 82 scoped_refptr<base::TaskRunner> audio_encode_thread_proxy_; |
| 83 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy_; | 83 scoped_refptr<base::TaskRunner> audio_decode_thread_proxy_; |
| 84 scoped_refptr<base::TaskRunner> video_encode_thread_proxy_; | 84 scoped_refptr<base::TaskRunner> video_encode_thread_proxy_; |
| 85 scoped_refptr<base::TaskRunner> video_decode_thread_proxy_; | 85 scoped_refptr<base::TaskRunner> video_decode_thread_proxy_; |
| 86 scoped_refptr<base::TaskRunner> transport_thread_proxy_; | 86 scoped_refptr<base::TaskRunner> transport_thread_proxy_; |
| 87 | 87 |
| 88 scoped_ptr<LoggingImpl> logging_; | 88 scoped_ptr<LoggingImpl> logging_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(CastEnvironment); | 90 DISALLOW_COPY_AND_ASSIGN(CastEnvironment); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace cast | 93 } // namespace cast |
| 94 } // namespace media | 94 } // namespace media |
| 95 | 95 |
| 96 #endif // MEDIA_CAST_CAST_ENVIRONMENT_H_ | 96 #endif // MEDIA_CAST_CAST_ENVIRONMENT_H_ |
| OLD | NEW |