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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 static bool RegisterMediaPlayerBridge(JNIEnv* env); | 65 static bool RegisterMediaPlayerBridge(JNIEnv* env); |
66 | 66 |
67 // Construct a MediaPlayerBridge object with all the needed media player | 67 // Construct a MediaPlayerBridge object with all the needed media player |
68 // callbacks. This object needs to call |manager|'s RequestMediaResources() | 68 // callbacks. This object needs to call |manager|'s RequestMediaResources() |
69 // before decoding the media stream. This allows |manager| to track | 69 // before decoding the media stream. This allows |manager| to track |
70 // unused resources and free them when needed. On the other hand, it needs | 70 // unused resources and free them when needed. On the other hand, it needs |
71 // to call ReleaseMediaResources() when it is done with decoding. | 71 // to call ReleaseMediaResources() when it is done with decoding. |
72 MediaPlayerBridge(int player_id, | 72 MediaPlayerBridge(int player_id, |
73 const std::string& url, | 73 const std::string& url, |
74 const std::string& first_party_for_cookies, | 74 const std::string& first_party_for_cookies, |
75 CookieGetter* cookies_getter, | 75 CookieGetter* cookie_getter, |
76 bool hide_url_log, | 76 bool hide_url_log, |
77 MediaPlayerBridgeManager* manager, | 77 MediaPlayerBridgeManager* manager, |
78 const MediaErrorCB& media_error_cb, | 78 const MediaErrorCB& media_error_cb, |
79 const VideoSizeChangedCB& video_size_changed_cb, | 79 const VideoSizeChangedCB& video_size_changed_cb, |
80 const BufferingUpdateCB& buffering_update_cb, | 80 const BufferingUpdateCB& buffering_update_cb, |
81 const MediaPreparedCB& media_prepared_cb, | 81 const MediaPreparedCB& media_prepared_cb, |
82 const PlaybackCompleteCB& playback_complete_cb, | 82 const PlaybackCompleteCB& playback_complete_cb, |
83 const SeekCompleteCB& seek_complete_cb, | 83 const SeekCompleteCB& seek_complete_cb, |
84 const TimeUpdateCB& time_update_cb); | 84 const TimeUpdateCB& time_update_cb); |
85 ~MediaPlayerBridge(); | 85 ~MediaPlayerBridge(); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 214 |
215 // Listener object that listens to all the media player events. | 215 // Listener object that listens to all the media player events. |
216 MediaPlayerListener listener_; | 216 MediaPlayerListener listener_; |
217 | 217 |
218 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); | 218 DISALLOW_COPY_AND_ASSIGN(MediaPlayerBridge); |
219 }; | 219 }; |
220 | 220 |
221 } // namespace media | 221 } // namespace media |
222 | 222 |
223 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ | 223 #endif // MEDIA_BASE_ANDROID_MEDIA_PLAYER_BRIDGE_H_ |
OLD | NEW |