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

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: Created 4 years, 1 month 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 /* 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // one layer is specified. 191 // one layer is specified.
190 std::unique_ptr<SimulcastRateAllocator> rate_allocator_ 192 std::unique_ptr<SimulcastRateAllocator> rate_allocator_
191 ACCESS_ON(&encoder_queue_); 193 ACCESS_ON(&encoder_queue_);
192 194
193 // Set when ConfigureEncoder has been called in order to lazy reconfigure the 195 // Set when ConfigureEncoder has been called in order to lazy reconfigure the
194 // encoder on the next frame. 196 // encoder on the next frame.
195 bool pending_encoder_reconfiguration_ ACCESS_ON(&encoder_queue_); 197 bool pending_encoder_reconfiguration_ ACCESS_ON(&encoder_queue_);
196 rtc::Optional<VideoFrameInfo> last_frame_info_ ACCESS_ON(&encoder_queue_); 198 rtc::Optional<VideoFrameInfo> last_frame_info_ ACCESS_ON(&encoder_queue_);
197 uint32_t encoder_start_bitrate_bps_ ACCESS_ON(&encoder_queue_); 199 uint32_t encoder_start_bitrate_bps_ ACCESS_ON(&encoder_queue_);
198 size_t max_data_payload_length_ ACCESS_ON(&encoder_queue_); 200 size_t max_data_payload_length_ ACCESS_ON(&encoder_queue_);
201 bool nack_enabled_ ACCESS_ON(&encoder_queue_);
199 uint32_t last_observed_bitrate_bps_ ACCESS_ON(&encoder_queue_); 202 uint32_t last_observed_bitrate_bps_ ACCESS_ON(&encoder_queue_);
200 bool encoder_paused_and_dropped_frame_ ACCESS_ON(&encoder_queue_); 203 bool encoder_paused_and_dropped_frame_ ACCESS_ON(&encoder_queue_);
201 bool has_received_sli_ ACCESS_ON(&encoder_queue_); 204 bool has_received_sli_ ACCESS_ON(&encoder_queue_);
202 uint8_t picture_id_sli_ ACCESS_ON(&encoder_queue_); 205 uint8_t picture_id_sli_ ACCESS_ON(&encoder_queue_);
203 bool has_received_rpsi_ ACCESS_ON(&encoder_queue_); 206 bool has_received_rpsi_ ACCESS_ON(&encoder_queue_);
204 uint64_t picture_id_rpsi_ ACCESS_ON(&encoder_queue_); 207 uint64_t picture_id_rpsi_ ACCESS_ON(&encoder_queue_);
205 Clock* const clock_; 208 Clock* const clock_;
206 209
207 VideoSendStream::DegradationPreference degradation_preference_ 210 VideoSendStream::DegradationPreference degradation_preference_
208 ACCESS_ON(&encoder_queue_); 211 ACCESS_ON(&encoder_queue_);
(...skipping 23 matching lines...) Expand all
232 // All public methods are proxied to |encoder_queue_|. It must must be 235 // All public methods are proxied to |encoder_queue_|. It must must be
233 // destroyed first to make sure no tasks are run that use other members. 236 // destroyed first to make sure no tasks are run that use other members.
234 rtc::TaskQueue encoder_queue_; 237 rtc::TaskQueue encoder_queue_;
235 238
236 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); 239 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder);
237 }; 240 };
238 241
239 } // namespace webrtc 242 } // namespace webrtc
240 243
241 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ 244 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698