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

Side by Side Diff: media/base/mime_util_unittest.cc

Issue 2362193003: Add FLAC audio codec support (Closed)
Patch Set: Enabled the test in media_browsertest.cc on Chromium Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 // These codecs are never supported by the Android platform. 253 // These codecs are never supported by the Android platform.
254 case MimeUtil::INVALID_CODEC: 254 case MimeUtil::INVALID_CODEC:
255 case MimeUtil::AC3: 255 case MimeUtil::AC3:
256 case MimeUtil::EAC3: 256 case MimeUtil::EAC3:
257 case MimeUtil::MPEG2_AAC: 257 case MimeUtil::MPEG2_AAC:
258 case MimeUtil::THEORA: 258 case MimeUtil::THEORA:
259 EXPECT_FALSE(result); 259 EXPECT_FALSE(result);
260 break; 260 break;
261 261
262 // These codecs are always available with platform decoder support. 262 // These codecs are always available with platform decoder support.
263 case MimeUtil::FLAC:
ddorwin 2016/11/16 17:44:47 Ditto on expectations and order.
DaleCurtis 2016/11/17 23:41:58 Acknowledged.
263 case MimeUtil::PCM: 264 case MimeUtil::PCM:
264 case MimeUtil::MP3: 265 case MimeUtil::MP3:
265 case MimeUtil::MPEG4_AAC: 266 case MimeUtil::MPEG4_AAC:
266 case MimeUtil::VORBIS: 267 case MimeUtil::VORBIS:
267 case MimeUtil::H264: 268 case MimeUtil::H264:
268 EXPECT_TRUE(result); 269 EXPECT_TRUE(result);
269 break; 270 break;
270 271
271 // The remaining codecs are not available on all platforms even when 272 // The remaining codecs are not available on all platforms even when
272 // a platform decoder is available. 273 // a platform decoder is available.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // These codecs are never supported by the Android platform. 308 // These codecs are never supported by the Android platform.
308 case MimeUtil::INVALID_CODEC: 309 case MimeUtil::INVALID_CODEC:
309 case MimeUtil::AC3: 310 case MimeUtil::AC3:
310 case MimeUtil::EAC3: 311 case MimeUtil::EAC3:
311 case MimeUtil::MPEG2_AAC: 312 case MimeUtil::MPEG2_AAC:
312 case MimeUtil::THEORA: 313 case MimeUtil::THEORA:
313 EXPECT_FALSE(result); 314 EXPECT_FALSE(result);
314 break; 315 break;
315 316
316 // These codecs are always available via MediaPlayer. 317 // These codecs are always available via MediaPlayer.
318 case MimeUtil::FLAC:
317 case MimeUtil::PCM: 319 case MimeUtil::PCM:
318 case MimeUtil::MP3: 320 case MimeUtil::MP3:
319 case MimeUtil::MPEG4_AAC: 321 case MimeUtil::MPEG4_AAC:
320 case MimeUtil::VORBIS: 322 case MimeUtil::VORBIS:
321 case MimeUtil::H264: 323 case MimeUtil::H264:
322 case MimeUtil::VP8: 324 case MimeUtil::VP8:
323 EXPECT_TRUE(result); 325 EXPECT_TRUE(result);
324 break; 326 break;
325 327
326 // The remaining codecs depend on the platform version. 328 // The remaining codecs depend on the platform version.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 switch (codec) { 369 switch (codec) {
368 // These codecs are never supported by the Android platform. 370 // These codecs are never supported by the Android platform.
369 case MimeUtil::INVALID_CODEC: 371 case MimeUtil::INVALID_CODEC:
370 case MimeUtil::AC3: 372 case MimeUtil::AC3:
371 case MimeUtil::EAC3: 373 case MimeUtil::EAC3:
372 case MimeUtil::THEORA: 374 case MimeUtil::THEORA:
373 EXPECT_FALSE(result); 375 EXPECT_FALSE(result);
374 break; 376 break;
375 377
376 // These codecs are always supported with the unified pipeline. 378 // These codecs are always supported with the unified pipeline.
379 case MimeUtil::FLAC:
377 case MimeUtil::PCM: 380 case MimeUtil::PCM:
378 case MimeUtil::MPEG2_AAC: 381 case MimeUtil::MPEG2_AAC:
379 case MimeUtil::MP3: 382 case MimeUtil::MP3:
380 case MimeUtil::MPEG4_AAC: 383 case MimeUtil::MPEG4_AAC:
381 case MimeUtil::OPUS: 384 case MimeUtil::OPUS:
382 case MimeUtil::VORBIS: 385 case MimeUtil::VORBIS:
383 case MimeUtil::VP8: 386 case MimeUtil::VP8:
384 case MimeUtil::VP9: 387 case MimeUtil::VP9:
385 EXPECT_TRUE(result); 388 EXPECT_TRUE(result);
386 break; 389 break;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) { 424 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) {
422 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( 425 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform(
423 MimeUtil::MPEG2_AAC, "application/x-mpegurl", false, info)); 426 MimeUtil::MPEG2_AAC, "application/x-mpegurl", false, info));
424 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( 427 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform(
425 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info)); 428 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info));
426 }); 429 });
427 } 430 }
428 431
429 } // namespace internal 432 } // namespace internal
430 } // namespace media 433 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698