OLD | NEW |
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 "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "media/base/mime_util.h" | 10 #include "media/base/mime_util.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 bool kHlsSupported = true; | 34 bool kHlsSupported = true; |
35 #else | 35 #else |
36 bool kHlsSupported = false; | 36 bool kHlsSupported = false; |
37 #endif | 37 #endif |
38 | 38 |
39 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("application/x-mpegurl")); | 39 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("application/x-mpegurl")); |
40 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("Application/X-MPEGURL")); | 40 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("Application/X-MPEGURL")); |
41 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType( | 41 EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType( |
42 "application/vnd.apple.mpegurl")); | 42 "application/vnd.apple.mpegurl")); |
43 | 43 |
44 #if defined(USE_PROPRIETARY_CODECS) | 44 #if defined(USE_PROPRIETARY_CODECS) && !defined(FFMPEG_BRANDING_CHROMIUM) |
45 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp4")); | 45 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp4")); |
46 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a")); | 46 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-m4a")); |
47 EXPECT_TRUE(IsSupportedMediaMimeType("video/mp4")); | 47 EXPECT_TRUE(IsSupportedMediaMimeType("video/mp4")); |
48 EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v")); | 48 EXPECT_TRUE(IsSupportedMediaMimeType("video/x-m4v")); |
49 | 49 |
50 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp3")); | 50 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp3")); |
51 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-mp3")); | 51 EXPECT_TRUE(IsSupportedMediaMimeType("audio/x-mp3")); |
52 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mpeg")); | 52 EXPECT_TRUE(IsSupportedMediaMimeType("audio/mpeg")); |
53 EXPECT_TRUE(IsSupportedMediaMimeType("audio/aac")); | 53 EXPECT_TRUE(IsSupportedMediaMimeType("audio/aac")); |
54 | 54 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // Test without stripping the codec type. | 106 // Test without stripping the codec type. |
107 std::vector<std::string> codecs_out; | 107 std::vector<std::string> codecs_out; |
108 ParseCodecString("avc1.42E01E, mp4a.40.2", &codecs_out, false); | 108 ParseCodecString("avc1.42E01E, mp4a.40.2", &codecs_out, false); |
109 ASSERT_EQ(2u, codecs_out.size()); | 109 ASSERT_EQ(2u, codecs_out.size()); |
110 EXPECT_EQ("avc1.42E01E", codecs_out[0]); | 110 EXPECT_EQ("avc1.42E01E", codecs_out[0]); |
111 EXPECT_EQ("mp4a.40.2", codecs_out[1]); | 111 EXPECT_EQ("mp4a.40.2", codecs_out[1]); |
112 } | 112 } |
113 | 113 |
114 } // namespace media | 114 } // namespace media |
OLD | NEW |