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

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

Issue 2652043005: Reland of Make the new jitter buffer the default jitter buffer. (Closed)
Patch Set: Rebase Created 3 years, 10 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/receive_statistics_proxy_unittest.cc ('k') | webrtc/video/rtp_stream_receiver.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 class RtpStreamReceiver : public RtpData, 59 class RtpStreamReceiver : public RtpData,
60 public RtpFeedback, 60 public RtpFeedback,
61 public VCMFrameTypeCallback, 61 public VCMFrameTypeCallback,
62 public VCMPacketRequestCallback, 62 public VCMPacketRequestCallback,
63 public video_coding::OnReceivedFrameCallback, 63 public video_coding::OnReceivedFrameCallback,
64 public video_coding::OnCompleteFrameCallback, 64 public video_coding::OnCompleteFrameCallback,
65 public CallStatsObserver { 65 public CallStatsObserver {
66 public: 66 public:
67 RtpStreamReceiver( 67 RtpStreamReceiver(
68 vcm::VideoReceiver* video_receiver,
69 RemoteBitrateEstimator* remote_bitrate_estimator, 68 RemoteBitrateEstimator* remote_bitrate_estimator,
70 Transport* transport, 69 Transport* transport,
71 RtcpRttStats* rtt_stats, 70 RtcpRttStats* rtt_stats,
72 PacketRouter* packet_router, 71 PacketRouter* packet_router,
73 VieRemb* remb, 72 VieRemb* remb,
74 const VideoReceiveStream::Config* config, 73 const VideoReceiveStream::Config* config,
75 ReceiveStatisticsProxy* receive_stats_proxy, 74 ReceiveStatisticsProxy* receive_stats_proxy,
76 ProcessThread* process_thread, 75 ProcessThread* process_thread,
77 NackSender* nack_sender, 76 NackSender* nack_sender,
78 KeyFrameRequestSender* keyframe_request_sender, 77 KeyFrameRequestSender* keyframe_request_sender,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 bool IsPacketInOrder(const RTPHeader& header) const; 154 bool IsPacketInOrder(const RTPHeader& header) const;
156 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; 155 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const;
157 void UpdateHistograms(); 156 void UpdateHistograms();
158 void EnableReceiveRtpHeaderExtension(const std::string& extension, int id); 157 void EnableReceiveRtpHeaderExtension(const std::string& extension, int id);
159 bool IsRedEnabled() const; 158 bool IsRedEnabled() const;
160 void InsertSpsPpsIntoTracker(uint8_t payload_type); 159 void InsertSpsPpsIntoTracker(uint8_t payload_type);
161 160
162 Clock* const clock_; 161 Clock* const clock_;
163 // Ownership of this object lies with VideoReceiveStream, which owns |this|. 162 // Ownership of this object lies with VideoReceiveStream, which owns |this|.
164 const VideoReceiveStream::Config& config_; 163 const VideoReceiveStream::Config& config_;
165 vcm::VideoReceiver* const video_receiver_;
166 RemoteBitrateEstimator* const remote_bitrate_estimator_; 164 RemoteBitrateEstimator* const remote_bitrate_estimator_;
167 PacketRouter* const packet_router_; 165 PacketRouter* const packet_router_;
168 VieRemb* const remb_; 166 VieRemb* const remb_;
169 ProcessThread* const process_thread_; 167 ProcessThread* const process_thread_;
170 168
171 RemoteNtpTimeEstimator ntp_estimator_; 169 RemoteNtpTimeEstimator ntp_estimator_;
172 RTPPayloadRegistry rtp_payload_registry_; 170 RTPPayloadRegistry rtp_payload_registry_;
173 171
174 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_; 172 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_;
175 const std::unique_ptr<RtpReceiver> rtp_receiver_; 173 const std::unique_ptr<RtpReceiver> rtp_receiver_;
176 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; 174 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
177 std::unique_ptr<UlpfecReceiver> ulpfec_receiver_; 175 std::unique_ptr<UlpfecReceiver> ulpfec_receiver_;
178 176
179 rtc::CriticalSection receive_cs_; 177 rtc::CriticalSection receive_cs_;
180 bool receiving_ GUARDED_BY(receive_cs_); 178 bool receiving_ GUARDED_BY(receive_cs_);
181 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_); 179 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_);
182 bool restored_packet_in_use_ GUARDED_BY(receive_cs_); 180 bool restored_packet_in_use_ GUARDED_BY(receive_cs_);
183 int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_); 181 int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_);
184 182
185 const std::unique_ptr<RtpRtcp> rtp_rtcp_; 183 const std::unique_ptr<RtpRtcp> rtp_rtcp_;
186 184
187 // Members for the new jitter buffer experiment. 185 // Members for the new jitter buffer experiment.
188 bool jitter_buffer_experiment_;
189 video_coding::OnCompleteFrameCallback* complete_frame_callback_; 186 video_coding::OnCompleteFrameCallback* complete_frame_callback_;
190 KeyFrameRequestSender* keyframe_request_sender_; 187 KeyFrameRequestSender* keyframe_request_sender_;
191 VCMTiming* timing_; 188 VCMTiming* timing_;
192 std::unique_ptr<NackModule> nack_module_; 189 std::unique_ptr<NackModule> nack_module_;
193 rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_; 190 rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_;
194 std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_; 191 std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_;
195 rtc::CriticalSection last_seq_num_cs_; 192 rtc::CriticalSection last_seq_num_cs_;
196 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>> 193 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>>
197 last_seq_num_for_pic_id_ GUARDED_BY(last_seq_num_cs_); 194 last_seq_num_for_pic_id_ GUARDED_BY(last_seq_num_cs_);
198 video_coding::H264SpsPpsTracker tracker_; 195 video_coding::H264SpsPpsTracker tracker_;
199 // TODO(johan): Remove pt_codec_params_ once 196 // TODO(johan): Remove pt_codec_params_ once
200 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. 197 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved.
201 // Maps a payload type to a map of out-of-band supplied codec parameters. 198 // Maps a payload type to a map of out-of-band supplied codec parameters.
202 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; 199 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_;
203 int16_t last_payload_type_ = -1; 200 int16_t last_payload_type_ = -1;
204 }; 201 };
205 202
206 } // namespace webrtc 203 } // namespace webrtc
207 204
208 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ 205 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_
OLDNEW
« no previous file with comments | « webrtc/video/receive_statistics_proxy_unittest.cc ('k') | webrtc/video/rtp_stream_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698