| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CODEC_VIDEO_ENCODER_H_ | 5 #ifndef REMOTING_CODEC_VIDEO_ENCODER_H_ |
| 6 #define REMOTING_CODEC_VIDEO_ENCODER_H_ | 6 #define REMOTING_CODEC_VIDEO_ENCODER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // Encode an image stored in |frame|. If |frame.updated_region()| is empty | 33 // Encode an image stored in |frame|. If |frame.updated_region()| is empty |
| 34 // then the encoder may return a packet (e.g. to top-off previously-encoded | 34 // then the encoder may return a packet (e.g. to top-off previously-encoded |
| 35 // portions of the frame to higher quality) or return nullptr to indicate that | 35 // portions of the frame to higher quality) or return nullptr to indicate that |
| 36 // there is no work to do. | 36 // there is no work to do. |
| 37 virtual std::unique_ptr<VideoPacket> Encode(const webrtc::DesktopFrame& frame, | 37 virtual std::unique_ptr<VideoPacket> Encode(const webrtc::DesktopFrame& frame, |
| 38 uint32_t flags) = 0; | 38 uint32_t flags) = 0; |
| 39 | 39 |
| 40 static std::unique_ptr<VideoEncoder> Create( | 40 static std::unique_ptr<VideoEncoder> Create( |
| 41 const protocol::SessionConfig& config); | 41 const protocol::SessionConfig& config); |
| 42 virtual void UpdateTargetBitrate(int bitrate_kbps) {} |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 } // namespace remoting | 45 } // namespace remoting |
| 45 | 46 |
| 46 #endif // REMOTING_CODEC_VIDEO_ENCODER_H_ | 47 #endif // REMOTING_CODEC_VIDEO_ENCODER_H_ |
| OLD | NEW |