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

Unified Diff: native_client_sdk/src/examples/api/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: CR feedback 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: native_client_sdk/src/examples/api/video_encode/video_encode.cc
diff --git a/native_client_sdk/src/examples/api/video_encode/video_encode.cc b/native_client_sdk/src/examples/api/video_encode/video_encode.cc
index 00674bfd33b7b3b295b6f6d8183412b86dedad78..323047f7695fdd70bda8e0e39acdda2cb184cd0d 100644
--- a/native_client_sdk/src/examples/api/video_encode/video_encode.cc
+++ b/native_client_sdk/src/examples/api/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, "vp9profile0");
+ AddVideoProfile(PP_VIDEOPROFILE_VP9_PROFILE1, "vp9profile1");
+ AddVideoProfile(PP_VIDEOPROFILE_VP9_PROFILE2, "vp9profile2");
+ AddVideoProfile(PP_VIDEOPROFILE_VP9_PROFILE3, "vp9profile3");
}
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