| 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_MEDIA_SOURCE_VIDEO_RENDERER_H_ | 5 #ifndef REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ |
| 6 #define REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ | 6 #define REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Called when the MediaSource needs to be reset (e.g. because screen size | 36 // Called when the MediaSource needs to be reset (e.g. because screen size |
| 37 // has changed). | 37 // has changed). |
| 38 virtual void OnMediaSourceReset(const std::string& format) = 0; | 38 virtual void OnMediaSourceReset(const std::string& format) = 0; |
| 39 | 39 |
| 40 // Called when new data becomes available. | 40 // Called when new data becomes available. |
| 41 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size, | 41 virtual void OnMediaSourceData(uint8_t* buffer, size_t buffer_size, |
| 42 bool keyframe) = 0; | 42 bool keyframe) = 0; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 explicit MediaSourceVideoRenderer(Delegate* delegate); | 45 explicit MediaSourceVideoRenderer(Delegate* delegate); |
| 46 virtual ~MediaSourceVideoRenderer(); | 46 ~MediaSourceVideoRenderer() override; |
| 47 | 47 |
| 48 // VideoRenderer interface. | 48 // VideoRenderer interface. |
| 49 virtual void Initialize(const protocol::SessionConfig& config) override; | 49 void Initialize(const protocol::SessionConfig& config) override; |
| 50 virtual ChromotingStats* GetStats() override; | 50 ChromotingStats* GetStats() override; |
| 51 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, | 51 void ProcessVideoPacket(scoped_ptr<VideoPacket> packet, |
| 52 const base::Closure& done) override; | 52 const base::Closure& done) override; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 // Helper class used to generate WebM stream. | 55 // Helper class used to generate WebM stream. |
| 56 class VideoWriter; | 56 class VideoWriter; |
| 57 | 57 |
| 58 Delegate* delegate_; | 58 Delegate* delegate_; |
| 59 | 59 |
| 60 std::string format_string_; | 60 std::string format_string_; |
| 61 const char* codec_id_; | 61 const char* codec_id_; |
| 62 | 62 |
| 63 scoped_ptr<VideoWriter> writer_; | 63 scoped_ptr<VideoWriter> writer_; |
| 64 webrtc::DesktopVector frame_dpi_; | 64 webrtc::DesktopVector frame_dpi_; |
| 65 webrtc::DesktopRegion desktop_shape_; | 65 webrtc::DesktopRegion desktop_shape_; |
| 66 | 66 |
| 67 ChromotingStats stats_; | 67 ChromotingStats stats_; |
| 68 int64 latest_sequence_number_; | 68 int64 latest_sequence_number_; |
| 69 | 69 |
| 70 DISALLOW_COPY_AND_ASSIGN(MediaSourceVideoRenderer); | 70 DISALLOW_COPY_AND_ASSIGN(MediaSourceVideoRenderer); |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace remoting | 73 } // namespace remoting |
| 74 | 74 |
| 75 #endif // REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ | 75 #endif // REMOTING_CLIENT_PLUGIN_MEDIA_SOURCE_VIDEO_RENDERER_H_ |
| OLD | NEW |