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

Unified Diff: content/renderer/media/render_media_client.cc

Issue 2723833002: WebM support for new multipart VP9 string. (Closed)
Patch Set: Rebase Created 3 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
Index: content/renderer/media/render_media_client.cc
diff --git a/content/renderer/media/render_media_client.cc b/content/renderer/media/render_media_client.cc
index ef145b3544d6fc3b0a88f8a83a1e5845f64c2594..4681d2cfc9054f3bfff857f1c1fccbb82a662cd8 100644
--- a/content/renderer/media/render_media_client.cc
+++ b/content/renderer/media/render_media_client.cc
@@ -89,13 +89,32 @@ void RenderMediaClient::RecordRapporURL(const std::string& metric,
GetContentClient()->renderer()->RecordRapporURL(metric, url);
}
-bool RenderMediaClient::IsSupportedVideoConfig(media::VideoCodec codec,
- media::VideoCodecProfile profile,
- int level) {
- switch (codec) {
+bool IsTransferFunctionSupported(gfx::ColorSpace::TransferID eotf) {
+ switch (eotf) {
+ // Transfers supported without color management.
+ case gfx::ColorSpace::TransferID::GAMMA22:
+ case gfx::ColorSpace::TransferID::BT709:
+ case gfx::ColorSpace::TransferID::SMPTE170M:
+ case gfx::ColorSpace::TransferID::BT2020_10:
+ case gfx::ColorSpace::TransferID::BT2020_12:
+ case gfx::ColorSpace::TransferID::IEC61966_2_1:
+ return true;
+ default:
+ // TODO(hubbe): wire up support for HDR transfers.
+ return false;
+ }
+}
+
+bool RenderMediaClient::IsSupportedVideoConfig(
+ const media::VideoConfig& config) {
+ // TODO(chcunningham): Query decoders for codec profile support.
+ switch (config.codec) {
+ case media::kCodecVP9:
+ // Color management required for HDR to not look terrible.
+ return IsTransferFunctionSupported(config.eotf);
+
case media::kCodecH264:
case media::kCodecVP8:
- case media::kCodecVP9:
case media::kCodecTheora:
return true;
« no previous file with comments | « content/renderer/media/render_media_client.h ('k') | content/renderer/media/render_media_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698