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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 return stats.audio_bytes_decoded; | 596 return stats.audio_bytes_decoded; |
597 } | 597 } |
598 | 598 |
599 unsigned WebMediaPlayerImpl::videoDecodedByteCount() const { | 599 unsigned WebMediaPlayerImpl::videoDecodedByteCount() const { |
600 DCHECK(main_loop_->BelongsToCurrentThread()); | 600 DCHECK(main_loop_->BelongsToCurrentThread()); |
601 | 601 |
602 media::PipelineStatistics stats = pipeline_.GetStatistics(); | 602 media::PipelineStatistics stats = pipeline_.GetStatistics(); |
603 return stats.video_bytes_decoded; | 603 return stats.video_bytes_decoded; |
604 } | 604 } |
605 | 605 |
| 606 double WebMediaPlayerImpl::totalFrameDelay() const { |
| 607 DCHECK(main_loop_->BelongsToCurrentThread()); |
| 608 |
| 609 media::PipelineStatistics stats = pipeline_.GetStatistics(); |
| 610 return stats.total_frame_delay; |
| 611 } |
| 612 |
606 bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( | 613 bool WebMediaPlayerImpl::copyVideoTextureToPlatformTexture( |
607 blink::WebGraphicsContext3D* web_graphics_context, | 614 blink::WebGraphicsContext3D* web_graphics_context, |
608 unsigned int texture, | 615 unsigned int texture, |
609 unsigned int level, | 616 unsigned int level, |
610 unsigned int internal_format, | 617 unsigned int internal_format, |
611 unsigned int type, | 618 unsigned int type, |
612 bool premultiply_alpha, | 619 bool premultiply_alpha, |
613 bool flip_y) { | 620 bool flip_y) { |
614 TRACE_EVENT0("media", "WebMediaPlayerImpl:copyVideoTextureToPlatformTexture"); | 621 TRACE_EVENT0("media", "WebMediaPlayerImpl:copyVideoTextureToPlatformTexture"); |
615 | 622 |
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 compositor_task_runner_->PostTask(FROM_HERE, | 1405 compositor_task_runner_->PostTask(FROM_HERE, |
1399 base::Bind(&GetCurrentFrameAndSignal, | 1406 base::Bind(&GetCurrentFrameAndSignal, |
1400 base::Unretained(compositor_), | 1407 base::Unretained(compositor_), |
1401 &video_frame, | 1408 &video_frame, |
1402 &event)); | 1409 &event)); |
1403 event.Wait(); | 1410 event.Wait(); |
1404 return video_frame; | 1411 return video_frame; |
1405 } | 1412 } |
1406 | 1413 |
1407 } // namespace content | 1414 } // namespace content |
OLD | NEW |