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

Side by Side Diff: webrtc/video/vie_encoder.h

Issue 1972083002: Move logic for calculating needed bitrate overhead used by NACK and FEC to VideoSender. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed Åsas comments. Created 4 years, 6 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 | « webrtc/video/video_send_stream.cc ('k') | webrtc/video/vie_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 uint8_t pl_type, 77 uint8_t pl_type,
78 bool internal_source); 78 bool internal_source);
79 int32_t DeRegisterExternalEncoder(uint8_t pl_type); 79 int32_t DeRegisterExternalEncoder(uint8_t pl_type);
80 void SetEncoder(const VideoCodec& video_codec, 80 void SetEncoder(const VideoCodec& video_codec,
81 int min_transmit_bitrate_bps, 81 int min_transmit_bitrate_bps,
82 size_t max_data_payload_length); 82 size_t max_data_payload_length);
83 83
84 void EncodeVideoFrame(const VideoFrame& video_frame); 84 void EncodeVideoFrame(const VideoFrame& video_frame);
85 void SendKeyFrame(); 85 void SendKeyFrame();
86 86
87 uint32_t LastObservedBitrateBps() const;
88 // Loss protection. Must be called before SetEncoder() to have max packet size
89 // updated according to protection.
90 // TODO(pbos): Set protection method on construction.
91 void SetProtectionMethod(bool nack, bool fec);
92
93 // Implements VideoEncoderRateObserver. 87 // Implements VideoEncoderRateObserver.
88 // TODO(perkj): Refactor VideoEncoderRateObserver. This is only used for
89 // stats. The stats should be set in VideoSendStream instead.
90 // |bitrate_bps| is the target bitrate and |framerate| is the input frame
91 // rate so it has nothing to do with the actual encoder.
94 void OnSetRates(uint32_t bitrate_bps, int framerate) override; 92 void OnSetRates(uint32_t bitrate_bps, int framerate) override;
95 93
96 // Implements EncodedImageCallback. 94 // Implements EncodedImageCallback.
97 int32_t Encoded(const EncodedImage& encoded_image, 95 int32_t Encoded(const EncodedImage& encoded_image,
98 const CodecSpecificInfo* codec_specific_info, 96 const CodecSpecificInfo* codec_specific_info,
99 const RTPFragmentationHeader* fragmentation) override; 97 const RTPFragmentationHeader* fragmentation) override;
100 98
101 // Implements VideoSendStatisticsCallback. 99 // Implements VideoSendStatisticsCallback.
102 void SendStatistics(uint32_t bit_rate, 100 void SendStatistics(uint32_t bit_rate,
103 uint32_t frame_rate, 101 uint32_t frame_rate,
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 uint8_t picture_id_sli_ GUARDED_BY(data_cs_); 144 uint8_t picture_id_sli_ GUARDED_BY(data_cs_);
147 bool has_received_rpsi_ GUARDED_BY(data_cs_); 145 bool has_received_rpsi_ GUARDED_BY(data_cs_);
148 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_); 146 uint64_t picture_id_rpsi_ GUARDED_BY(data_cs_);
149 147
150 bool video_suspended_ GUARDED_BY(data_cs_); 148 bool video_suspended_ GUARDED_BY(data_cs_);
151 }; 149 };
152 150
153 } // namespace webrtc 151 } // namespace webrtc
154 152
155 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ 153 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/video/vie_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698