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 case MimeUtil::H264_MAIN: |
| 476 case MimeUtil::H264_HIGH: |
475 case MimeUtil::VP8: | 477 case MimeUtil::VP8: |
476 case MimeUtil::VORBIS: | 478 case MimeUtil::VORBIS: |
477 return true; | 479 return true; |
478 | 480 |
479 case MimeUtil::MPEG2_AAC_LC: | 481 case MimeUtil::MPEG2_AAC_LC: |
480 case MimeUtil::MPEG2_AAC_MAIN: | 482 case MimeUtil::MPEG2_AAC_MAIN: |
481 case MimeUtil::MPEG2_AAC_SSR: | 483 case MimeUtil::MPEG2_AAC_SSR: |
482 // MPEG-2 variants of AAC are not supported on Android. | 484 // MPEG-2 variants of AAC are not supported on Android. |
483 return false; | 485 return false; |
484 | 486 |
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: | 487 case MimeUtil::VP9: |
491 // VP9 is supported only in KitKat+ (API Level 19). | 488 // VP9 is supported only in KitKat+ (API Level 19). |
492 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; | 489 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; |
493 | 490 |
494 case MimeUtil::OPUS: | 491 case MimeUtil::OPUS: |
495 // TODO(vigneshv): Change this similar to the VP9 check once Opus is | 492 // TODO(vigneshv): Change this similar to the VP9 check once Opus is |
496 // supported on Android (http://crbug.com/318436). | 493 // supported on Android (http://crbug.com/318436). |
497 return false; | 494 return false; |
498 | 495 |
499 case MimeUtil::THEORA: | 496 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"); | 1357 post_data->append("\r\n" + value + "\r\n"); |
1361 } | 1358 } |
1362 | 1359 |
1363 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, | 1360 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, |
1364 std::string* post_data) { | 1361 std::string* post_data) { |
1365 DCHECK(post_data); | 1362 DCHECK(post_data); |
1366 post_data->append("--" + mime_boundary + "--\r\n"); | 1363 post_data->append("--" + mime_boundary + "--\r\n"); |
1367 } | 1364 } |
1368 | 1365 |
1369 } // namespace net | 1366 } // namespace net |
OLD | NEW |