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

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

Issue 1899423002: Revert 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 // MediaPlayer only supports VP9 in WebM. 332 EXPECT_EQ(info.has_platform_vp9_decoder, result);
333 EXPECT_FALSE(result);
334 break; 333 break;
335 334
336 case MimeUtil::HEVC_MAIN: 335 case MimeUtil::HEVC_MAIN:
337 EXPECT_EQ(HasHevcSupport(), result); 336 EXPECT_EQ(HasHevcSupport(), result);
338 break; 337 break;
339 } 338 }
340 }); 339 });
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 });
351 } 340 }
352 341
353 TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithUnifiedPipeline) { 342 TEST(IsCodecSupportedOnPlatformTest, ClearCodecBehaviorWithUnifiedPipeline) {
354 // Vary all parameters except |is_unified_media_pipeline_enabled|. 343 // Vary all parameters except |is_unified_media_pipeline_enabled|.
355 MimeUtil::PlatformInfo states_to_vary = VaryAllFields(); 344 MimeUtil::PlatformInfo states_to_vary = VaryAllFields();
356 states_to_vary.is_unified_media_pipeline_enabled = false; 345 states_to_vary.is_unified_media_pipeline_enabled = false;
357 346
358 // Enable the unified pipeline. 347 // Enable the unified pipeline.
359 MimeUtil::PlatformInfo test_states; 348 MimeUtil::PlatformInfo test_states;
360 test_states.is_unified_media_pipeline_enabled = true; 349 test_states.is_unified_media_pipeline_enabled = true;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) { 410 [](const MimeUtil::PlatformInfo& info, MimeUtil::Codec codec) {
422 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( 411 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform(
423 MimeUtil::MPEG2_AAC, "application/x-mpegurl", false, info)); 412 MimeUtil::MPEG2_AAC, "application/x-mpegurl", false, info));
424 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( 413 EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform(
425 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info)); 414 MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info));
426 }); 415 });
427 } 416 }
428 417
429 } // namespace internal 418 } // namespace internal
430 } // namespace media 419 } // 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