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

Unified Diff: chrome/renderer/media/cast_rtp_stream.cc

Issue 1034433002: Cast: Prefer VP8 over H.264 for hardware encoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow miu's code Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/media/cast_rtp_stream.cc
diff --git a/chrome/renderer/media/cast_rtp_stream.cc b/chrome/renderer/media/cast_rtp_stream.cc
index 7c40523c302e21a5d7856d653839a2e3b91cd9f3..bbe675a076e57d4ea628f90d325df0a6d99e4117 100644
--- a/chrome/renderer/media/cast_rtp_stream.cc
+++ b/chrome/renderer/media/cast_rtp_stream.cc
@@ -151,9 +151,18 @@ std::vector<CastRtpParams> SupportedAudioParams() {
std::vector<CastRtpParams> SupportedVideoParams() {
std::vector<CastRtpParams> supported_params;
+
+ // Prefer VP8 over H.264 for hardware encoder.
+ if (IsHardwareVP8EncodingSupported())
+ supported_params.push_back(CastRtpParams(DefaultVp8Payload()));
if (IsHardwareH264EncodingSupported())
supported_params.push_back(CastRtpParams(DefaultH264Payload()));
- supported_params.push_back(CastRtpParams(DefaultVp8Payload()));
+
+ // Propose the default software VP8 encoder, if no hardware encoders are
+ // available.
+ if (supported_params.empty())
+ supported_params.push_back(CastRtpParams(DefaultVp8Payload()));
+
return supported_params;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698