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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 bool is_audio, MediaCodecStatus status, | 87 bool is_audio, MediaCodecStatus status, |
88 base::TimeDelta current_presentation_timestamp, | 88 base::TimeDelta current_presentation_timestamp, |
89 base::TimeDelta max_presentation_timestamp); | 89 base::TimeDelta max_presentation_timestamp); |
90 | 90 |
91 bool IsPrerollFinished(bool is_audio) const; | 91 bool IsPrerollFinished(bool is_audio) const; |
92 | 92 |
93 // Gets MediaCrypto object from |drm_bridge_|. | 93 // Gets MediaCrypto object from |drm_bridge_|. |
94 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto(); | 94 base::android::ScopedJavaLocalRef<jobject> GetMediaCrypto(); |
95 | 95 |
96 // Callback to notify that MediaCrypto is ready in |drm_bridge_|. | 96 // Callback to notify that MediaCrypto is ready in |drm_bridge_|. |
97 void OnMediaCryptoReady(); | 97 void OnMediaCryptoReady(MediaDrmBridge::JavaObjectPtr media_crypto, |
| 98 bool needs_protected_surface); |
98 | 99 |
99 // Handle pending events if all the decoder jobs are not currently decoding. | 100 // Handle pending events if all the decoder jobs are not currently decoding. |
100 void ProcessPendingEvents(); | 101 void ProcessPendingEvents(); |
101 | 102 |
102 // Flush the decoders and clean up all the data needs to be decoded. | 103 // Flush the decoders and clean up all the data needs to be decoded. |
103 void ClearDecodingData(); | 104 void ClearDecodingData(); |
104 | 105 |
105 // Called to decode more data. | 106 // Called to decode more data. |
106 void DecodeMoreAudio(); | 107 void DecodeMoreAudio(); |
107 void DecodeMoreVideo(); | 108 void DecodeMoreVideo(); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 base::WeakPtr<MediaSourcePlayer> weak_this_; | 272 base::WeakPtr<MediaSourcePlayer> weak_this_; |
272 // NOTE: Weak pointers must be invalidated before all other member variables. | 273 // NOTE: Weak pointers must be invalidated before all other member variables. |
273 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; | 274 base::WeakPtrFactory<MediaSourcePlayer> weak_factory_; |
274 | 275 |
275 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); | 276 DISALLOW_COPY_AND_ASSIGN(MediaSourcePlayer); |
276 }; | 277 }; |
277 | 278 |
278 } // namespace media | 279 } // namespace media |
279 | 280 |
280 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ | 281 #endif // MEDIA_BASE_ANDROID_MEDIA_SOURCE_PLAYER_H_ |
OLD | NEW |