| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PLAYER_BRIDGE_H_ | 5 #ifndef MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
| 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 6 #define MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // credentials are retrieved. | 131 // credentials are retrieved. |
| 132 void OnAuthCredentialsRetrieved( | 132 void OnAuthCredentialsRetrieved( |
| 133 const base::string16& username, const base::string16& password); | 133 const base::string16& username, const base::string16& password); |
| 134 | 134 |
| 135 // Extract the media metadata from a url, asynchronously. | 135 // Extract the media metadata from a url, asynchronously. |
| 136 // OnMediaMetadataExtracted() will be called when this call finishes. | 136 // OnMediaMetadataExtracted() will be called when this call finishes. |
| 137 void ExtractMediaMetadata(const std::string& url); | 137 void ExtractMediaMetadata(const std::string& url); |
| 138 void OnMediaMetadataExtracted(base::TimeDelta duration, int width, int height, | 138 void OnMediaMetadataExtracted(base::TimeDelta duration, int width, int height, |
| 139 bool success); | 139 bool success); |
| 140 | 140 |
| 141 // Returns true if a MediaUrlInterceptor registered by the embedder has |
| 142 // intercepted the url. |
| 143 bool InterceptMediaUrl( |
| 144 const std::string& url, int* fd, int64* offset, int64* size); |
| 145 |
| 141 // Whether the player is prepared for playback. | 146 // Whether the player is prepared for playback. |
| 142 bool prepared_; | 147 bool prepared_; |
| 143 | 148 |
| 144 // Pending play event while player is preparing. | 149 // Pending play event while player is preparing. |
| 145 bool pending_play_; | 150 bool pending_play_; |
| 146 | 151 |
| 147 // Pending seek time while player is preparing. | 152 // Pending seek time while player is preparing. |
| 148 base::TimeDelta pending_seek_; | 153 base::TimeDelta pending_seek_; |
| 149 | 154 |
| 150 // Url for playback. | 155 // Url for playback. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // Weak pointer passed to |listener_| for callbacks. | 194 // Weak pointer passed to |listener_| for callbacks. |
| 190 // NOTE: Weak pointers must be invalidated before all other member variables. | 195 // NOTE: Weak pointers must be invalidated before all other member variables. |
| 191 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; | 196 base::WeakPtrFactory<MediaPlayerBridge> weak_factory_; |
| 192 | 197 |
| 193 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); | 198 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); |
| 194 }; | 199 }; |
| 195 | 200 |
| 196 } // namespace media | 201 } // namespace media |
| 197 | 202 |
| 198 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 203 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
| OLD | NEW |