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

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

Issue 1905983002: Use vcm::VideoReceiver on the receive side. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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/vie_encoder.h ('k') | webrtc/video/vie_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 16 matching lines...) Expand all
27 namespace webrtc { 27 namespace webrtc {
28 28
29 class FecReceiver; 29 class FecReceiver;
30 class RemoteNtpTimeEstimator; 30 class RemoteNtpTimeEstimator;
31 class ReceiveStatistics; 31 class ReceiveStatistics;
32 class RemoteBitrateEstimator; 32 class RemoteBitrateEstimator;
33 class RtpHeaderParser; 33 class RtpHeaderParser;
34 class RTPPayloadRegistry; 34 class RTPPayloadRegistry;
35 class RtpReceiver; 35 class RtpReceiver;
36 class RtpRtcp; 36 class RtpRtcp;
37 class VideoCodingModule; 37
38 namespace vcm {
39 class VideoReceiver;
40 } // namespace vcm
38 41
39 class ViEReceiver : public RtpData { 42 class ViEReceiver : public RtpData {
40 public: 43 public:
41 ViEReceiver(VideoCodingModule* module_vcm, 44 ViEReceiver(vcm::VideoReceiver* video_receiver,
42 RemoteBitrateEstimator* remote_bitrate_estimator, 45 RemoteBitrateEstimator* remote_bitrate_estimator,
43 RtpFeedback* rtp_feedback); 46 RtpFeedback* rtp_feedback);
44 ~ViEReceiver(); 47 ~ViEReceiver();
45 48
46 bool SetReceiveCodec(const VideoCodec& video_codec); 49 bool SetReceiveCodec(const VideoCodec& video_codec);
47 50
48 void SetNackStatus(bool enable, int max_nack_reordering_threshold); 51 void SetNackStatus(bool enable, int max_nack_reordering_threshold);
49 void SetRtxPayloadType(int payload_type, int associated_payload_type); 52 void SetRtxPayloadType(int payload_type, int associated_payload_type);
50 // If set to true, the RTX payload type mapping supplied in 53 // If set to true, the RTX payload type mapping supplied in
51 // |SetRtxPayloadType| will be used when restoring RTX packets. Without it, 54 // |SetRtxPayloadType| will be used when restoring RTX packets. Without it,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // This function assumes that it's being called from only one thread. 94 // This function assumes that it's being called from only one thread.
92 bool ParseAndHandleEncapsulatingHeader(const uint8_t* packet, 95 bool ParseAndHandleEncapsulatingHeader(const uint8_t* packet,
93 size_t packet_length, 96 size_t packet_length,
94 const RTPHeader& header); 97 const RTPHeader& header);
95 void NotifyReceiverOfFecPacket(const RTPHeader& header); 98 void NotifyReceiverOfFecPacket(const RTPHeader& header);
96 bool IsPacketInOrder(const RTPHeader& header) const; 99 bool IsPacketInOrder(const RTPHeader& header) const;
97 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; 100 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const;
98 void UpdateHistograms(); 101 void UpdateHistograms();
99 102
100 Clock* const clock_; 103 Clock* const clock_;
101 VideoCodingModule* const vcm_; 104 vcm::VideoReceiver* const video_receiver_;
102 RemoteBitrateEstimator* const remote_bitrate_estimator_; 105 RemoteBitrateEstimator* const remote_bitrate_estimator_;
103 106
104 // TODO(pbos): Make const and set on construction. 107 // TODO(pbos): Make const and set on construction.
105 RtpRtcp* rtp_rtcp_; // Owned by ViEChannel 108 RtpRtcp* rtp_rtcp_; // Owned by ViEChannel
106 109
107 RemoteNtpTimeEstimator ntp_estimator_; 110 RemoteNtpTimeEstimator ntp_estimator_;
108 RTPPayloadRegistry rtp_payload_registry_; 111 RTPPayloadRegistry rtp_payload_registry_;
109 112
110 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_; 113 const std::unique_ptr<RtpHeaderParser> rtp_header_parser_;
111 const std::unique_ptr<RtpReceiver> rtp_receiver_; 114 const std::unique_ptr<RtpReceiver> rtp_receiver_;
112 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; 115 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_;
113 std::unique_ptr<FecReceiver> fec_receiver_; 116 std::unique_ptr<FecReceiver> fec_receiver_;
114 117
115 rtc::CriticalSection receive_cs_; 118 rtc::CriticalSection receive_cs_;
116 bool receiving_ GUARDED_BY(receive_cs_); 119 bool receiving_ GUARDED_BY(receive_cs_);
117 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_); 120 uint8_t restored_packet_[IP_PACKET_SIZE] GUARDED_BY(receive_cs_);
118 bool restored_packet_in_use_ GUARDED_BY(receive_cs_); 121 bool restored_packet_in_use_ GUARDED_BY(receive_cs_);
119 int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_); 122 int64_t last_packet_log_ms_ GUARDED_BY(receive_cs_);
120 }; 123 };
121 124
122 } // namespace webrtc 125 } // namespace webrtc
123 126
124 #endif // WEBRTC_VIDEO_VIE_RECEIVER_H_ 127 #endif // WEBRTC_VIDEO_VIE_RECEIVER_H_
OLDNEW
« no previous file with comments | « webrtc/video/vie_encoder.h ('k') | webrtc/video/vie_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698