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

Side by Side Diff: remoting/client/plugin/pepper_video_renderer_3d.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/client/plugin/pepper_video_renderer_3d.h" 5 #include "remoting/client/plugin/pepper_video_renderer_3d.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 void PepperVideoRenderer3D::OnSessionConfig( 155 void PepperVideoRenderer3D::OnSessionConfig(
156 const protocol::SessionConfig& config) { 156 const protocol::SessionConfig& config) {
157 PP_VideoProfile video_profile = PP_VIDEOPROFILE_VP8_ANY; 157 PP_VideoProfile video_profile = PP_VIDEOPROFILE_VP8_ANY;
158 switch (config.video_config().codec) { 158 switch (config.video_config().codec) {
159 case protocol::ChannelConfig::CODEC_VP8: 159 case protocol::ChannelConfig::CODEC_VP8:
160 video_profile = PP_VIDEOPROFILE_VP8_ANY; 160 video_profile = PP_VIDEOPROFILE_VP8_ANY;
161 break; 161 break;
162 case protocol::ChannelConfig::CODEC_VP9: 162 case protocol::ChannelConfig::CODEC_VP9:
163 video_profile = PP_VIDEOPROFILE_VP9_ANY; 163 video_profile = PP_VIDEOPROFILE_VP9_PROFILE0;
164 break; 164 break;
165 default: 165 default:
166 NOTREACHED(); 166 NOTREACHED();
167 } 167 }
168 168
169 int32_t result = video_decoder_.Initialize( 169 int32_t result = video_decoder_.Initialize(
170 graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK, 170 graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK,
171 kMinimumPictureCount, 171 kMinimumPictureCount,
172 callback_factory_.NewCallback(&PepperVideoRenderer3D::OnInitialized)); 172 callback_factory_.NewCallback(&PepperVideoRenderer3D::OnInitialized));
173 CHECK_EQ(result, PP_OK_COMPLETIONPENDING) 173 CHECK_EQ(result, PP_OK_COMPLETIONPENDING)
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); 524 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader);
525 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); 525 gles2_if_->DeleteShader(graphics_.pp_resource(), shader);
526 } 526 }
527 527
528 void PepperVideoRenderer3D::CheckGLError() { 528 void PepperVideoRenderer3D::CheckGLError() {
529 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); 529 GLenum error = gles2_if_->GetError(graphics_.pp_resource());
530 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error; 530 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error;
531 } 531 }
532 532
533 } // namespace remoting 533 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698