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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void RegisterRtpRtcpModules(const std::vector<RtpRtcp*>& rtp_modules); | 66 void RegisterRtpRtcpModules(const std::vector<RtpRtcp*>& rtp_modules); |
67 | 67 |
68 bool SetReceiveTimestampOffsetStatus(bool enable, int id); | 68 bool SetReceiveTimestampOffsetStatus(bool enable, int id); |
69 bool SetReceiveAbsoluteSendTimeStatus(bool enable, int id); | 69 bool SetReceiveAbsoluteSendTimeStatus(bool enable, int id); |
70 bool SetReceiveVideoRotationStatus(bool enable, int id); | 70 bool SetReceiveVideoRotationStatus(bool enable, int id); |
71 bool SetReceiveTransportSequenceNumber(bool enable, int id); | 71 bool SetReceiveTransportSequenceNumber(bool enable, int id); |
72 | 72 |
73 void StartReceive(); | 73 void StartReceive(); |
74 void StopReceive(); | 74 void StopReceive(); |
75 | 75 |
76 // Receives packets from external transport. | 76 bool DeliverRtp(const uint8_t* rtp_packet, |
77 int ReceivedRTPPacket(const void* rtp_packet, size_t rtp_packet_length, | 77 size_t rtp_packet_length, |
78 const PacketTime& packet_time); | 78 const PacketTime& packet_time); |
79 int ReceivedRTCPPacket(const void* rtcp_packet, size_t rtcp_packet_length); | 79 bool DeliverRtcp(const uint8_t* rtcp_packet, size_t rtcp_packet_length); |
80 | 80 |
81 // Implements RtpData. | 81 // Implements RtpData. |
82 int32_t OnReceivedPayloadData(const uint8_t* payload_data, | 82 int32_t OnReceivedPayloadData(const uint8_t* payload_data, |
83 const size_t payload_size, | 83 const size_t payload_size, |
84 const WebRtcRTPHeader* rtp_header) override; | 84 const WebRtcRTPHeader* rtp_header) override; |
85 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; | 85 bool OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; |
86 | 86 |
87 ReceiveStatistics* GetReceiveStatistics() const; | 87 ReceiveStatistics* GetReceiveStatistics() const; |
88 | 88 |
89 private: | 89 private: |
90 int InsertRTPPacket(const uint8_t* rtp_packet, size_t rtp_packet_length, | |
91 const PacketTime& packet_time); | |
92 bool ReceivePacket(const uint8_t* packet, | 90 bool ReceivePacket(const uint8_t* packet, |
93 size_t packet_length, | 91 size_t packet_length, |
94 const RTPHeader& header, | 92 const RTPHeader& header, |
95 bool in_order); | 93 bool in_order); |
96 // Parses and handles for instance RTX and RED headers. | 94 // Parses and handles for instance RTX and RED headers. |
97 // This function assumes that it's being called from only one thread. | 95 // This function assumes that it's being called from only one thread. |
98 bool ParseAndHandleEncapsulatingHeader(const uint8_t* packet, | 96 bool ParseAndHandleEncapsulatingHeader(const uint8_t* packet, |
99 size_t packet_length, | 97 size_t packet_length, |
100 const RTPHeader& header); | 98 const RTPHeader& header); |
101 void NotifyReceiverOfFecPacket(const RTPHeader& header); | 99 void NotifyReceiverOfFecPacket(const RTPHeader& header); |
102 int InsertRTCPPacket(const uint8_t* rtcp_packet, size_t rtcp_packet_length); | |
103 bool IsPacketInOrder(const RTPHeader& header) const; | 100 bool IsPacketInOrder(const RTPHeader& header) const; |
104 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; | 101 bool IsPacketRetransmitted(const RTPHeader& header, bool in_order) const; |
105 void UpdateHistograms(); | 102 void UpdateHistograms(); |
106 | 103 |
107 rtc::CriticalSection receive_cs_; | 104 rtc::CriticalSection receive_cs_; |
108 Clock* clock_; | 105 Clock* clock_; |
109 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; | 106 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; |
110 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_; | 107 rtc::scoped_ptr<RTPPayloadRegistry> rtp_payload_registry_; |
111 rtc::scoped_ptr<RtpReceiver> rtp_receiver_; | 108 rtc::scoped_ptr<RtpReceiver> rtp_receiver_; |
112 const rtc::scoped_ptr<ReceiveStatistics> rtp_receive_statistics_; | 109 const rtc::scoped_ptr<ReceiveStatistics> rtp_receive_statistics_; |
(...skipping 10 matching lines...) Expand all Loading... |
123 bool restored_packet_in_use_; | 120 bool restored_packet_in_use_; |
124 bool receiving_ast_enabled_; | 121 bool receiving_ast_enabled_; |
125 bool receiving_cvo_enabled_; | 122 bool receiving_cvo_enabled_; |
126 bool receiving_tsn_enabled_; | 123 bool receiving_tsn_enabled_; |
127 int64_t last_packet_log_ms_; | 124 int64_t last_packet_log_ms_; |
128 }; | 125 }; |
129 | 126 |
130 } // namespace webrtc | 127 } // namespace webrtc |
131 | 128 |
132 #endif // WEBRTC_VIDEO_VIE_RECEIVER_H_ | 129 #endif // WEBRTC_VIDEO_VIE_RECEIVER_H_ |
OLD | NEW |