| 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 "media/renderers/video_renderer_impl.h" | 5 #include "media/renderers/video_renderer_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "base/threading/platform_thread.h" | |
| 16 #include "base/time/default_tick_clock.h" | 15 #include "base/time/default_tick_clock.h" |
| 17 #include "base/trace_event/trace_event.h" | 16 #include "base/trace_event/trace_event.h" |
| 18 #include "media/base/bind_to_current_loop.h" | 17 #include "media/base/bind_to_current_loop.h" |
| 19 #include "media/base/buffers.h" | 18 #include "media/base/buffers.h" |
| 20 #include "media/base/limits.h" | 19 #include "media/base/limits.h" |
| 21 #include "media/base/media_switches.h" | 20 #include "media/base/media_switches.h" |
| 22 #include "media/base/pipeline.h" | 21 #include "media/base/pipeline.h" |
| 23 #include "media/base/video_frame.h" | |
| 24 | 22 |
| 25 namespace media { | 23 namespace media { |
| 26 | 24 |
| 27 // TODO(dalecurtis): This experiment is temporary and should be removed once we | 25 // TODO(dalecurtis): This experiment is temporary and should be removed once we |
| 28 // have enough data to support the primacy of the new video rendering path; see | 26 // have enough data to support the primacy of the new video rendering path; see |
| 29 // http://crbug.com/485699 for details. | 27 // http://crbug.com/485699 for details. |
| 30 static bool ShouldUseVideoRenderingPath() { | 28 static bool ShouldUseVideoRenderingPath() { |
| 31 // Note: It's important to query the field trial state first, to ensure that | 29 // Note: It's important to query the field trial state first, to ensure that |
| 32 // UMA reports the correct group. | 30 // UMA reports the correct group. |
| 33 const std::string group_name = | 31 const std::string group_name = |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 base::TimeTicks VideoRendererImpl::ConvertMediaTimestamp( | 736 base::TimeTicks VideoRendererImpl::ConvertMediaTimestamp( |
| 739 base::TimeDelta media_time) { | 737 base::TimeDelta media_time) { |
| 740 std::vector<base::TimeDelta> media_times(1, media_time); | 738 std::vector<base::TimeDelta> media_times(1, media_time); |
| 741 std::vector<base::TimeTicks> wall_clock_times; | 739 std::vector<base::TimeTicks> wall_clock_times; |
| 742 if (!wall_clock_time_cb_.Run(media_times, &wall_clock_times)) | 740 if (!wall_clock_time_cb_.Run(media_times, &wall_clock_times)) |
| 743 return base::TimeTicks(); | 741 return base::TimeTicks(); |
| 744 return wall_clock_times[0]; | 742 return wall_clock_times[0]; |
| 745 } | 743 } |
| 746 | 744 |
| 747 } // namespace media | 745 } // namespace media |
| OLD | NEW |