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

Unified Diff: ppapi/examples/video_encode/video_encode.cc

Issue 1769593002: Add 4 VP9 profiles to the media::VideoCodecProfile enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@hevc-codec-7
Patch Set: Use VP9 profile0 by default instead of profile3 Created 4 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: ppapi/examples/video_encode/video_encode.cc
diff --git a/ppapi/examples/video_encode/video_encode.cc b/ppapi/examples/video_encode/video_encode.cc
index 3c61888149d04fdf6d041b4bdad5b5bbd41851bd..477cb6430055d429b739ca3e72fe8ea6468e69cc 100644
--- a/ppapi/examples/video_encode/video_encode.cc
+++ b/ppapi/examples/video_encode/video_encode.cc
@@ -242,7 +242,10 @@ void VideoEncoderInstance::InitializeVideoProfiles() {
AddVideoProfile(PP_VIDEOPROFILE_H264STEREOHIGH, "h264stereohigh");
AddVideoProfile(PP_VIDEOPROFILE_H264MULTIVIEWHIGH, "h264multiviewhigh");
AddVideoProfile(PP_VIDEOPROFILE_VP8_ANY, "vp8");
- AddVideoProfile(PP_VIDEOPROFILE_VP9_ANY, "vp9");
+ AddVideoProfile(PP_VIDEOPROFILE_VP9_PROFILE0, "vp9 profile0");
+ AddVideoProfile(PP_VIDEOPROFILE_VP9_PROFILE1, "vp9 profile1");
+ AddVideoProfile(PP_VIDEOPROFILE_VP9_PROFILE2, "vp9 profile2");
+ AddVideoProfile(PP_VIDEOPROFILE_VP9_PROFILE3, "vp9 profile3");
}
PP_VideoProfile VideoEncoderInstance::VideoProfileFromString(
@@ -555,7 +558,10 @@ void VideoEncoderInstance::PostDataMessage(const void* buffer, uint32_t size) {
uint8_t* data_ptr;
uint32_t data_offset = 0;
if (video_profile_ == PP_VIDEOPROFILE_VP8_ANY ||
- video_profile_ == PP_VIDEOPROFILE_VP9_ANY) {
+ video_profile_ == PP_VIDEOPROFILE_VP9_PROFILE0 ||
+ video_profile_ == PP_VIDEOPROFILE_VP9_PROFILE1 ||
+ video_profile_ == PP_VIDEOPROFILE_VP9_PROFILE2 ||
+ video_profile_ == PP_VIDEOPROFILE_VP9_PROFILE3) {
uint32_t frame_offset = 0;
if (encoded_frames_ == 1) {
array_buffer = pp::VarArrayBuffer(

Powered by Google App Engine
This is Rietveld 408576698