| 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 // size is set. | 951 // size is set. |
| 952 if (!is_remote_ && cached_stream_texture_size_ != natural_size_) { | 952 if (!is_remote_ && cached_stream_texture_size_ != natural_size_) { |
| 953 stream_texture_factory_->SetStreamTextureSize( | 953 stream_texture_factory_->SetStreamTextureSize( |
| 954 stream_id_, gfx::Size(natural_size_.width, natural_size_.height)); | 954 stream_id_, gfx::Size(natural_size_.width, natural_size_.height)); |
| 955 cached_stream_texture_size_ = natural_size_; | 955 cached_stream_texture_size_ = natural_size_; |
| 956 } | 956 } |
| 957 | 957 |
| 958 // Lazily allocate compositing layer. | 958 // Lazily allocate compositing layer. |
| 959 if (!video_weblayer_) { | 959 if (!video_weblayer_) { |
| 960 video_weblayer_.reset(new cc_blink::WebLayerImpl( | 960 video_weblayer_.reset(new cc_blink::WebLayerImpl( |
| 961 cc::VideoLayer::Create(cc_blink::WebLayerImpl::LayerSettings(), this, | 961 cc::VideoLayer::Create(cc::LayerSettings(), this, |
| 962 media::VIDEO_ROTATION_0))); | 962 media::VIDEO_ROTATION_0))); |
| 963 client_->setWebLayer(video_weblayer_.get()); | 963 client_->setWebLayer(video_weblayer_.get()); |
| 964 } | 964 } |
| 965 } | 965 } |
| 966 | 966 |
| 967 void WebMediaPlayerAndroid::OnTimeUpdate(base::TimeDelta current_timestamp, | 967 void WebMediaPlayerAndroid::OnTimeUpdate(base::TimeDelta current_timestamp, |
| 968 base::TimeTicks current_time_ticks) { | 968 base::TimeTicks current_time_ticks) { |
| 969 DCHECK(main_thread_checker_.CalledOnValidThread()); | 969 DCHECK(main_thread_checker_.CalledOnValidThread()); |
| 970 | 970 |
| 971 if (seeking()) | 971 if (seeking()) |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; | 1658 result = PREDICTION_RESULT_PATH_BASED_WAS_BETTER; |
| 1659 } else if (is_hls_url == is_hls) { | 1659 } else if (is_hls_url == is_hls) { |
| 1660 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; | 1660 result = PREDICTION_RESULT_URL_BASED_WAS_BETTER; |
| 1661 } | 1661 } |
| 1662 UMA_HISTOGRAM_ENUMERATION( | 1662 UMA_HISTOGRAM_ENUMERATION( |
| 1663 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", | 1663 "Media.Android.IsHttpLiveStreamingMediaPredictionResult", |
| 1664 result, PREDICTION_RESULT_MAX); | 1664 result, PREDICTION_RESULT_MAX); |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 } // namespace content | 1667 } // namespace content |
| OLD | NEW |