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

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

Issue 866573004: media: Enable Opus support in Clank <video> and MSE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 case MimeUtil::MPEG2_AAC_MAIN: 468 case MimeUtil::MPEG2_AAC_MAIN:
469 case MimeUtil::MPEG2_AAC_SSR: 469 case MimeUtil::MPEG2_AAC_SSR:
470 // MPEG-2 variants of AAC are not supported on Android. 470 // MPEG-2 variants of AAC are not supported on Android.
471 return false; 471 return false;
472 472
473 case MimeUtil::VP9: 473 case MimeUtil::VP9:
474 // VP9 is supported only in KitKat+ (API Level 19). 474 // VP9 is supported only in KitKat+ (API Level 19).
475 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19; 475 return base::android::BuildInfo::GetInstance()->sdk_int() >= 19;
476 476
477 case MimeUtil::OPUS: 477 case MimeUtil::OPUS:
478 // TODO(vigneshv): Change this similar to the VP9 check once Opus is 478 // Opus is supported only in Lollipop+ (API Level 21).
479 // supported on Android (http://crbug.com/318436). 479 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
480 return false;
481 480
482 case MimeUtil::THEORA: 481 case MimeUtil::THEORA:
483 return false; 482 return false;
484 } 483 }
485 484
486 return false; 485 return false;
487 } 486 }
488 487
489 static bool IsMimeTypeSupportedOnAndroid(const std::string& mimeType) { 488 static bool IsMimeTypeSupportedOnAndroid(const std::string& mimeType) {
490 // HLS codecs are supported in ICS and above (API level 14) 489 // HLS codecs are supported in ICS and above (API level 14)
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 post_data->append("\r\n" + value + "\r\n"); 1378 post_data->append("\r\n" + value + "\r\n");
1380 } 1379 }
1381 1380
1382 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary, 1381 void AddMultipartFinalDelimiterForUpload(const std::string& mime_boundary,
1383 std::string* post_data) { 1382 std::string* post_data) {
1384 DCHECK(post_data); 1383 DCHECK(post_data);
1385 post_data->append("--" + mime_boundary + "--\r\n"); 1384 post_data->append("--" + mime_boundary + "--\r\n");
1386 } 1385 }
1387 1386
1388 } // namespace net 1387 } // 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