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

Side by Side Diff: content/browser/media/media_source_browsertest.cc

Issue 1539983004: Convert enable_mpeg2ts into a new-style buildflag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 | « content/browser/media/media_canplaytype_browsertest.cc ('k') | content/content_tests.gypi » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "build/build_config.h" 6 #include "build/build_config.h"
7 #include "content/browser/media/media_browsertest.h" 7 #include "content/browser/media/media_browsertest.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "media/media_features.h"
9 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
10 #include "base/android/build_info.h" 11 #include "base/android/build_info.h"
11 #endif 12 #endif
12 13
13 // Common media types. 14 // Common media types.
14 #if defined(USE_PROPRIETARY_CODECS) && !defined(OS_ANDROID) 15 #if defined(USE_PROPRIETARY_CODECS) && !defined(OS_ANDROID)
15 const char kAAC_ADTS_AudioOnly[] = "audio/aac"; 16 const char kAAC_ADTS_AudioOnly[] = "audio/aac";
16 #endif 17 #endif
17 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; 18 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
18 #if !defined(OS_ANDROID) 19 #if !defined(OS_ANDROID)
19 const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\""; 20 const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\"";
20 #endif 21 #endif
21 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; 22 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\"";
22 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; 23 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\"";
23 24
24 #if defined(USE_PROPRIETARY_CODECS) && defined(ENABLE_MPEG2TS_STREAM_PARSER) 25 #if defined(USE_PROPRIETARY_CODECS)
26 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
25 const char kMp2tAudioVideo[] = "video/mp2t; codecs=\"mp4a.40.2, avc1.42E01E\""; 27 const char kMp2tAudioVideo[] = "video/mp2t; codecs=\"mp4a.40.2, avc1.42E01E\"";
26 #endif 28 #endif
29 #endif
27 30
28 namespace content { 31 namespace content {
29 32
30 // MSE is available on all desktop platforms and on Android 4.1 and later. 33 // MSE is available on all desktop platforms and on Android 4.1 and later.
31 static bool IsMSESupported() { 34 static bool IsMSESupported() {
32 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
33 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) { 36 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
34 VLOG(0) << "MSE is only supported in Android 4.1 and later."; 37 VLOG(0) << "MSE is only supported in Android 4.1 and later.";
35 return false; 38 return false;
36 } 39 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 VLOG(0) << "Skipping test - MSE not supported."; 123 VLOG(0) << "Skipping test - MSE not supported.";
121 return; 124 return;
122 } 125 }
123 base::StringPairs query_params; 126 base::StringPairs query_params;
124 query_params.push_back(std::make_pair("videoFormat", "CLEAR_WEBM")); 127 query_params.push_back(std::make_pair("videoFormat", "CLEAR_WEBM"));
125 query_params.push_back(std::make_pair("audioFormat", "CLEAR_MP4")); 128 query_params.push_back(std::make_pair("audioFormat", "CLEAR_MP4"));
126 RunMediaTestPage("mse_different_containers.html", query_params, kEnded, true); 129 RunMediaTestPage("mse_different_containers.html", query_params, kEnded, true);
127 } 130 }
128 #endif 131 #endif
129 132
130 #if defined(USE_PROPRIETARY_CODECS) && defined(ENABLE_MPEG2TS_STREAM_PARSER) 133 #if defined(USE_PROPRIETARY_CODECS)
134 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
131 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioVideo_Mp2t) { 135 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_AudioVideo_Mp2t) {
132 TestSimplePlayback("bear-1280x720.ts", kMp2tAudioVideo, kEnded); 136 TestSimplePlayback("bear-1280x720.ts", kMp2tAudioVideo, kEnded);
133 } 137 }
134 #endif 138 #endif
139 #endif
135 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_canplaytype_browsertest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698