OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "content/renderer/media/android/webmediaplayer_android.h" | 5 #include "content/renderer/media/android/webmediaplayer_android.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 // size is set. | 959 // size is set. |
960 if (!is_remote_ && cached_stream_texture_size_ != natural_size_) { | 960 if (!is_remote_ && cached_stream_texture_size_ != natural_size_) { |
961 stream_texture_factory_->SetStreamTextureSize( | 961 stream_texture_factory_->SetStreamTextureSize( |
962 stream_id_, gfx::Size(natural_size_.width, natural_size_.height)); | 962 stream_id_, gfx::Size(natural_size_.width, natural_size_.height)); |
963 cached_stream_texture_size_ = natural_size_; | 963 cached_stream_texture_size_ = natural_size_; |
964 } | 964 } |
965 | 965 |
966 // Lazily allocate compositing layer. | 966 // Lazily allocate compositing layer. |
967 if (!video_weblayer_) { | 967 if (!video_weblayer_) { |
968 video_weblayer_.reset(new cc_blink::WebLayerImpl( | 968 video_weblayer_.reset(new cc_blink::WebLayerImpl( |
969 cc::VideoLayer::Create(cc::LayerSettings(), this, | 969 cc::VideoLayer::Create(this, media::VIDEO_ROTATION_0))); |
970 media::VIDEO_ROTATION_0))); | |
971 client_->setWebLayer(video_weblayer_.get()); | 970 client_->setWebLayer(video_weblayer_.get()); |
972 } | 971 } |
973 } | 972 } |
974 | 973 |
975 void WebMediaPlayerAndroid::OnTimeUpdate(base::TimeDelta current_timestamp, | 974 void WebMediaPlayerAndroid::OnTimeUpdate(base::TimeDelta current_timestamp, |
976 base::TimeTicks current_time_ticks) { | 975 base::TimeTicks current_time_ticks) { |
977 DCHECK(main_thread_checker_.CalledOnValidThread()); | 976 DCHECK(main_thread_checker_.CalledOnValidThread()); |
978 | 977 |
979 if (seeking()) | 978 if (seeking()) |
980 return; | 979 return; |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1661 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; | 1660 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; |
1662 } else if (is_hls_url == is_hls) { | 1661 } else if (is_hls_url == is_hls) { |
1663 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; | 1662 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; |
1664 } | 1663 } |
1665 UMA_HISTOGRAM_ENUMERATION( | 1664 UMA_HISTOGRAM_ENUMERATION( |
1666 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", | 1665 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", |
1667 result, PREDICTION_RESULT_MAX); | 1666 result, PREDICTION_RESULT_MAX); |
1668 } | 1667 } |
1669 | 1668 |
1670 } // namespace content | 1669 } // namespace content |
OLD | NEW |