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

Side by Side Diff: net/base/mime_util.cc

Issue 898393002: media: Enable Opus support in Clank <video> and MSE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add default case to switch Created 5 years, 10 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/filters/stream_parser_factory.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 case MimeUtil::MPEG2_AAC_MAIN: 469 case MimeUtil::MPEG2_AAC_MAIN:
470 case MimeUtil::MPEG2_AAC_SSR: 470 case MimeUtil::MPEG2_AAC_SSR:
471 // MPEG-2 variants of AAC are not supported on Android. 471 // MPEG-2 variants of AAC are not supported on Android.
472 return false; 472 return false;
473 473
474 case MimeUtil::VP9: 474 case MimeUtil::VP9:
475 // VP9 is supported only in KitKat+ (API Level 19). 475 // VP9 is supported only in KitKat+ (API Level 19).
476 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; 476 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
477 477
478 case MimeUtil::OPUS: 478 case MimeUtil::OPUS:
479 // TODO(vigneshv): Change this similar to the VP9 check once Opus is 479 // Opus is supported only in Lollipop+ (API Level 21).
480 // supported on Android (http://crbug.com/318436). 480 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
481 return false;
482 481
483 case MimeUtil::THEORA: 482 case MimeUtil::THEORA:
484 return false; 483 return false;
485 } 484 }
486 485
487 return false; 486 return false;
488 } 487 }
489 488
490 static bool IsMimeTypeSupportedOnAndroid(const std::string& mimeType) { 489 static bool IsMimeTypeSupportedOnAndroid(const std::string& mimeType) {
491 // HLS codecs are supported in ICS and above (API level 14) 490 // HLS codecs are supported in ICS and above (API level 14)
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1380 post_data->append("\r\n" + value + "\r\n"); 1379 post_data->append("\r\n" + value + "\r\n");
1381 } 1380 }
1382 1381
1383 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, 1382 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary,
1384 std::string* post_data) { 1383 std::string* post_data) {
1385 DCHECK(post_data); 1384 DCHECK(post_data);
1386 post_data->append("--" + mime_boundary + "--\r\n"); 1385 post_data->append("--" + mime_boundary + "--\r\n");
1387 } 1386 }
1388 1387
1389 } // namespace net 1388 } // namespace net
OLDNEW
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698