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

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

Issue 2987933003: Eliminate RtpVideoStreamReceiver::receive_cs_ in favor of using a SequencedTaskChecker (Closed)
Patch Set: Rebased Created 3 years, 4 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 | « no previous file | webrtc/video/rtp_video_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 14 matching lines...) Expand all
25 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h" 25 #include "webrtc/modules/rtp_rtcp/include/rtp_payload_registry.h"
26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
27 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 27 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
28 #include "webrtc/modules/video_coding/h264_sps_pps_tracker.h" 28 #include "webrtc/modules/video_coding/h264_sps_pps_tracker.h"
29 #include "webrtc/modules/video_coding/include/video_coding_defines.h" 29 #include "webrtc/modules/video_coding/include/video_coding_defines.h"
30 #include "webrtc/modules/video_coding/packet_buffer.h" 30 #include "webrtc/modules/video_coding/packet_buffer.h"
31 #include "webrtc/modules/video_coding/rtp_frame_reference_finder.h" 31 #include "webrtc/modules/video_coding/rtp_frame_reference_finder.h"
32 #include "webrtc/modules/video_coding/sequence_number_util.h" 32 #include "webrtc/modules/video_coding/sequence_number_util.h"
33 #include "webrtc/rtc_base/constructormagic.h" 33 #include "webrtc/rtc_base/constructormagic.h"
34 #include "webrtc/rtc_base/criticalsection.h" 34 #include "webrtc/rtc_base/criticalsection.h"
35 #include "webrtc/rtc_base/thread_checker.h" 35 #include "webrtc/rtc_base/sequenced_task_checker.h"
36 #include "webrtc/typedefs.h" 36 #include "webrtc/typedefs.h"
37 37
38 namespace webrtc { 38 namespace webrtc {
39 39
40 class NackModule; 40 class NackModule;
41 class PacedSender; 41 class PacedSender;
42 class PacketRouter; 42 class PacketRouter;
43 class ProcessThread; 43 class ProcessThread;
44 class ReceiveStatistics; 44 class ReceiveStatistics;
45 class ReceiveStatisticsProxy; 45 class ReceiveStatisticsProxy;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ProcessThread* const process_thread_; 176 ProcessThread* const process_thread_;
177 177
178 RemoteNtpTimeEstimator ntp_estimator_; 178 RemoteNtpTimeEstimator ntp_estimator_;
179 RTPPayloadRegistry rtp_payload_registry_; 179 RTPPayloadRegistry rtp_payload_registry_;
180 180
181 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_; 181 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_;
182 const std::unique_ptr<RtpReceiver> rtp_receiver_; 182 const std::unique_ptr<RtpReceiver> rtp_receiver_;
183 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; 183 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
184 std::unique_ptr<UlpfecReceiver> ulpfec_receiver_; 184 std::unique_ptr<UlpfecReceiver> ulpfec_receiver_;
185 185
186 rtc::CriticalSection receive_cs_; 186 rtc::SequencedTaskChecker worker_task_checker_;
187 bool receiving_ GUARDED_BY(receive_cs_); 187 bool receiving_ GUARDED_BY(worker_task_checker_);
188 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_); 188 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(worker_task_checker_);
189 bool restored_packet_in_use_ GUARDED_BY(receive_cs_); 189 bool restored_packet_in_use_ GUARDED_BY(worker_task_checker_);
190 int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_); 190 int64_t last_packet_log_ms_ GUARDED_BY(worker_task_checker_);
191 191
192 const std::unique_ptr<RtpRtcp> rtp_rtcp_; 192 const std::unique_ptr<RtpRtcp> rtp_rtcp_;
193 193
194 // Members for the new jitter buffer experiment. 194 // Members for the new jitter buffer experiment.
195 video_coding::OnCompleteFrameCallback* complete_frame_callback_; 195 video_coding::OnCompleteFrameCallback* complete_frame_callback_;
196 KeyFrameRequestSender* keyframe_request_sender_; 196 KeyFrameRequestSender* keyframe_request_sender_;
197 VCMTiming* timing_; 197 VCMTiming* timing_;
198 std::unique_ptr<NackModule> nack_module_; 198 std::unique_ptr<NackModule> nack_module_;
199 rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_; 199 rtc::scoped_refptr<video_coding::PacketBuffer> packet_buffer_;
200 std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_; 200 std::unique_ptr<video_coding::RtpFrameReferenceFinder> reference_finder_;
201 rtc::CriticalSection last_seq_num_cs_; 201 rtc::CriticalSection last_seq_num_cs_;
202 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>> 202 std::map<uint16_t, uint16_t, DescendingSeqNumComp<uint16_t>>
203 last_seq_num_for_pic_id_ GUARDED_BY(last_seq_num_cs_); 203 last_seq_num_for_pic_id_ GUARDED_BY(last_seq_num_cs_);
204 video_coding::H264SpsPpsTracker tracker_; 204 video_coding::H264SpsPpsTracker tracker_;
205 // TODO(johan): Remove pt_codec_params_ once 205 // TODO(johan): Remove pt_codec_params_ once
206 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved. 206 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6883 is resolved.
207 // Maps a payload type to a map of out-of-band supplied codec parameters. 207 // Maps a payload type to a map of out-of-band supplied codec parameters.
208 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_; 208 std::map<uint8_t, std::map<std::string, std::string>> pt_codec_params_;
209 int16_t last_payload_type_ = -1; 209 int16_t last_payload_type_ = -1;
210 210
211 bool has_received_frame_; 211 bool has_received_frame_;
212 212
213 // TODO(eladalon): https://bugs.chromium.org/p/webrtc/issues/detail?id=8056 213 std::vector<RtpPacketSinkInterface*> secondary_sinks_
214 // rtc::ThreadChecker worker_thread_checker_; 214 GUARDED_BY(worker_task_checker_);
215 std::vector<RtpPacketSinkInterface*> secondary_sinks_; // This needs
216 // to be GUARDED_BY(worker_thread_checker_).
217 }; 215 };
218 216
219 } // namespace webrtc 217 } // namespace webrtc
220 218
221 #endif // WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_ 219 #endif // WEBRTC_VIDEO_RTP_VIDEO_STREAM_RECEIVER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/video/rtp_video_stream_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698