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

Side by Side Diff: media/base/media.cc

Issue 2864593003: Add MimeUtil::Parse{Audio|Video}CodecString (Closed)
Patch Set: Feedback && Proprietary Codecs fix && Rebase Created 3 years, 7 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/base/media.h ('k') | media/base/mime_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/base/media.h" 5 #include "media/base/media.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #if defined(OS_ANDROID) 50 #if defined(OS_ANDROID)
51 void enable_platform_decoder_support() { 51 void enable_platform_decoder_support() {
52 has_platform_decoder_support_ = true; 52 has_platform_decoder_support_ = true;
53 } 53 }
54 54
55 bool has_platform_decoder_support() const { 55 bool has_platform_decoder_support() const {
56 return has_platform_decoder_support_; 56 return has_platform_decoder_support_;
57 } 57 }
58 #endif // defined(OS_ANDROID) 58 #endif // defined(OS_ANDROID)
59 59
60 void enable_new_vp9_codec_string_support() { 60 void enable_new_vp9_codec_string_support(bool enable) {
61 has_new_vp9_codec_string_support_ = true; 61 has_new_vp9_codec_string_support_ = enable;
62 } 62 }
63 63
64 bool has_new_vp9_codec_string_support() { 64 bool has_new_vp9_codec_string_support() {
65 return has_new_vp9_codec_string_support_; 65 return has_new_vp9_codec_string_support_;
66 } 66 }
67 67
68 private: 68 private:
69 ~MediaInitializer() = delete; 69 ~MediaInitializer() = delete;
70 70
71 #if defined(OS_ANDROID) 71 #if defined(OS_ANDROID)
(...skipping 22 matching lines...) Expand all
94 bool HasPlatformDecoderSupport() { 94 bool HasPlatformDecoderSupport() {
95 return GetMediaInstance()->has_platform_decoder_support(); 95 return GetMediaInstance()->has_platform_decoder_support();
96 } 96 }
97 97
98 bool PlatformHasOpusSupport() { 98 bool PlatformHasOpusSupport() {
99 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21; 99 return base::android::BuildInfo::GetInstance()->sdk_int() >= 21;
100 } 100 }
101 #endif // defined(OS_ANDROID) 101 #endif // defined(OS_ANDROID)
102 102
103 void EnableNewVp9CodecStringSupport() { 103 void EnableNewVp9CodecStringSupport() {
104 GetMediaInstance()->enable_new_vp9_codec_string_support(); 104 GetMediaInstance()->enable_new_vp9_codec_string_support(true);
105 }
106
107 void DisableNewVp9CodecStringSupport_ForTesting() {
108 GetMediaInstance()->enable_new_vp9_codec_string_support(false);
105 } 109 }
106 110
107 bool HasNewVp9CodecStringSupport() { 111 bool HasNewVp9CodecStringSupport() {
108 return GetMediaInstance()->has_new_vp9_codec_string_support(); 112 return GetMediaInstance()->has_new_vp9_codec_string_support();
109 } 113 }
110 114
111 } // namespace media 115 } // namespace media
OLDNEW
« no previous file with comments | « media/base/media.h ('k') | media/base/mime_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698