OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
6 #define MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 bool is_waiting_for_audio_decoder_; | 266 bool is_waiting_for_audio_decoder_; |
267 bool is_waiting_for_video_decoder_; | 267 bool is_waiting_for_video_decoder_; |
268 | 268 |
269 // Test-only callback for hooking the completion of the next decode cycle. | 269 // Test-only callback for hooking the completion of the next decode cycle. |
270 base::Closure decode_callback_for_testing_; | 270 base::Closure decode_callback_for_testing_; |
271 | 271 |
272 // Whether audio or video decoder is in the process of prerolling. | 272 // Whether audio or video decoder is in the process of prerolling. |
273 bool prerolling_; | 273 bool prerolling_; |
274 | 274 |
275 // Weak pointer passed to media decoder jobs for callbacks. | 275 // Weak pointer passed to media decoder jobs for callbacks. |
| 276 base::WeakPtr<MediaSourcePlayer> weak_this_; |
276 // NOTE: Weak pointers must be invalidated before all other member variables. | 277 // NOTE: Weak pointers must be invalidated before all other member variables. |
277 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; | 278 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; |
278 base::WeakPtr<MediaSourcePlayer> weak_this_; | |
279 | 279 |
280 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 280 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
281 }; | 281 }; |
282 | 282 |
283 } // namespace media | 283 } // namespace media |
284 | 284 |
285 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 285 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |