| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 PacketTransportInterface* GetRtpPacketTransport() const override; | 50 PacketTransportInterface* GetRtpPacketTransport() const override; |
| 51 PacketTransportInterface* GetRtcpPacketTransport() const override; | 51 PacketTransportInterface* GetRtcpPacketTransport() const override; |
| 52 | 52 |
| 53 // TODO(zstein): Use these RtcpParameters for configuration elsewhere. | 53 // TODO(zstein): Use these RtcpParameters for configuration elsewhere. |
| 54 RTCError SetParameters(const RtpTransportParameters& parameters) override; | 54 RTCError SetParameters(const RtpTransportParameters& parameters) override; |
| 55 RtpTransportParameters GetParameters() const override; | 55 RtpTransportParameters GetParameters() const override; |
| 56 | 56 |
| 57 bool IsWritable(bool rtcp) const override; | 57 bool IsWritable(bool rtcp) const override; |
| 58 | 58 |
| 59 bool SendRtpPacket(rtc::CopyOnWriteBuffer* packet, | 59 bool SendPacket(bool rtcp, |
| 60 const rtc::PacketOptions& options, | 60 rtc::CopyOnWriteBuffer* packet, |
| 61 int flags) override; | 61 const rtc::PacketOptions& options, |
| 62 | 62 int flags) override; |
| 63 bool SendRtcpPacket(rtc::CopyOnWriteBuffer* packet, | |
| 64 const rtc::PacketOptions& options, | |
| 65 int flags) override; | |
| 66 | 63 |
| 67 bool HandlesPayloadType(int payload_type) const override; | 64 bool HandlesPayloadType(int payload_type) const override; |
| 68 | 65 |
| 69 void AddHandledPayloadType(int payload_type) override; | 66 void AddHandledPayloadType(int payload_type) override; |
| 70 | 67 |
| 71 protected: | 68 protected: |
| 72 // TODO(zstein): Remove this when we remove RtpTransportAdapter. | 69 // TODO(zstein): Remove this when we remove RtpTransportAdapter. |
| 73 RtpTransportAdapter* GetInternal() override; | 70 RtpTransportAdapter* GetInternal() override; |
| 74 | 71 |
| 75 private: | 72 private: |
| 76 bool HandlesPacket(const uint8_t* data, size_t len); | 73 bool HandlesPacket(const uint8_t* data, size_t len); |
| 77 | 74 |
| 78 void OnReadyToSend(rtc::PacketTransportInternal* transport); | 75 void OnReadyToSend(rtc::PacketTransportInternal* transport); |
| 79 | 76 |
| 80 // Updates "ready to send" for an individual channel and fires | 77 // Updates "ready to send" for an individual channel and fires |
| 81 // SignalReadyToSend. | 78 // SignalReadyToSend. |
| 82 void SetReadyToSend(bool rtcp, bool ready); | 79 void SetReadyToSend(bool rtcp, bool ready); |
| 83 | 80 |
| 84 void MaybeSignalReadyToSend(); | 81 void MaybeSignalReadyToSend(); |
| 85 | 82 |
| 86 bool SendPacket(bool rtcp, | |
| 87 rtc::CopyOnWriteBuffer* packet, | |
| 88 const rtc::PacketOptions& options, | |
| 89 int flags); | |
| 90 | |
| 91 void OnReadPacket(rtc::PacketTransportInternal* transport, | 83 void OnReadPacket(rtc::PacketTransportInternal* transport, |
| 92 const char* data, | 84 const char* data, |
| 93 size_t len, | 85 size_t len, |
| 94 const rtc::PacketTime& packet_time, | 86 const rtc::PacketTime& packet_time, |
| 95 int flags); | 87 int flags); |
| 96 | 88 |
| 97 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); | 89 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); |
| 98 | 90 |
| 99 bool rtcp_mux_enabled_; | 91 bool rtcp_mux_enabled_; |
| 100 | 92 |
| 101 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr; | 93 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr; |
| 102 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr; | 94 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr; |
| 103 | 95 |
| 104 bool ready_to_send_ = false; | 96 bool ready_to_send_ = false; |
| 105 bool rtp_ready_to_send_ = false; | 97 bool rtp_ready_to_send_ = false; |
| 106 bool rtcp_ready_to_send_ = false; | 98 bool rtcp_ready_to_send_ = false; |
| 107 | 99 |
| 108 RtpTransportParameters parameters_; | 100 RtpTransportParameters parameters_; |
| 109 | 101 |
| 110 cricket::BundleFilter bundle_filter_; | 102 cricket::BundleFilter bundle_filter_; |
| 111 }; | 103 }; |
| 112 | 104 |
| 113 } // namespace webrtc | 105 } // namespace webrtc |
| 114 | 106 |
| 115 #endif // WEBRTC_PC_RTPTRANSPORT_H_ | 107 #endif // WEBRTC_PC_RTPTRANSPORT_H_ |
| OLD | NEW |