OLD | NEW |
---|---|
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 "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 video_profile = PP_VIDEOPROFILE_VP8_ANY; | 165 video_profile = PP_VIDEOPROFILE_VP8_ANY; |
166 break; | 166 break; |
167 case protocol::ChannelConfig::CODEC_VP9: | 167 case protocol::ChannelConfig::CODEC_VP9: |
168 video_profile = PP_VIDEOPROFILE_VP9_ANY; | 168 video_profile = PP_VIDEOPROFILE_VP9_ANY; |
169 break; | 169 break; |
170 default: | 170 default: |
171 NOTREACHED(); | 171 NOTREACHED(); |
172 } | 172 } |
173 int32_t result = video_decoder_.Initialize( | 173 int32_t result = video_decoder_.Initialize( |
174 graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK, | 174 graphics_, video_profile, PP_HARDWAREACCELERATION_WITHFALLBACK, |
175 kMinimumPictureCount, | |
Sergey Ulanov
2015/08/11 23:10:20
Actually looking at the implementation it appears
lpique
2015/08/12 01:08:50
Yikes. I didn't even think about this being a plug
| |
175 callback_factory_.NewCallback(&PepperVideoRenderer3D::OnInitialized)); | 176 callback_factory_.NewCallback(&PepperVideoRenderer3D::OnInitialized)); |
176 CHECK_EQ(result, PP_OK_COMPLETIONPENDING) | 177 CHECK_EQ(result, PP_OK_COMPLETIONPENDING) |
177 << "video_decoder_.Initialize() returned " << result; | 178 << "video_decoder_.Initialize() returned " << result; |
178 } | 179 } |
179 | 180 |
180 ChromotingStats* PepperVideoRenderer3D::GetStats() { | 181 ChromotingStats* PepperVideoRenderer3D::GetStats() { |
181 return &stats_; | 182 return &stats_; |
182 } | 183 } |
183 | 184 |
184 protocol::VideoStub* PepperVideoRenderer3D::GetVideoStub() { | 185 protocol::VideoStub* PepperVideoRenderer3D::GetVideoStub() { |
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
530 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); | 531 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); |
531 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); | 532 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); |
532 } | 533 } |
533 | 534 |
534 void PepperVideoRenderer3D::CheckGLError() { | 535 void PepperVideoRenderer3D::CheckGLError() { |
535 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); | 536 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); |
536 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error; | 537 CHECK_EQ(error, static_cast<GLenum>(GL_NO_ERROR)) << "GL error: " << error; |
537 } | 538 } |
538 | 539 |
539 } // namespace remoting | 540 } // namespace remoting |
OLD | NEW |