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

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

Issue 2616213002: Fix WebrtcVideoStream to handle failed capture requests. (Closed)
Patch Set: Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_WEBRTC_VIDEO_ENCODER_H_ 5 #ifndef REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_H_
6 #define REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_H_ 6 #define REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 struct EncodedFrame { 47 struct EncodedFrame {
48 webrtc::DesktopSize size; 48 webrtc::DesktopSize size;
49 std::string data; 49 std::string data;
50 bool key_frame; 50 bool key_frame;
51 int quantizer; 51 int quantizer;
52 }; 52 };
53 53
54 virtual ~WebrtcVideoEncoder() {} 54 virtual ~WebrtcVideoEncoder() {}
55 55
56 // Encode an image stored in |frame|. If |frame.updated_region()| is empty 56 // Encode an image stored in |frame|. If frame.updated_region() is empty
57 // then the encoder may return a packet (e.g. to top-off previously-encoded 57 // then the encoder may return a frame (e.g. to top-off previously-encoded
58 // portions of the frame to higher quality) or return nullptr to indicate that 58 // portions of the frame to higher quality) or return nullptr to indicate that
59 // there is no work to do. 59 // there is no work to do. |frame| may be nullptr. This case must be handled
60 // the same as if frame.updated_region() is empty.
60 virtual std::unique_ptr<EncodedFrame> Encode( 61 virtual std::unique_ptr<EncodedFrame> Encode(
61 const webrtc::DesktopFrame& frame, 62 const webrtc::DesktopFrame* frame,
62 const FrameParams& param) = 0; 63 const FrameParams& param) = 0;
63 }; 64 };
64 65
65 } // namespace remoting 66 } // namespace remoting
66 67
67 #endif // REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_H_ 68 #endif // REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/codec/webrtc_video_encoder_vpx.h » ('j') | remoting/protocol/connection_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698