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

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

Issue 1897363004: Reland of Implement support for vp9 in ISO-BMFF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/base/mime_util_internal.cc ('k') | media/filters/stream_parser_factory.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 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 case MimeUtil::VP8: 322 case MimeUtil::VP8:
323 EXPECT_TRUE(result); 323 EXPECT_TRUE(result);
324 break; 324 break;
325 325
326 // The remaining codecs depend on the platform version. 326 // The remaining codecs depend on the platform version.
327 case MimeUtil::OPUS: 327 case MimeUtil::OPUS:
328 EXPECT_EQ(info.supports_opus, result); 328 EXPECT_EQ(info.supports_opus, result);
329 break; 329 break;
330 330
331 case MimeUtil::VP9: 331 case MimeUtil::VP9:
332 EXPECT_EQ(info.has_platform_vp9_decoder, result); 332 // MediaPlayer only supports VP9 in WebM.
333 EXPECT_FALSE(result);
333 break; 334 break;
334 335
335 case MimeUtil::HEVC_MAIN: 336 case MimeUtil::HEVC_MAIN:
336 EXPECT_EQ(HasHevcSupport(), result); 337 EXPECT_EQ(HasHevcSupport(), result);
337 break; 338 break;
338 } 339 }
339 }); 340 });
341
342 // Verify vp9 support in WebM.
343 RunCodecSupportTest(
344 states_to_vary, test_states,
345 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) {
346 const bool result = MimeUtil::IsCodecSupportedOnPlatform(
347 codec, "video/webm", true, info);
348 if (codec == MimeUtil::VP9)
349 EXPECT_EQ(info.has_platform_vp9_decoder, result);
350 });
340 } 351 }
341 352
342 TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithUnifiedPipeline) { 353 TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithUnifiedPipeline) {
343 // Vary all parameters except |is_unified_media_pipeline_enabled|. 354 // Vary all parameters except |is_unified_media_pipeline_enabled|.
344 MimeUtil::PlatformInfo states_to_vary = VaryAllFields(); 355 MimeUtil::PlatformInfo states_to_vary = VaryAllFields();
345 states_to_vary.is_unified_media_pipeline_enabled = false; 356 states_to_vary.is_unified_media_pipeline_enabled = false;
346 357
347 // Enable the unified pipeline. 358 // Enable the unified pipeline.
348 MimeUtil::PlatformInfo test_states; 359 MimeUtil::PlatformInfo test_states;
349 test_states.is_unified_media_pipeline_enabled = true; 360 test_states.is_unified_media_pipeline_enabled = true;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) { 421 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) {
411 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( 422 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform(
412 MimeUtil::MPEG2_AAC, "application/x-mpegurl", false, info)); 423 MimeUtil::MPEG2_AAC, "application/x-mpegurl", false, info));
413 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( 424 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform(
414 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info)); 425 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info));
415 }); 426 });
416 } 427 }
417 428
418 } // namespace internal 429 } // namespace internal
419 } // namespace media 430 } // namespace media
OLDNEW
« no previous file with comments | « media/base/mime_util_internal.cc ('k') | media/filters/stream_parser_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698