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

Side by Side Diff: chromecast/media/cma/pipeline/av_pipeline_impl.h

Issue 1005703002: Chromecast: use weak pointers for AvPipelineImpl callbacks on CMA thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | chromecast/media/cma/pipeline/av_pipeline_impl.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 2014 The Chromium Authors. All rights reserved. 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 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 CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_ 5 #ifndef CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_ 6 #define CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/weak_ptr.h"
13 #include "base/synchronization/lock.h" 14 #include "base/synchronization/lock.h"
14 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
15 #include "chromecast/media/cma/backend/media_component_device.h" 16 #include "chromecast/media/cma/backend/media_component_device.h"
16 #include "chromecast/media/cma/pipeline/av_pipeline_client.h" 17 #include "chromecast/media/cma/pipeline/av_pipeline_client.h"
17 18
18 namespace media { 19 namespace media {
19 class AudioDecoderConfig; 20 class AudioDecoderConfig;
20 class VideoDecoderConfig; 21 class VideoDecoderConfig;
21 } 22 }
22 23
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // The media time is retrieved at regular intervals. 161 // The media time is retrieved at regular intervals.
161 // Indicate whether time update is enabled. 162 // Indicate whether time update is enabled.
162 bool enable_time_update_; 163 bool enable_time_update_;
163 bool pending_time_update_task_; 164 bool pending_time_update_task_;
164 165
165 // Decryption keys, if available. 166 // Decryption keys, if available.
166 base::Lock media_keys_lock_; 167 base::Lock media_keys_lock_;
167 BrowserCdmCast* media_keys_; 168 BrowserCdmCast* media_keys_;
168 int media_keys_callback_id_; 169 int media_keys_callback_id_;
169 170
171 base::WeakPtr<AvPipelineImpl> weak_this_;
172 base::WeakPtrFactory<AvPipelineImpl> weak_factory_;
173
170 DISALLOW_COPY_AND_ASSIGN(AvPipelineImpl); 174 DISALLOW_COPY_AND_ASSIGN(AvPipelineImpl);
171 }; 175 };
172 176
173 } // namespace media 177 } // namespace media
174 } // namespace chromecast 178 } // namespace chromecast
175 179
176 #endif // CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_ 180 #endif // CHROMECAST_MEDIA_CMA_BASE_AV_PIPELINE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chromecast/media/cma/pipeline/av_pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698