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 <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) |
174 << "video_decoder_.Initialize() returned " << result; | 174 << "video_decoder_.Initialize() returned " << result; |
175 } | 175 } |
176 | 176 |
177 protocol::VideoStub* PepperVideoRenderer3D::GetVideoStub() { | 177 protocol::VideoStub* PepperVideoRenderer3D::GetVideoStub() { |
178 return this; | 178 return this; |
179 } | 179 } |
180 | 180 |
| 181 protocol::FrameConsumer* PepperVideoRenderer3D::GetFrameConsumer() { |
| 182 // GetFrameConsumer() is used only for WebRTC-based connections which are not |
| 183 // supported by the plugin. |
| 184 NOTREACHED(); |
| 185 return nullptr; |
| 186 } |
| 187 |
181 void PepperVideoRenderer3D::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, | 188 void PepperVideoRenderer3D::ProcessVideoPacket(scoped_ptr<VideoPacket> packet, |
182 const base::Closure& done) { | 189 const base::Closure& done) { |
183 base::ScopedClosureRunner done_runner(done); | 190 base::ScopedClosureRunner done_runner(done); |
184 | 191 |
185 perf_tracker_->RecordVideoPacketStats(*packet); | 192 perf_tracker_->RecordVideoPacketStats(*packet); |
186 | 193 |
187 // Don't need to do anything if the packet is empty. Host sends empty video | 194 // Don't need to do anything if the packet is empty. Host sends empty video |
188 // packets when the screen is not changing. | 195 // packets when the screen is not changing. |
189 if (!packet->data().size()) | 196 if (!packet->data().size()) |
190 return; | 197 return; |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); | 524 gles2_if_->AttachShader(graphics_.pp_resource(), shader_program_, shader); |
518 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); | 525 gles2_if_->DeleteShader(graphics_.pp_resource(), shader); |
519 } | 526 } |
520 | 527 |
521 void PepperVideoRenderer3D::CheckGLError() { | 528 void PepperVideoRenderer3D::CheckGLError() { |
522 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); | 529 GLenum error = gles2_if_->GetError(graphics_.pp_resource()); |
523 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; |
524 } | 531 } |
525 | 532 |
526 } // namespace remoting | 533 } // namespace remoting |
OLD | NEW |