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

Unified Diff: media/webm/webm_video_client.cc

Issue 15342004: Adding VP8 Alpha support in Media Source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/webm/webm_video_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/webm/webm_video_client.cc
diff --git a/media/webm/webm_video_client.cc b/media/webm/webm_video_client.cc
index b4e729e36eeab290126cd7bb80b694bc6340ecab..1d0cbcb2ac40d36baf4c55abf4cf3e05e877c411 100644
--- a/media/webm/webm_video_client.cc
+++ b/media/webm/webm_video_client.cc
@@ -27,6 +27,7 @@ void WebMVideoClient::Reset() {
display_width_ = -1;
display_height_ = -1;
display_unit_ = -1;
+ alpha_mode_ = -1;
}
bool WebMVideoClient::InitializeConfig(
@@ -47,6 +48,9 @@ bool WebMVideoClient::InitializeConfig(
return false;
}
+ VideoFrame::Format format =
+ (alpha_mode_ == 1) ? VideoFrame::YV12A : VideoFrame::YV12;
+
if (pixel_width_ <= 0 || pixel_height_ <= 0)
return false;
@@ -93,9 +97,8 @@ bool WebMVideoClient::InitializeConfig(
}
config->Initialize(
- video_codec, profile, VideoFrame::YV12, coded_size,
- visible_rect, natural_size, extra_data, extra_data_size,
- is_encrypted, true);
+ video_codec, profile, format, coded_size, visible_rect, natural_size,
+ extra_data, extra_data_size, is_encrypted, true);
return config->IsValidConfig();
}
@@ -130,6 +133,9 @@ bool WebMVideoClient::OnUInt(int id, int64 val) {
case kWebMIdDisplayUnit:
dst = &display_unit_;
break;
+ case kWebMIdAlphaMode:
+ dst = &alpha_mode_;
+ break;
default:
return true;
}
« no previous file with comments | « media/webm/webm_video_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698