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 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ |
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ | 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 public base::NonThreadSafe { | 40 public base::NonThreadSafe { |
41 public: | 41 public: |
42 PepperVideoRenderer2D(); | 42 PepperVideoRenderer2D(); |
43 ~PepperVideoRenderer2D() override; | 43 ~PepperVideoRenderer2D() override; |
44 | 44 |
45 // PepperVideoRenderer interface. | 45 // PepperVideoRenderer interface. |
46 bool Initialize(pp::Instance* instance, | 46 bool Initialize(pp::Instance* instance, |
47 const ClientContext& context, | 47 const ClientContext& context, |
48 EventHandler* event_handler) override; | 48 EventHandler* event_handler) override; |
49 void OnViewChanged(const pp::View& view) override; | 49 void OnViewChanged(const pp::View& view) override; |
| 50 |
| 51 // VideoRenderer interface. |
50 void OnSessionConfig(const protocol::SessionConfig& config) override; | 52 void OnSessionConfig(const protocol::SessionConfig& config) override; |
51 ChromotingStats* GetStats() override; | 53 ChromotingStats* GetStats() override; |
52 void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet, | 54 protocol::VideoStub* GetVideoStub() override; |
53 const base::Closure& done) override; | |
54 | 55 |
55 private: | 56 private: |
56 // FrameConsumer implementation. | 57 // FrameConsumer implementation. |
57 void ApplyBuffer(const webrtc::DesktopSize& view_size, | 58 void ApplyBuffer(const webrtc::DesktopSize& view_size, |
58 const webrtc::DesktopRect& clip_area, | 59 const webrtc::DesktopRect& clip_area, |
59 webrtc::DesktopFrame* buffer, | 60 webrtc::DesktopFrame* buffer, |
60 const webrtc::DesktopRegion& region, | 61 const webrtc::DesktopRegion& region, |
61 const webrtc::DesktopRegion& shape) override; | 62 const webrtc::DesktopRegion& shape) override; |
62 void ReturnBuffer(webrtc::DesktopFrame* buffer) override; | 63 void ReturnBuffer(webrtc::DesktopFrame* buffer) override; |
63 void SetSourceSize(const webrtc::DesktopSize& source_size, | 64 void SetSourceSize(const webrtc::DesktopSize& source_size, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 133 |
133 pp::CompletionCallbackFactory<PepperVideoRenderer2D> callback_factory_; | 134 pp::CompletionCallbackFactory<PepperVideoRenderer2D> callback_factory_; |
134 base::WeakPtrFactory<PepperVideoRenderer2D> weak_factory_; | 135 base::WeakPtrFactory<PepperVideoRenderer2D> weak_factory_; |
135 | 136 |
136 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer2D); | 137 DISALLOW_COPY_AND_ASSIGN(PepperVideoRenderer2D); |
137 }; | 138 }; |
138 | 139 |
139 } // namespace remoting | 140 } // namespace remoting |
140 | 141 |
141 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ | 142 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_2D_H_ |
OLD | NEW |