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

Side by Side Diff: media/filters/pipeline_integration_test.cc

Issue 24579003: Clean up remaining unused globals (on mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: staticmedia Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/filters/pipeline_integration_test_base.h" 5 #include "media/filters/pipeline_integration_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "media/base/decoder_buffer.h" 12 #include "media/base/decoder_buffer.h"
13 #include "media/base/media_keys.h" 13 #include "media/base/media_keys.h"
14 #include "media/base/media_switches.h" 14 #include "media/base/media_switches.h"
15 #include "media/base/test_data_util.h" 15 #include "media/base/test_data_util.h"
16 #include "media/cdm/aes_decryptor.h" 16 #include "media/cdm/aes_decryptor.h"
17 #include "media/filters/chunk_demuxer.h" 17 #include "media/filters/chunk_demuxer.h"
18 18
19 using testing::AnyNumber; 19 using testing::AnyNumber;
20 using testing::AtMost; 20 using testing::AtMost;
21 21
22 namespace media { 22 namespace media {
23 23
24 static const char kSourceId[] = "SourceId"; 24 const char kSourceId[] = "SourceId";
25 static const char kClearKeySystem[] = "org.w3.clearkey"; 25 const uint8 kInitData[] = { 0x69, 0x6e, 0x69, 0x74 };
26 static const uint8 kInitData[] = { 0x69, 0x6e, 0x69, 0x74 };
27 26
28 static const char kWebM[] = "video/webm; codecs=\"vp8,vorbis\""; 27 const char kWebM[] = "video/webm; codecs=\"vp8,vorbis\"";
29 static const char kWebMVP9[] = "video/webm; codecs=\"vp9\""; 28 const char kWebMVP9[] = "video/webm; codecs=\"vp9\"";
30 static const char kAudioOnlyWebM[] = "video/webm; codecs=\"vorbis\""; 29 const char kAudioOnlyWebM[] = "video/webm; codecs=\"vorbis\"";
31 static const char kOpusAudioOnlyWebM[] = "video/webm; codecs=\"opus\""; 30 const char kOpusAudioOnlyWebM[] = "video/webm; codecs=\"opus\"";
32 static const char kVideoOnlyWebM[] = "video/webm; codecs=\"vp8\""; 31 const char kVideoOnlyWebM[] = "video/webm; codecs=\"vp8\"";
33 static const char kMP4[] = "video/mp4; codecs=\"avc1.4D4041,mp4a.40.2\""; 32 const char kMP4VideoType[] = "video/mp4";
34 static const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\""; 33 const char kMP4AudioType[] = "audio/mp4";
35 static const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\""; 34 #if defined(USE_PROPRIETARY_CODECS)
36 static const char kMP4AudioType[] = "audio/mp4"; 35 const char kMP4[] = "video/mp4; codecs=\"avc1.4D4041,mp4a.40.2\"";
37 static const char kMP4VideoType[] = "video/mp4"; 36 const char kMP4Video[] = "video/mp4; codecs=\"avc1.4D4041\"";
38 static const char kMP3[] = "audio/mpeg"; 37 const char kMP4Audio[] = "audio/mp4; codecs=\"mp4a.40.2\"";
38 const char kMP3[] = "audio/mpeg";
39 #endif // defined(USE_PROPRIETARY_CODECS)
39 40
40 // Key used to encrypt test files. 41 // Key used to encrypt test files.
41 static const uint8 kSecretKey[] = { 42 const uint8 kSecretKey[] = {
42 0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b, 43 0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b,
43 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c 44 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c
44 }; 45 };
45 46
46 // The key ID for all encrypted files. 47 // The key ID for all encrypted files.
47 static const uint8 kKeyId[] = { 48 const uint8 kKeyId[] = {
48 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 49 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
49 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35 50 0x38, 0x39, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35
50 }; 51 };
51 52
52 static const int kAppendWholeFile = -1; 53 const int kAppendWholeFile = -1;
53 54
54 // Constants for the Media Source config change tests. 55 // Constants for the Media Source config change tests.
55 static const int kAppendTimeSec = 1; 56 const int kAppendTimeSec = 1;
56 static const int kAppendTimeMs = kAppendTimeSec * 1000; 57 const int kAppendTimeMs = kAppendTimeSec * 1000;
57 static const int k320WebMFileDurationMs = 2737; 58 const int k320WebMFileDurationMs = 2737;
58 static const int k640WebMFileDurationMs = 2763; 59 const int k640WebMFileDurationMs = 2763;
59 static const int k640IsoFileDurationMs = 2737; 60 const int kOpusEndTrimmingWebMFileDurationMs = 2771;
60 static const int k640IsoCencFileDurationMs = 2736; 61 const uint32 kOpusEndTrimmingWebMFileAudioBytes = 528676;
61 static const int k1280IsoFileDurationMs = 2736; 62 const int kVP9WebMFileDurationMs = 2735;
62 static const int kOpusEndTrimmingWebMFileDurationMs = 2771; 63 const int kVP8AWebMFileDurationMs = 2700;
63 static const uint32 kOpusEndTrimmingWebMFileAudioBytes = 528676;
64 static const int kVP9WebMFileDurationMs = 2735;
65 static const int kVP8AWebMFileDurationMs = 2700;
66 64
67 // Command line switch for runtime adjustment of audio file to be benchmarked. 65 // Command line switch for runtime adjustment of audio file to be benchmarked.
68 static const char kBenchmarkAudioFile[] = "benchmark-audio-file"; 66 const char kBenchmarkAudioFile[] = "benchmark-audio-file";
67
68 #if defined(USE_PROPRIETARY_CODECS)
69 const int k640IsoFileDurationMs = 2737;
70 const int k640IsoCencFileDurationMs = 2736;
71 const int k1280IsoFileDurationMs = 2736;
72 #endif // defined(USE_PROPRIETARY_CODECS)
69 73
70 // Note: Tests using this class only exercise the DecryptingDemuxerStream path. 74 // Note: Tests using this class only exercise the DecryptingDemuxerStream path.
71 // They do not exercise the Decrypting{Audio|Video}Decoder path. 75 // They do not exercise the Decrypting{Audio|Video}Decoder path.
72 class FakeEncryptedMedia { 76 class FakeEncryptedMedia {
73 public: 77 public:
74 // Defines the behavior of the "app" that responds to EME events. 78 // Defines the behavior of the "app" that responds to EME events.
75 class AppBase { 79 class AppBase {
76 public: 80 public:
77 virtual ~AppBase() {} 81 virtual ~AppBase() {}
78 82
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 1039
1036 // Verify that VP8 video with inband text track can be played back. 1040 // Verify that VP8 video with inband text track can be played back.
1037 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) { 1041 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) {
1038 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"), 1042 ASSERT_TRUE(Start(GetTestDataFilePath("bear-vp8-webvtt.webm"),
1039 PIPELINE_OK)); 1043 PIPELINE_OK));
1040 Play(); 1044 Play();
1041 ASSERT_TRUE(WaitUntilOnEnded()); 1045 ASSERT_TRUE(WaitUntilOnEnded());
1042 } 1046 }
1043 1047
1044 } // namespace media 1048 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_algorithm_unittest.cc ('k') | media/webm/webm_tracks_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698