Chromium Code Reviews| 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 #include "media/base/android/media_player_bridge.h" | 5 #include "media/base/android/media_player_bridge.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 27 // is available. | 27 // is available. |
| 28 static const int kTemporaryDuration = 100; | 28 static const int kTemporaryDuration = 100; |
| 29 | 29 |
| 30 namespace media { | 30 namespace media { |
| 31 | 31 |
| 32 #if !defined(GOOGLE_TV) | 32 #if !defined(GOOGLE_TV) |
| 33 // static | 33 // static |
| 34 MediaPlayerAndroid* MediaPlayerAndroid::Create( | 34 MediaPlayerAndroid* MediaPlayerAndroid::Create( |
| 35 int player_id, | 35 int player_id, |
| 36 const GURL& url, | 36 const GURL& url, |
| 37 bool is_media_source, | 37 MediaSource media_source, |
|
acolwell GONE FROM CHROMIUM
2013/05/14 18:17:47
This should be MediaSourceType right?
wonsik
2013/05/20 14:02:24
Right -- fixed.
| |
| 38 const GURL& first_party_for_cookies, | 38 const GURL& first_party_for_cookies, |
| 39 bool hide_url_log, | 39 bool hide_url_log, |
| 40 MediaPlayerManager* manager, | 40 MediaPlayerManager* manager, |
| 41 const MediaErrorCB& media_error_cb, | 41 const MediaErrorCB& media_error_cb, |
| 42 const VideoSizeChangedCB& video_size_changed_cb, | 42 const VideoSizeChangedCB& video_size_changed_cb, |
| 43 const BufferingUpdateCB& buffering_update_cb, | 43 const BufferingUpdateCB& buffering_update_cb, |
| 44 const MediaMetadataChangedCB& media_prepared_cb, | 44 const MediaMetadataChangedCB& media_prepared_cb, |
| 45 const PlaybackCompleteCB& playback_complete_cb, | 45 const PlaybackCompleteCB& playback_complete_cb, |
| 46 const SeekCompleteCB& seek_complete_cb, | 46 const SeekCompleteCB& seek_complete_cb, |
| 47 const TimeUpdateCB& time_update_cb, | 47 const TimeUpdateCB& time_update_cb, |
| 48 const MediaInterruptedCB& media_interrupted_cb) { | 48 const MediaInterruptedCB& media_interrupted_cb) { |
| 49 LOG_IF(WARNING, is_media_source) << "MSE is not supported"; | 49 DCHECK_EQ(media_source, MEDIA_SOURCE_URL) |
| 50 return new MediaPlayerBridge( | 50 << "Media source other than URL is not supported."; |
| 51 player_id, | 51 return new MediaPlayerBridge(player_id, |
| 52 url, | 52 url, |
| 53 first_party_for_cookies, | 53 first_party_for_cookies, |
| 54 hide_url_log, | 54 hide_url_log, |
| 55 manager, | 55 manager, |
| 56 media_error_cb, | 56 media_error_cb, |
| 57 video_size_changed_cb, | 57 video_size_changed_cb, |
| 58 buffering_update_cb, | 58 buffering_update_cb, |
| 59 media_prepared_cb, | 59 media_prepared_cb, |
| 60 playback_complete_cb, | 60 playback_complete_cb, |
| 61 seek_complete_cb, | 61 seek_complete_cb, |
| 62 time_update_cb, | 62 time_update_cb, |
| 63 media_interrupted_cb); | 63 media_interrupted_cb); |
| 64 } | 64 } |
| 65 #endif | 65 #endif |
| 66 | 66 |
| 67 MediaPlayerBridge::MediaPlayerBridge( | 67 MediaPlayerBridge::MediaPlayerBridge( |
| 68 int player_id, | 68 int player_id, |
| 69 const GURL& url, | 69 const GURL& url, |
| 70 const GURL& first_party_for_cookies, | 70 const GURL& first_party_for_cookies, |
| 71 bool hide_url_log, | 71 bool hide_url_log, |
| 72 MediaPlayerManager* manager, | 72 MediaPlayerManager* manager, |
| 73 const MediaErrorCB& media_error_cb, | 73 const MediaErrorCB& media_error_cb, |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 437 | 437 |
| 438 bool MediaPlayerBridge::CanSeekBackward() { | 438 bool MediaPlayerBridge::CanSeekBackward() { |
| 439 return can_seek_backward_; | 439 return can_seek_backward_; |
| 440 } | 440 } |
| 441 | 441 |
| 442 bool MediaPlayerBridge::IsPlayerReady() { | 442 bool MediaPlayerBridge::IsPlayerReady() { |
| 443 return prepared_; | 443 return prepared_; |
| 444 } | 444 } |
| 445 | 445 |
| 446 } // namespace media | 446 } // namespace media |
| OLD | NEW |