| 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 "chromecast/renderer/cast_content_renderer_client.h" | 5 #include "chromecast/renderer/cast_content_renderer_client.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 return supported_profiles_->IsSupportedVideoConfig( | 159 return supported_profiles_->IsSupportedVideoConfig( |
| 160 media::ToCastVideoCodec(config.codec, config.profile), | 160 media::ToCastVideoCodec(config.codec, config.profile), |
| 161 media::ToCastVideoProfile(config.profile), config.level); | 161 media::ToCastVideoProfile(config.profile), config.level); |
| 162 #else | 162 #else |
| 163 return media::MediaCapabilitiesShlib::IsSupportedVideoConfig( | 163 return media::MediaCapabilitiesShlib::IsSupportedVideoConfig( |
| 164 media::ToCastVideoCodec(config.codec, config.profile), | 164 media::ToCastVideoCodec(config.codec, config.profile), |
| 165 media::ToCastVideoProfile(config.profile), config.level); | 165 media::ToCastVideoProfile(config.profile), config.level); |
| 166 #endif | 166 #endif |
| 167 } | 167 } |
| 168 | 168 |
| 169 bool CastContentRendererClient::IsSupportedBitstreamAudio( |
| 170 ::media::AudioCodec codec) { |
| 171 return (codec == ::media::kCodecAC3 && |
| 172 media::MediaCapabilities::HdmiSinkSupportsAC3()) || |
| 173 (codec == ::media::kCodecEAC3 && |
| 174 media::MediaCapabilities::HdmiSinkSupportsEAC3()); |
| 175 } |
| 176 |
| 169 blink::WebPrescientNetworking* | 177 blink::WebPrescientNetworking* |
| 170 CastContentRendererClient::GetPrescientNetworking() { | 178 CastContentRendererClient::GetPrescientNetworking() { |
| 171 return prescient_networking_dispatcher_.get(); | 179 return prescient_networking_dispatcher_.get(); |
| 172 } | 180 } |
| 173 | 181 |
| 174 void CastContentRendererClient::DeferMediaLoad( | 182 void CastContentRendererClient::DeferMediaLoad( |
| 175 content::RenderFrame* render_frame, | 183 content::RenderFrame* render_frame, |
| 176 bool render_frame_has_played_media_before, | 184 bool render_frame_has_played_media_before, |
| 177 const base::Closure& closure) { | 185 const base::Closure& closure) { |
| 178 if (allow_hidden_media_playback_) { | 186 if (allow_hidden_media_playback_) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 200 } | 208 } |
| 201 | 209 |
| 202 void CastContentRendererClient:: | 210 void CastContentRendererClient:: |
| 203 SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() { | 211 SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() { |
| 204 // Settings for ATV (Android defaults are not what we want). | 212 // Settings for ATV (Android defaults are not what we want). |
| 205 blink::WebRuntimeFeatures::EnableMediaControlsOverlayPlayButton(false); | 213 blink::WebRuntimeFeatures::EnableMediaControlsOverlayPlayButton(false); |
| 206 } | 214 } |
| 207 | 215 |
| 208 } // namespace shell | 216 } // namespace shell |
| 209 } // namespace chromecast | 217 } // namespace chromecast |
| OLD | NEW |