Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: remoting/codec/video_encoder.h

Issue 1846893002: Interface with webrtc through encoded frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sergey comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/codec/codec_test.cc ('k') | remoting/codec/video_encoder_verbatim.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
9
8 #include <memory> 10 #include <memory>
9 11
10 namespace webrtc { 12 namespace webrtc {
11 class DesktopFrame; 13 class DesktopFrame;
12 } // namespace webrtc 14 } // namespace webrtc
13 15
14 namespace remoting { 16 namespace remoting {
15 17
16 class VideoPacket; 18 class VideoPacket;
17 19
18 // A class to perform the task of encoding a continuous stream of images. The 20 // A class to perform the task of encoding a continuous stream of images. The
19 // interface is asynchronous to enable maximum throughput. 21 // interface is asynchronous to enable maximum throughput.
20 class VideoEncoder { 22 class VideoEncoder {
21 public: 23 public:
24 enum Flags { REQUEST_KEY_FRAME = 1 << 0 };
22 virtual ~VideoEncoder() {} 25 virtual ~VideoEncoder() {}
23 26
24 // Request that the encoder provide lossless encoding, or color, if possible. 27 // Request that the encoder provide lossless encoding, or color, if possible.
25 virtual void SetLosslessEncode(bool want_lossless) {} 28 virtual void SetLosslessEncode(bool want_lossless) {}
26 virtual void SetLosslessColor(bool want_lossless) {} 29 virtual void SetLosslessColor(bool want_lossless) {}
27 30
28 // Encode an image stored in |frame|. If |frame.updated_region()| is empty 31 // Encode an image stored in |frame|. If |frame.updated_region()| is empty
29 // then the encoder may return a packet (e.g. to top-off previously-encoded 32 // then the encoder may return a packet (e.g. to top-off previously-encoded
30 // portions of the frame to higher quality) or return nullptr to indicate that 33 // portions of the frame to higher quality) or return nullptr to indicate that
31 // there is no work to do. 34 // there is no work to do.
32 virtual std::unique_ptr<VideoPacket> Encode( 35 virtual std::unique_ptr<VideoPacket> Encode(const webrtc::DesktopFrame& frame,
33 const webrtc::DesktopFrame& frame) = 0; 36 uint32_t flags) = 0;
34 }; 37 };
35 38
36 } // namespace remoting 39 } // namespace remoting
37 40
38 #endif // REMOTING_CODEC_VIDEO_ENCODER_H_ 41 #endif // REMOTING_CODEC_VIDEO_ENCODER_H_
OLDNEW
« no previous file with comments | « remoting/codec/codec_test.cc ('k') | remoting/codec/video_encoder_verbatim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698