| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 19 matching lines...) Expand all Loading... |
| 30 } // namespace rtcp | 30 } // namespace rtcp |
| 31 | 31 |
| 32 // PacketRouter routes outgoing data to the correct sending RTP module, based | 32 // PacketRouter routes outgoing data to the correct sending RTP module, based |
| 33 // on the simulcast layer in RTPVideoHeader. | 33 // on the simulcast layer in RTPVideoHeader. |
| 34 class PacketRouter : public PacedSender::Callback, | 34 class PacketRouter : public PacedSender::Callback, |
| 35 public TransportSequenceNumberAllocator { | 35 public TransportSequenceNumberAllocator { |
| 36 public: | 36 public: |
| 37 PacketRouter(); | 37 PacketRouter(); |
| 38 virtual ~PacketRouter(); | 38 virtual ~PacketRouter(); |
| 39 | 39 |
| 40 void AddRtpModule(RtpRtcp* rtp_module, bool sender); | 40 void AddRtpModule(RtpRtcp* rtp_module); |
| 41 void RemoveRtpModule(RtpRtcp* rtp_module, bool sender); | 41 void RemoveRtpModule(RtpRtcp* rtp_module); |
| 42 | 42 |
| 43 // Implements PacedSender::Callback. | 43 // Implements PacedSender::Callback. |
| 44 bool TimeToSendPacket(uint32_t ssrc, | 44 bool TimeToSendPacket(uint32_t ssrc, |
| 45 uint16_t sequence_number, | 45 uint16_t sequence_number, |
| 46 int64_t capture_timestamp, | 46 int64_t capture_timestamp, |
| 47 bool retransmission) override; | 47 bool retransmission) override; |
| 48 | 48 |
| 49 size_t TimeToSendPadding(size_t bytes) override; | 49 size_t TimeToSendPadding(size_t bytes) override; |
| 50 | 50 |
| 51 void SetTransportWideSequenceNumber(uint16_t sequence_number); | 51 void SetTransportWideSequenceNumber(uint16_t sequence_number); |
| 52 uint16_t AllocateSequenceNumber() override; | 52 uint16_t AllocateSequenceNumber() override; |
| 53 | 53 |
| 54 // Send transport feedback packet to send-side. | 54 // Send transport feedback packet to send-side. |
| 55 virtual bool SendFeedback(rtcp::TransportFeedback* packet); | 55 virtual bool SendFeedback(rtcp::TransportFeedback* packet); |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 rtc::ThreadChecker pacer_thread_checker_; | 58 rtc::ThreadChecker pacer_thread_checker_; |
| 59 rtc::CriticalSection modules_crit_; | 59 rtc::CriticalSection modules_crit_; |
| 60 std::list<RtpRtcp*> send_rtp_modules_ GUARDED_BY(modules_crit_); | 60 std::list<RtpRtcp*> rtp_modules_ GUARDED_BY(modules_crit_); |
| 61 std::list<RtpRtcp*> recv_rtp_modules_ GUARDED_BY(modules_crit_); | |
| 62 | 61 |
| 63 volatile int transport_seq_; | 62 volatile int transport_seq_; |
| 64 | 63 |
| 65 RTC_DISALLOW_COPY_AND_ASSIGN(PacketRouter); | 64 RTC_DISALLOW_COPY_AND_ASSIGN(PacketRouter); |
| 66 }; | 65 }; |
| 67 } // namespace webrtc | 66 } // namespace webrtc |
| 68 #endif // WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ | 67 #endif // WEBRTC_MODULES_PACING_PACKET_ROUTER_H_ |
| OLD | NEW |