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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; | 1663 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; |
1665 } else if (is_hls_url == is_hls) { | 1664 } else if (is_hls_url == is_hls) { |
1666 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; | 1665 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; |
1667 } | 1666 } |
1668 UMA_HISTOGRAM_ENUMERATION( | 1667 UMA_HISTOGRAM_ENUMERATION( |
1669 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", | 1668 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", |
1670 result, PREDICTION_RESULT_MAX); | 1669 result, PREDICTION_RESULT_MAX); |
1671 } | 1670 } |
1672 | 1671 |
1673 } // namespace content | 1672 } // namespace content |
OLD | NEW |