OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <algorithm> | 5 #include <algorithm> |
6 #include <iterator> | 6 #include <iterator> |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 const char* codecs_list; | 431 const char* codecs_list; |
432 }; | 432 }; |
433 | 433 |
434 static const MediaFormatStrict format_codec_mappings[] = { | 434 static const MediaFormatStrict format_codec_mappings[] = { |
435 { "video/webm", "opus,vorbis,vp8,vp8.0,vp9,vp9.0" }, | 435 { "video/webm", "opus,vorbis,vp8,vp8.0,vp9,vp9.0" }, |
436 { "audio/webm", "opus,vorbis" }, | 436 { "audio/webm", "opus,vorbis" }, |
437 { "audio/wav", "1" }, | 437 { "audio/wav", "1" }, |
438 { "audio/x-wav", "1" }, | 438 { "audio/x-wav", "1" }, |
439 { "video/ogg", "opus,theora,vorbis" }, | 439 { "video/ogg", "opus,theora,vorbis" }, |
440 { "audio/ogg", "opus,vorbis" }, | 440 { "audio/ogg", "opus,vorbis" }, |
441 { "application/ogg", "opus,theora,vorbis" } | 441 { "application/ogg", "opus,theora,vorbis" }, |
| 442 { "audio/mpeg", "" }, |
| 443 { "audio/mp3", "" }, |
| 444 { "audio/x-mp3", "" } |
442 }; | 445 }; |
443 | 446 |
444 MimeUtil::MimeUtil() { | 447 MimeUtil::MimeUtil() { |
445 InitializeMimeTypeMaps(); | 448 InitializeMimeTypeMaps(); |
446 } | 449 } |
447 | 450 |
448 // static | 451 // static |
449 bool MimeUtil::AreSupportedCodecs(const MimeMappings& supported_codecs, | 452 bool MimeUtil::AreSupportedCodecs(const MimeMappings& supported_codecs, |
450 const std::vector<std::string>& codecs) { | 453 const std::vector<std::string>& codecs) { |
451 for (size_t i = 0; i < codecs.size(); ++i) { | 454 for (size_t i = 0; i < codecs.size(); ++i) { |
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 post_data->append("\r\n" + value + "\r\n"); | 1031 post_data->append("\r\n" + value + "\r\n"); |
1029 } | 1032 } |
1030 | 1033 |
1031 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, | 1034 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, |
1032 std::string* post_data) { | 1035 std::string* post_data) { |
1033 DCHECK(post_data); | 1036 DCHECK(post_data); |
1034 post_data->append("--" + mime_boundary + "--\r\n"); | 1037 post_data->append("--" + mime_boundary + "--\r\n"); |
1035 } | 1038 } |
1036 | 1039 |
1037 } // namespace net | 1040 } // namespace net |
OLD | NEW |