| 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_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ | 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include "remoting/protocol/video_renderer.h" | 8 #include "remoting/protocol/video_renderer.h" |
| 9 | 9 |
| 10 namespace webrtc { | 10 namespace webrtc { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 public: | 33 public: |
| 34 EventHandler() {} | 34 EventHandler() {} |
| 35 virtual ~EventHandler() {} | 35 virtual ~EventHandler() {} |
| 36 | 36 |
| 37 // Called if video decoding fails, for any reason. | 37 // Called if video decoding fails, for any reason. |
| 38 virtual void OnVideoDecodeError() = 0; | 38 virtual void OnVideoDecodeError() = 0; |
| 39 | 39 |
| 40 // Called when the first frame is received. | 40 // Called when the first frame is received. |
| 41 virtual void OnVideoFirstFrameReceived() = 0; | 41 virtual void OnVideoFirstFrameReceived() = 0; |
| 42 | 42 |
| 43 // Called when stream size changes. | |
| 44 virtual void OnVideoSize(const webrtc::DesktopSize& size, | |
| 45 const webrtc::DesktopVector& dpi) = 0; | |
| 46 | |
| 47 // Called with each frame's updated region, if EnableDebugDirtyRegion(true) | 43 // Called with each frame's updated region, if EnableDebugDirtyRegion(true) |
| 48 // was called. | 44 // was called. |
| 49 virtual void OnVideoFrameDirtyRegion( | 45 virtual void OnVideoFrameDirtyRegion( |
| 50 const webrtc::DesktopRegion& dirty_region) = 0; | 46 const webrtc::DesktopRegion& dirty_region) = 0; |
| 51 }; | 47 }; |
| 52 | 48 |
| 53 // Initializes the renderer. |instance| and |event_handler| must outlive the | 49 // Initializes the renderer. |instance| and |event_handler| must outlive the |
| 54 // renderer. Returns false if the renderer cannot be initialized. | 50 // renderer. Returns false if the renderer cannot be initialized. |
| 55 virtual bool Initialize(pp::Instance* instance, | 51 virtual bool Initialize(pp::Instance* instance, |
| 56 const ClientContext& context, | 52 const ClientContext& context, |
| 57 EventHandler* event_handler, | 53 EventHandler* event_handler, |
| 58 protocol::PerformanceTracker* perf_tracker) = 0; | 54 protocol::PerformanceTracker* perf_tracker) = 0; |
| 59 | 55 |
| 60 // Must be called whenever the plugin view changes. | 56 // Must be called whenever the plugin view changes. |
| 61 virtual void OnViewChanged(const pp::View& view) = 0; | 57 virtual void OnViewChanged(const pp::View& view) = 0; |
| 62 | 58 |
| 63 // Enables or disables delivery of dirty region information to the | 59 // Enables or disables delivery of dirty region information to the |
| 64 // EventHandler, for debugging purposes. | 60 // EventHandler, for debugging purposes. |
| 65 virtual void EnableDebugDirtyRegion(bool enable) = 0; | 61 virtual void EnableDebugDirtyRegion(bool enable) = 0; |
| 66 }; | 62 }; |
| 67 | 63 |
| 68 } // namespace remoting | 64 } // namespace remoting |
| 69 | 65 |
| 70 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ | 66 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_VIDEO_RENDERER_H_ |
| OLD | NEW |