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/webmediaplayer_impl.h" | 5 #include "content/renderer/media/webmediaplayer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
956 // should know when to invalidate themselves http://crbug.com/337015 | 956 // should know when to invalidate themselves http://crbug.com/337015 |
957 InvalidateOnMainThread(); | 957 InvalidateOnMainThread(); |
958 } | 958 } |
959 | 959 |
960 void WebMediaPlayerImpl::OnPipelineMetadata( | 960 void WebMediaPlayerImpl::OnPipelineMetadata( |
961 media::PipelineMetadata metadata) { | 961 media::PipelineMetadata metadata) { |
962 DVLOG(1) << __FUNCTION__; | 962 DVLOG(1) << __FUNCTION__; |
963 | 963 |
964 pipeline_metadata_ = metadata; | 964 pipeline_metadata_ = metadata; |
965 | 965 |
966 UMA_HISTOGRAM_ENUMERATION("Media.VideoRotation", | |
967 metadata.video_rotation, | |
968 media::VIDEO_ROTATION_MAX + 1); | |
Alexei Svitkine (slow)
2014/07/17 18:20:59
Optional nit:
General convention for UMA histogra
scherkus (not reviewing)
2014/07/17 18:51:48
Us media folk decided a while back that defining _
| |
966 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); | 969 SetReadyState(WebMediaPlayer::ReadyStateHaveMetadata); |
967 | 970 |
968 if (hasVideo()) { | 971 if (hasVideo()) { |
969 DCHECK(!video_weblayer_); | 972 DCHECK(!video_weblayer_); |
970 video_weblayer_.reset( | 973 video_weblayer_.reset( |
971 new WebLayerImpl(cc::VideoLayer::Create(compositor_))); | 974 new WebLayerImpl(cc::VideoLayer::Create(compositor_))); |
972 video_weblayer_->setOpaque(opaque_); | 975 video_weblayer_->setOpaque(opaque_); |
973 client_->setWebLayer(video_weblayer_.get()); | 976 client_->setWebLayer(video_weblayer_.get()); |
974 } | 977 } |
975 | 978 |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1358 compositor_task_runner_->PostTask(FROM_HERE, | 1361 compositor_task_runner_->PostTask(FROM_HERE, |
1359 base::Bind(&GetCurrentFrameAndSignal, | 1362 base::Bind(&GetCurrentFrameAndSignal, |
1360 base::Unretained(compositor_), | 1363 base::Unretained(compositor_), |
1361 &video_frame, | 1364 &video_frame, |
1362 &event)); | 1365 &event)); |
1363 event.Wait(); | 1366 event.Wait(); |
1364 return video_frame; | 1367 return video_frame; |
1365 } | 1368 } |
1366 | 1369 |
1367 } // namespace content | 1370 } // namespace content |
OLD | NEW |