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

Side by Side Diff: remoting/codec/webrtc_video_encoder_vpx.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_VPX_H_ 5 #ifndef REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_VPX_H_
6 #define REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_VPX_H_ 6 #define REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_VPX_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 23 matching lines...) Expand all
34 static std::unique_ptr<WebrtcVideoEncoderVpx> CreateForVP9(); 34 static std::unique_ptr<WebrtcVideoEncoderVpx> CreateForVP9();
35 35
36 ~WebrtcVideoEncoderVpx() override; 36 ~WebrtcVideoEncoderVpx() override;
37 37
38 void SetTickClockForTests(base::TickClock* tick_clock); 38 void SetTickClockForTests(base::TickClock* tick_clock);
39 39
40 void SetLosslessEncode(bool want_lossless); 40 void SetLosslessEncode(bool want_lossless);
41 void SetLosslessColor(bool want_lossless); 41 void SetLosslessColor(bool want_lossless);
42 42
43 // WebrtcVideoEncoder interface. 43 // WebrtcVideoEncoder interface.
44 std::unique_ptr<EncodedFrame> Encode(const webrtc::DesktopFrame& frame, 44 std::unique_ptr<EncodedFrame> Encode(const webrtc::DesktopFrame* frame,
45 const FrameParams& params) override; 45 const FrameParams& params) override;
46 46
47 private: 47 private:
48 explicit WebrtcVideoEncoderVpx(bool use_vp9); 48 explicit WebrtcVideoEncoderVpx(bool use_vp9);
49 49
50 // (Re)Configures this instance to encode frames of the specified |size|, 50 // (Re)Configures this instance to encode frames of the specified |size|,
51 // with the configured lossless color & encoding modes. 51 // with the configured lossless color & encoding modes.
52 void Configure(const webrtc::DesktopSize& size); 52 void Configure(const webrtc::DesktopSize& size);
53 53
54 // Updates codec configuration. 54 // Updates codec configuration.
55 void UpdateConfig(const FrameParams& params); 55 void UpdateConfig(const FrameParams& params);
56 56
57 // Prepares |image_| for encoding. Writes updated rectangles into 57 // Prepares |image_| for encoding. Writes updated rectangles into
58 // |updated_region|. 58 // |updated_region|.
59 void PrepareImage(const webrtc::DesktopFrame& frame, 59 void PrepareImage(const webrtc::DesktopFrame* frame,
60 webrtc::DesktopRegion* updated_region); 60 webrtc::DesktopRegion* updated_region);
61 61
62 // Clears active map. 62 // Clears active map.
63 void ClearActiveMap(); 63 void ClearActiveMap();
64 64
65 // Updates the active map according to |updated_region|. Active map is then 65 // Updates the active map according to |updated_region|. Active map is then
66 // given to the encoder to speed up encoding. 66 // given to the encoder to speed up encoding.
67 void SetActiveMapFromRegion(const webrtc::DesktopRegion& updated_region); 67 void SetActiveMapFromRegion(const webrtc::DesktopRegion& updated_region);
68 68
69 // Adds areas changed in the most recent frame to |updated_region|. This 69 // Adds areas changed in the most recent frame to |updated_region|. This
(...skipping 26 matching lines...) Expand all
96 96
97 base::DefaultTickClock default_tick_clock_; 97 base::DefaultTickClock default_tick_clock_;
98 base::TickClock* clock_; 98 base::TickClock* clock_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoEncoderVpx); 100 DISALLOW_COPY_AND_ASSIGN(WebrtcVideoEncoderVpx);
101 }; 101 };
102 102
103 } // namespace remoting 103 } // namespace remoting
104 104
105 #endif // REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_VPX_H_ 105 #endif // REMOTING_CODEC_WEBRTC_VIDEO_ENCODER_VPX_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698