Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: media/renderers/video_renderer_impl.cc

Issue 1172183002: Move StartsWith[ASCII] to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util3
Patch Set: merger Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 18 matching lines...) Expand all
29 // have enough data to support the primacy of the new video rendering path; see 29 // have enough data to support the primacy of the new video rendering path; see
30 // http://crbug.com/485699 for details. 30 // http://crbug.com/485699 for details.
31 static bool ShouldUseVideoRenderingPath() { 31 static bool ShouldUseVideoRenderingPath() {
32 // Note: It's important to query the field trial state first, to ensure that 32 // Note: It's important to query the field trial state first, to ensure that
33 // UMA reports the correct group. 33 // UMA reports the correct group.
34 const std::string group_name = 34 const std::string group_name =
35 base::FieldTrialList::FindFullName("NewVideoRendererTrial"); 35 base::FieldTrialList::FindFullName("NewVideoRendererTrial");
36 const bool disabled_via_cli = 36 const bool disabled_via_cli =
37 base::CommandLine::ForCurrentProcess()->HasSwitch( 37 base::CommandLine::ForCurrentProcess()->HasSwitch(
38 switches::kDisableNewVideoRenderer); 38 switches::kDisableNewVideoRenderer);
39 return !disabled_via_cli && !StartsWithASCII(group_name, "Disabled", true); 39 return !disabled_via_cli &&
40 !base::StartsWithASCII(group_name, "Disabled", true);
40 } 41 }
41 42
42 VideoRendererImpl::VideoRendererImpl( 43 VideoRendererImpl::VideoRendererImpl(
43 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 44 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
44 VideoRendererSink* sink, 45 VideoRendererSink* sink,
45 ScopedVector<VideoDecoder> decoders, 46 ScopedVector<VideoDecoder> decoders,
46 bool drop_frames, 47 bool drop_frames,
47 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories, 48 const scoped_refptr<GpuVideoAcceleratorFactories>& gpu_factories,
48 const scoped_refptr<MediaLog>& media_log) 49 const scoped_refptr<MediaLog>& media_log)
49 : task_runner_(task_runner), 50 : task_runner_(task_runner),
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 base::TimeTicks VideoRendererImpl::ConvertMediaTimestamp( 774 base::TimeTicks VideoRendererImpl::ConvertMediaTimestamp(
774 base::TimeDelta media_time) { 775 base::TimeDelta media_time) {
775 std::vector<base::TimeDelta> media_times(1, media_time); 776 std::vector<base::TimeDelta> media_times(1, media_time);
776 std::vector<base::TimeTicks> wall_clock_times; 777 std::vector<base::TimeTicks> wall_clock_times;
777 if (!wall_clock_time_cb_.Run(media_times, &wall_clock_times)) 778 if (!wall_clock_time_cb_.Run(media_times, &wall_clock_times))
778 return base::TimeTicks(); 779 return base::TimeTicks();
779 return wall_clock_times[0]; 780 return wall_clock_times[0];
780 } 781 }
781 782
782 } // namespace media 783 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/source_buffer_stream_unittest.cc ('k') | media/video/capture/win/video_capture_device_factory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698