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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
465 static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) { | 465 static bool IsCodecSupportedOnAndroid(MimeUtil::Codec codec) { |
466 switch (codec) { | 466 switch (codec) { |
467 case MimeUtil::INVALID_CODEC: | 467 case MimeUtil::INVALID_CODEC: |
468 return false; | 468 return false; |
469 | 469 |
470 case MimeUtil::PCM: | 470 case MimeUtil::PCM: |
471 case MimeUtil::MP3: | 471 case MimeUtil::MP3: |
472 case MimeUtil::MPEG4_AAC_LC: | 472 case MimeUtil::MPEG4_AAC_LC: |
473 case MimeUtil::MPEG4_AAC_SBRv1: | 473 case MimeUtil::MPEG4_AAC_SBRv1: |
474 case MimeUtil::H264_BASELINE: | 474 case MimeUtil::H264_BASELINE: |
475 // Most OEMs have their own codecs that supports H.264 main and high | |
acolwell GONE FROM CHROMIUM
2014/08/26 22:38:50
nit: Comment probably not necessary since we don't
qinmin
2014/08/27 00:26:41
Done.
| |
476 // profile. | |
477 case MimeUtil::H264_MAIN: | |
478 case MimeUtil::H264_HIGH: | |
475 case MimeUtil::VP8: | 479 case MimeUtil::VP8: |
476 case MimeUtil::VORBIS: | 480 case MimeUtil::VORBIS: |
477 return true; | 481 return true; |
478 | 482 |
479 case MimeUtil::MPEG2_AAC_LC: | 483 case MimeUtil::MPEG2_AAC_LC: |
480 case MimeUtil::MPEG2_AAC_MAIN: | 484 case MimeUtil::MPEG2_AAC_MAIN: |
481 case MimeUtil::MPEG2_AAC_SSR: | 485 case MimeUtil::MPEG2_AAC_SSR: |
482 // MPEG-2 variants of AAC are not supported on Android. | 486 // MPEG-2 variants of AAC are not supported on Android. |
483 return false; | 487 return false; |
484 | 488 |
485 case MimeUtil::H264_MAIN: | |
486 case MimeUtil::H264_HIGH: | |
487 // H.264 Main and High profiles are not supported on Android. | |
488 return false; | |
489 | |
490 case MimeUtil::VP9: | 489 case MimeUtil::VP9: |
491 // VP9 is supported only in KitKat+ (API Level 19). | 490 // VP9 is supported only in KitKat+ (API Level 19). |
492 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; | 491 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; |
493 | 492 |
494 case MimeUtil::OPUS: | 493 case MimeUtil::OPUS: |
495 // TODO(vigneshv): Change this similar to the VP9 check once Opus is | 494 // TODO(vigneshv): Change this similar to the VP9 check once Opus is |
496 // supported on Android (http://crbug.com/318436). | 495 // supported on Android (http://crbug.com/318436). |
497 return false; | 496 return false; |
498 | 497 |
499 case MimeUtil::THEORA: | 498 case MimeUtil::THEORA: |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1360 post_data->append("\r\n" + value + "\r\n"); | 1359 post_data->append("\r\n" + value + "\r\n"); |
1361 } | 1360 } |
1362 | 1361 |
1363 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, | 1362 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, |
1364 std::string* post_data) { | 1363 std::string* post_data) { |
1365 DCHECK(post_data); | 1364 DCHECK(post_data); |
1366 post_data->append("--" + mime_boundary + "--\r\n"); | 1365 post_data->append("--" + mime_boundary + "--\r\n"); |
1367 } | 1366 } |
1368 | 1367 |
1369 } // namespace net | 1368 } // namespace net |
OLD | NEW |