| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_CODEC_PLAYER_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_ |
| 7 | 7 |
| 8 #include "base/android/scoped_java_ref.h" | 8 #include "base/android/scoped_java_ref.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // StopDone -- -- | 152 // StopDone -- -- |
| 153 // w/pending seek: | 153 // w/pending seek: |
| 154 // demuxer.RequestSeek | 154 // demuxer.RequestSeek |
| 155 | 155 |
| 156 namespace media { | 156 namespace media { |
| 157 | 157 |
| 158 class BrowserCdm; | 158 class BrowserCdm; |
| 159 class MediaCodecAudioDecoder; | 159 class MediaCodecAudioDecoder; |
| 160 class MediaCodecVideoDecoder; | 160 class MediaCodecVideoDecoder; |
| 161 | 161 |
| 162 // Returns the task runner for the media thread | |
| 163 MEDIA_EXPORT scoped_refptr<base::SingleThreadTaskRunner> GetMediaTaskRunner(); | |
| 164 | |
| 165 class MEDIA_EXPORT MediaCodecPlayer : public MediaPlayerAndroid, | 162 class MEDIA_EXPORT MediaCodecPlayer : public MediaPlayerAndroid, |
| 166 public DemuxerAndroidClient { | 163 public DemuxerAndroidClient { |
| 167 public: | 164 public: |
| 168 // Typedefs for the notification callbacks | 165 // Typedefs for the notification callbacks |
| 169 typedef base::Callback<void(base::TimeDelta, const gfx::Size&)> | 166 typedef base::Callback<void(base::TimeDelta, const gfx::Size&)> |
| 170 MetadataChangedCallback; | 167 MetadataChangedCallback; |
| 171 | 168 |
| 172 typedef base::Callback<void(base::TimeDelta, base::TimeTicks)> | 169 typedef base::Callback<void(base::TimeDelta, base::TimeTicks)> |
| 173 TimeUpdateCallback; | 170 TimeUpdateCallback; |
| 174 | 171 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 base::WeakPtr<MediaCodecPlayer> media_weak_this_; | 386 base::WeakPtr<MediaCodecPlayer> media_weak_this_; |
| 390 // NOTE: Weak pointers must be invalidated before all other member variables. | 387 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 391 base::WeakPtrFactory<MediaCodecPlayer> media_weak_factory_; | 388 base::WeakPtrFactory<MediaCodecPlayer> media_weak_factory_; |
| 392 | 389 |
| 393 DISALLOW_COPY_AND_ASSIGN(MediaCodecPlayer); | 390 DISALLOW_COPY_AND_ASSIGN(MediaCodecPlayer); |
| 394 }; | 391 }; |
| 395 | 392 |
| 396 } // namespace media | 393 } // namespace media |
| 397 | 394 |
| 398 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_ | 395 #endif // MEDIA_BASE_ANDROID_MEDIA_CODEC_PLAYER_H_ |
| OLD | NEW |