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, |
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 << "Media source other than URL is not supported."; |
50 return new MediaPlayerBridge( | 51 return new MediaPlayerBridge( |
51 player_id, | 52 player_id, |
52 url, | 53 url, |
53 first_party_for_cookies, | 54 first_party_for_cookies, |
54 hide_url_log, | 55 hide_url_log, |
55 manager, | 56 manager, |
56 media_error_cb, | 57 media_error_cb, |
57 video_size_changed_cb, | 58 video_size_changed_cb, |
58 buffering_update_cb, | 59 buffering_update_cb, |
59 media_prepared_cb, | 60 media_prepared_cb, |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 438 |
438 bool MediaPlayerBridge::CanSeekBackward() { | 439 bool MediaPlayerBridge::CanSeekBackward() { |
439 return can_seek_backward_; | 440 return can_seek_backward_; |
440 } | 441 } |
441 | 442 |
442 bool MediaPlayerBridge::IsPlayerReady() { | 443 bool MediaPlayerBridge::IsPlayerReady() { |
443 return prepared_; | 444 return prepared_; |
444 } | 445 } |
445 | 446 |
446 } // namespace media | 447 } // namespace media |
OLD | NEW |