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

Side by Side Diff: media/cast/cast_environment.h

Issue 145443005: Fixes for memory and threading issues in cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/audio_sender/audio_sender_unittest.cc ('k') | media/cast/cast_environment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « media/cast/audio_sender/audio_sender_unittest.cc ('k') | media/cast/cast_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698