Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/renderer/media/render_media_client.h" | 5 #include "content/renderer/media/render_media_client.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
| 10 #include "content/public/common/content_client.h" | 10 #include "content/public/common/content_client.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 } | 89 } |
| 90 | 90 |
| 91 void RenderMediaClient::RecordRapporURL(const std::string& metric, | 91 void RenderMediaClient::RecordRapporURL(const std::string& metric, |
| 92 const GURL& url) { | 92 const GURL& url) { |
| 93 GetContentClient()->renderer()->RecordRapporURL(metric, url); | 93 GetContentClient()->renderer()->RecordRapporURL(metric, url); |
| 94 } | 94 } |
| 95 | 95 |
| 96 bool RenderMediaClient::IsSupportedVideoConfig(media::VideoCodec codec, | 96 bool RenderMediaClient::IsSupportedVideoConfig(media::VideoCodec codec, |
| 97 media::VideoCodecProfile profile, | 97 media::VideoCodecProfile profile, |
| 98 int level) { | 98 int level) { |
| 99 // Chrome doesn't support VP9 profile 2 yet. | |
| 100 if (codec == media::kCodecVP9 && profile == media::VP9PROFILE_PROFILE2) | |
|
ddorwin
2016/12/08 02:08:01
This can be in the switch statement. We'll need to
| |
| 101 return false; | |
| 99 switch (codec) { | 102 switch (codec) { |
| 100 case media::kCodecH264: | 103 case media::kCodecH264: |
| 101 case media::kCodecVP8: | 104 case media::kCodecVP8: |
| 102 case media::kCodecVP9: | 105 case media::kCodecVP9: |
| 103 case media::kCodecTheora: | 106 case media::kCodecTheora: |
| 104 return true; | 107 return true; |
| 105 | 108 |
| 106 case media::kUnknownVideoCodec: | 109 case media::kUnknownVideoCodec: |
| 107 case media::kCodecVC1: | 110 case media::kCodecVC1: |
| 108 case media::kCodecMPEG2: | 111 case media::kCodecMPEG2: |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 123 // This functions is for testing purpose only. The declaration in the | 126 // This functions is for testing purpose only. The declaration in the |
| 124 // header file is guarded by "#if defined(UNIT_TEST)" so that it can be used | 127 // header file is guarded by "#if defined(UNIT_TEST)" so that it can be used |
| 125 // by tests but not non-test code. However, this .cc file is compiled as part of | 128 // by tests but not non-test code. However, this .cc file is compiled as part of |
| 126 // "content" where "UNIT_TEST" is not defined. So we need to specify | 129 // "content" where "UNIT_TEST" is not defined. So we need to specify |
| 127 // "CONTENT_EXPORT" here again so that it is visible to tests. | 130 // "CONTENT_EXPORT" here again so that it is visible to tests. |
| 128 CONTENT_EXPORT RenderMediaClient* GetRenderMediaClientInstanceForTesting() { | 131 CONTENT_EXPORT RenderMediaClient* GetRenderMediaClientInstanceForTesting() { |
| 129 return g_render_media_client.Pointer(); | 132 return g_render_media_client.Pointer(); |
| 130 } | 133 } |
| 131 | 134 |
| 132 } // namespace content | 135 } // namespace content |
| OLD | NEW |