OLD | NEW |
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 class RtpStreamReceiver : public RtpData, | 58 class RtpStreamReceiver : public RtpData, |
59 public RtpFeedback, | 59 public RtpFeedback, |
60 public VCMFrameTypeCallback, | 60 public VCMFrameTypeCallback, |
61 public VCMPacketRequestCallback, | 61 public VCMPacketRequestCallback, |
62 public video_coding::OnReceivedFrameCallback, | 62 public video_coding::OnReceivedFrameCallback, |
63 public video_coding::OnCompleteFrameCallback, | 63 public video_coding::OnCompleteFrameCallback, |
64 public CallStatsObserver { | 64 public CallStatsObserver { |
65 public: | 65 public: |
66 RtpStreamReceiver( | 66 RtpStreamReceiver( |
| 67 vcm::VideoReceiver* video_receiver, |
67 Transport* transport, | 68 Transport* transport, |
68 RtcpRttStats* rtt_stats, | 69 RtcpRttStats* rtt_stats, |
69 PacketRouter* packet_router, | 70 PacketRouter* packet_router, |
70 VieRemb* remb, | 71 VieRemb* remb, |
71 const VideoReceiveStream::Config* config, | 72 const VideoReceiveStream::Config* config, |
72 ReceiveStatisticsProxy* receive_stats_proxy, | 73 ReceiveStatisticsProxy* receive_stats_proxy, |
73 ProcessThread* process_thread, | 74 ProcessThread* process_thread, |
74 NackSender* nack_sender, | 75 NackSender* nack_sender, |
75 KeyFrameRequestSender* keyframe_request_sender, | 76 KeyFrameRequestSender* keyframe_request_sender, |
76 video_coding::OnCompleteFrameCallback* complete_frame_callback, | 77 video_coding::OnCompleteFrameCallback* complete_frame_callback, |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bool IsPacketInOrder(const RTPHeader& header) const; | 153 bool IsPacketInOrder(const RTPHeader& header) const; |
153 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; | 154 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; |
154 void UpdateHistograms(); | 155 void UpdateHistograms(); |
155 void EnableReceiveRtpHeaderExtension(const std::string& extension, int id); | 156 void EnableReceiveRtpHeaderExtension(const std::string& extension, int id); |
156 bool IsRedEnabled() const; | 157 bool IsRedEnabled() const; |
157 void InsertSpsPpsIntoTracker(uint8_t payload_type); | 158 void InsertSpsPpsIntoTracker(uint8_t payload_type); |
158 | 159 |
159 Clock* const clock_; | 160 Clock* const clock_; |
160 // Ownership of this object lies with VideoReceiveStream, which owns |this|. | 161 // Ownership of this object lies with VideoReceiveStream, which owns |this|. |
161 const VideoReceiveStream::Config& config_; | 162 const VideoReceiveStream::Config& config_; |
| 163 vcm::VideoReceiver* const video_receiver_; |
162 PacketRouter* const packet_router_; | 164 PacketRouter* const packet_router_; |
163 VieRemb* const remb_; | 165 VieRemb* const remb_; |
164 ProcessThread* const process_thread_; | 166 ProcessThread* const process_thread_; |
165 | 167 |
166 RemoteNtpTimeEstimator ntp_estimator_; | 168 RemoteNtpTimeEstimator ntp_estimator_; |
167 RTPPayloadRegistry rtp_payload_registry_; | 169 RTPPayloadRegistry rtp_payload_registry_; |
168 | 170 |
169 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_; | 171 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_; |
170 const std::unique_ptr<RtpReceiver> rtp_receiver_; | 172 const std::unique_ptr<RtpReceiver> rtp_receiver_; |
171 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; | 173 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
172 std::unique_ptr<UlpfecReceiver> ulpfec_receiver_; | 174 std::unique_ptr<UlpfecReceiver> ulpfec_receiver_; |
173 | 175 |
174 rtc::CriticalSection receive_cs_; | 176 rtc::CriticalSection receive_cs_; |
175 bool receiving_ GUARDED_BY(receive_cs_); | 177 bool receiving_ GUARDED_BY(receive_cs_); |
176 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_); | 178 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_); |
177 bool restored_packet_in_use_ GUARDED_BY(receive_cs_); | 179 bool restored_packet_in_use_ GUARDED_BY(receive_cs_); |
178 int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_); | 180 int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_); |
179 | 181 |
180 const std::unique_ptr<RtpRtcp> rtp_rtcp_; | 182 const std::unique_ptr<RtpRtcp> rtp_rtcp_; |
181 | 183 |
182 // Members for the new jitter buffer experiment. | 184 // Members for the new jitter buffer experiment. |
| 185 bool jitter_buffer_experiment_; |
183 video_coding::OnCompleteFrameCallback* complete_frame_callback_; | 186 video_coding::OnCompleteFrameCallback* complete_frame_callback_; |
184 KeyFrameRequestSender* keyframe_request_sender_; | 187 KeyFrameRequestSender* keyframe_request_sender_; |
185 VCMTiming* timing_; | 188 VCMTiming* timing_; |
186 std::unique_ptr<NackModule> nack_module_; | 189 std::unique_ptr<NackModule> nack_module_; |
187 rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_; | 190 rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_; |
188 std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_; | 191 std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_; |
189 rtc::CriticalSection last_seq_num_cs_; | 192 rtc::CriticalSection last_seq_num_cs_; |
190 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>> | 193 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>> |
191 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_); |
192 video_coding::H264SpsPpsTracker tracker_; | 195 video_coding::H264SpsPpsTracker tracker_; |
193 // TODO(johan): Remove pt_codec_params_ once | 196 // TODO(johan): Remove pt_codec_params_ once |
194 // 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. |
195 // 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. |
196 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_; |
197 int16_t last_payload_type_ = -1; | 200 int16_t last_payload_type_ = -1; |
198 }; | 201 }; |
199 | 202 |
200 } // namespace webrtc | 203 } // namespace webrtc |
201 | 204 |
202 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ | 205 #endif // WEBRTC_VIDEO_RTP_STREAM_RECEIVER_H_ |
OLD | NEW |