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

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

Issue 2493893003: Turn off error resilience for vp8 for no temporal layers if nack is enabled. (Closed)
Patch Set: address comments Created 4 years 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Sets the |sink| that gets the encoded frames. |rotation_applied| means 86 // Sets the |sink| that gets the encoded frames. |rotation_applied| means
87 // that the source must support rotation. Only set |rotation_applied| if the 87 // that the source must support rotation. Only set |rotation_applied| if the
88 // remote side does not support the rotation extension. 88 // remote side does not support the rotation extension.
89 void SetSink(EncoderSink* sink, bool rotation_applied); 89 void SetSink(EncoderSink* sink, bool rotation_applied);
90 90
91 // TODO(perkj): Can we remove VideoCodec.startBitrate ? 91 // TODO(perkj): Can we remove VideoCodec.startBitrate ?
92 void SetStartBitrate(int start_bitrate_bps); 92 void SetStartBitrate(int start_bitrate_bps);
93 93
94 void ConfigureEncoder(VideoEncoderConfig config, 94 void ConfigureEncoder(VideoEncoderConfig config,
95 size_t max_data_payload_length); 95 size_t max_data_payload_length,
96 bool nack_enabled);
96 97
97 // Permanently stop encoding. After this method has returned, it is 98 // Permanently stop encoding. After this method has returned, it is
98 // guaranteed that no encoded frames will be delivered to the sink. 99 // guaranteed that no encoded frames will be delivered to the sink.
99 void Stop(); 100 void Stop();
100 101
101 void SendKeyFrame(); 102 void SendKeyFrame();
102 103
103 // virtual to test EncoderStateFeedback with mocks. 104 // virtual to test EncoderStateFeedback with mocks.
104 virtual void OnReceivedIntraFrameRequest(size_t stream_index); 105 virtual void OnReceivedIntraFrameRequest(size_t stream_index);
105 virtual void OnReceivedSLI(uint8_t picture_id); 106 virtual void OnReceivedSLI(uint8_t picture_id);
(...skipping 27 matching lines...) Expand all
133 height(height), 134 height(height),
134 rotation(rotation), 135 rotation(rotation),
135 is_texture(is_texture) {} 136 is_texture(is_texture) {}
136 int width; 137 int width;
137 int height; 138 int height;
138 VideoRotation rotation; 139 VideoRotation rotation;
139 bool is_texture; 140 bool is_texture;
140 }; 141 };
141 142
142 void ConfigureEncoderOnTaskQueue(VideoEncoderConfig config, 143 void ConfigureEncoderOnTaskQueue(VideoEncoderConfig config,
143 size_t max_data_payload_length); 144 size_t max_data_payload_length,
145 bool nack_enabled);
144 void ReconfigureEncoder(); 146 void ReconfigureEncoder();
145 147
146 // Implements VideoSinkInterface. 148 // Implements VideoSinkInterface.
147 void OnFrame(const VideoFrame& video_frame) override; 149 void OnFrame(const VideoFrame& video_frame) override;
148 150
149 // Implements VideoSendStatisticsCallback. 151 // Implements VideoSendStatisticsCallback.
150 void SendStatistics(uint32_t bit_rate, 152 void SendStatistics(uint32_t bit_rate,
151 uint32_t frame_rate) override; 153 uint32_t frame_rate) override;
152 154
153 void EncodeVideoFrame(const VideoFrame& frame, 155 void EncodeVideoFrame(const VideoFrame& frame,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 VideoEncoderConfig encoder_config_ ACCESS_ON(&encoder_queue_); 188 VideoEncoderConfig encoder_config_ ACCESS_ON(&encoder_queue_);
187 std::unique_ptr<VideoBitrateAllocator> rate_allocator_ 189 std::unique_ptr<VideoBitrateAllocator> rate_allocator_
188 ACCESS_ON(&encoder_queue_); 190 ACCESS_ON(&encoder_queue_);
189 191
190 // Set when ConfigureEncoder has been called in order to lazy reconfigure the 192 // Set when ConfigureEncoder has been called in order to lazy reconfigure the
191 // encoder on the next frame. 193 // encoder on the next frame.
192 bool pending_encoder_reconfiguration_ ACCESS_ON(&encoder_queue_); 194 bool pending_encoder_reconfiguration_ ACCESS_ON(&encoder_queue_);
193 rtc::Optional<VideoFrameInfo> last_frame_info_ ACCESS_ON(&encoder_queue_); 195 rtc::Optional<VideoFrameInfo> last_frame_info_ ACCESS_ON(&encoder_queue_);
194 uint32_t encoder_start_bitrate_bps_ ACCESS_ON(&encoder_queue_); 196 uint32_t encoder_start_bitrate_bps_ ACCESS_ON(&encoder_queue_);
195 size_t max_data_payload_length_ ACCESS_ON(&encoder_queue_); 197 size_t max_data_payload_length_ ACCESS_ON(&encoder_queue_);
198 bool nack_enabled_ ACCESS_ON(&encoder_queue_);
196 uint32_t last_observed_bitrate_bps_ ACCESS_ON(&encoder_queue_); 199 uint32_t last_observed_bitrate_bps_ ACCESS_ON(&encoder_queue_);
197 bool encoder_paused_and_dropped_frame_ ACCESS_ON(&encoder_queue_); 200 bool encoder_paused_and_dropped_frame_ ACCESS_ON(&encoder_queue_);
198 bool has_received_sli_ ACCESS_ON(&encoder_queue_); 201 bool has_received_sli_ ACCESS_ON(&encoder_queue_);
199 uint8_t picture_id_sli_ ACCESS_ON(&encoder_queue_); 202 uint8_t picture_id_sli_ ACCESS_ON(&encoder_queue_);
200 bool has_received_rpsi_ ACCESS_ON(&encoder_queue_); 203 bool has_received_rpsi_ ACCESS_ON(&encoder_queue_);
201 uint64_t picture_id_rpsi_ ACCESS_ON(&encoder_queue_); 204 uint64_t picture_id_rpsi_ ACCESS_ON(&encoder_queue_);
202 Clock* const clock_; 205 Clock* const clock_;
203 206
204 VideoSendStream::DegradationPreference degradation_preference_ 207 VideoSendStream::DegradationPreference degradation_preference_
205 ACCESS_ON(&encoder_queue_); 208 ACCESS_ON(&encoder_queue_);
(...skipping 23 matching lines...) Expand all
229 // All public methods are proxied to |encoder_queue_|. It must must be 232 // All public methods are proxied to |encoder_queue_|. It must must be
230 // destroyed first to make sure no tasks are run that use other members. 233 // destroyed first to make sure no tasks are run that use other members.
231 rtc::TaskQueue encoder_queue_; 234 rtc::TaskQueue encoder_queue_;
232 235
233 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); 236 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder);
234 }; 237 };
235 238
236 } // namespace webrtc 239 } // namespace webrtc
237 240
238 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ 241 #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