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

Side by Side Diff: media/test/pipeline_integration_perftest.cc

Issue 2643333002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base/test_data_util.h" 5 #include "media/base/test_data_util.h"
6 #include "media/media_features.h"
6 #include "media/test/pipeline_integration_test_base.h" 7 #include "media/test/pipeline_integration_test_base.h"
7 #include "testing/perf/perf_test.h" 8 #include "testing/perf/perf_test.h"
8 9
9 namespace media { 10 namespace media {
10 11
11 static const int kBenchmarkIterationsAudio = 200; 12 static const int kBenchmarkIterationsAudio = 200;
12 static const int kBenchmarkIterationsVideo = 20; 13 static const int kBenchmarkIterationsVideo = 20;
13 14
14 static void RunPlaybackBenchmark(const std::string& filename, 15 static void RunPlaybackBenchmark(const std::string& filename,
15 const std::string& name, 16 const std::string& name,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 static void RunAudioPlaybackBenchmark(const std::string& filename, 56 static void RunAudioPlaybackBenchmark(const std::string& filename,
56 const std::string& name) { 57 const std::string& name) {
57 RunPlaybackBenchmark(filename, name, kBenchmarkIterationsAudio, true); 58 RunPlaybackBenchmark(filename, name, kBenchmarkIterationsAudio, true);
58 } 59 }
59 60
60 TEST(PipelineIntegrationPerfTest, AudioPlaybackBenchmark) { 61 TEST(PipelineIntegrationPerfTest, AudioPlaybackBenchmark) {
61 RunAudioPlaybackBenchmark("sfx_f32le.wav", "clockless_playback"); 62 RunAudioPlaybackBenchmark("sfx_f32le.wav", "clockless_playback");
62 RunAudioPlaybackBenchmark("sfx_s24le.wav", "clockless_playback"); 63 RunAudioPlaybackBenchmark("sfx_s24le.wav", "clockless_playback");
63 RunAudioPlaybackBenchmark("sfx_s16le.wav", "clockless_playback"); 64 RunAudioPlaybackBenchmark("sfx_s16le.wav", "clockless_playback");
64 RunAudioPlaybackBenchmark("sfx_u8.wav", "clockless_playback"); 65 RunAudioPlaybackBenchmark("sfx_u8.wav", "clockless_playback");
65 #if defined(USE_PROPRIETARY_CODECS) 66 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
66 RunAudioPlaybackBenchmark("sfx.mp3", "clockless_playback"); 67 RunAudioPlaybackBenchmark("sfx.mp3", "clockless_playback");
67 #endif 68 #endif
68 } 69 }
69 70
70 TEST(PipelineIntegrationPerfTest, VP8PlaybackBenchmark) { 71 TEST(PipelineIntegrationPerfTest, VP8PlaybackBenchmark) {
71 RunVideoPlaybackBenchmark("bear_silent.webm", "clockless_video_playback_vp8"); 72 RunVideoPlaybackBenchmark("bear_silent.webm", "clockless_video_playback_vp8");
72 } 73 }
73 74
74 TEST(PipelineIntegrationPerfTest, VP9PlaybackBenchmark) { 75 TEST(PipelineIntegrationPerfTest, VP9PlaybackBenchmark) {
75 RunVideoPlaybackBenchmark("bear-vp9.webm", "clockless_video_playback_vp9"); 76 RunVideoPlaybackBenchmark("bear-vp9.webm", "clockless_video_playback_vp9");
76 } 77 }
77 78
78 // Android doesn't build Theora support. 79 // Android doesn't build Theora support.
79 #if !defined(OS_ANDROID) 80 #if !defined(OS_ANDROID)
80 TEST(PipelineIntegrationPerfTest, TheoraPlaybackBenchmark) { 81 TEST(PipelineIntegrationPerfTest, TheoraPlaybackBenchmark) {
81 RunVideoPlaybackBenchmark("bear_silent.ogv", 82 RunVideoPlaybackBenchmark("bear_silent.ogv",
82 "clockless_video_playback_theora"); 83 "clockless_video_playback_theora");
83 } 84 }
84 #endif 85 #endif
85 86
86 // PipelineIntegrationTests can't play h264 content. 87 // PipelineIntegrationTests can't play h264 content.
87 #if defined(USE_PROPRIETARY_CODECS) && !defined(OS_ANDROID) 88 #if BUILDFLAG(USE_PROPRIETARY_CODECS) && !defined(OS_ANDROID)
88 TEST(PipelineIntegrationPerfTest, MP4PlaybackBenchmark) { 89 TEST(PipelineIntegrationPerfTest, MP4PlaybackBenchmark) {
89 RunVideoPlaybackBenchmark("bear_silent.mp4", "clockless_video_playback_mp4"); 90 RunVideoPlaybackBenchmark("bear_silent.mp4", "clockless_video_playback_mp4");
90 } 91 }
91 #endif 92 #endif
92 93
93 } // namespace media 94 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | media/test/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698