| 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 SendPacket(bool rtcp, | 59 bool SendRtpPacket(rtc::CopyOnWriteBuffer* packet, |
| 60 rtc::CopyOnWriteBuffer* packet, | 60 const rtc::PacketOptions& options, |
| 61 const rtc::PacketOptions& options, | 61 int flags) override; |
| 62 int flags) override; | 62 |
| 63 bool SendRtcpPacket(rtc::CopyOnWriteBuffer* packet, |
| 64 const rtc::PacketOptions& options, |
| 65 int flags) override; |
| 63 | 66 |
| 64 bool HandlesPayloadType(int payload_type) const override; | 67 bool HandlesPayloadType(int payload_type) const override; |
| 65 | 68 |
| 66 void AddHandledPayloadType(int payload_type) override; | 69 void AddHandledPayloadType(int payload_type) override; |
| 67 | 70 |
| 68 protected: | 71 protected: |
| 69 // TODO(zstein): Remove this when we remove RtpTransportAdapter. | 72 // TODO(zstein): Remove this when we remove RtpTransportAdapter. |
| 70 RtpTransportAdapter* GetInternal() override; | 73 RtpTransportAdapter* GetInternal() override; |
| 71 | 74 |
| 72 private: | 75 private: |
| 73 bool HandlesPacket(const uint8_t* data, size_t len); | 76 bool HandlesPacket(const uint8_t* data, size_t len); |
| 74 | 77 |
| 75 void OnReadyToSend(rtc::PacketTransportInternal* transport); | 78 void OnReadyToSend(rtc::PacketTransportInternal* transport); |
| 76 | 79 |
| 77 // Updates "ready to send" for an individual channel and fires | 80 // Updates "ready to send" for an individual channel and fires |
| 78 // SignalReadyToSend. | 81 // SignalReadyToSend. |
| 79 void SetReadyToSend(bool rtcp, bool ready); | 82 void SetReadyToSend(bool rtcp, bool ready); |
| 80 | 83 |
| 81 void MaybeSignalReadyToSend(); | 84 void MaybeSignalReadyToSend(); |
| 82 | 85 |
| 86 bool SendPacket(bool rtcp, |
| 87 rtc::CopyOnWriteBuffer* packet, |
| 88 const rtc::PacketOptions& options, |
| 89 int flags); |
| 90 |
| 83 void OnReadPacket(rtc::PacketTransportInternal* transport, | 91 void OnReadPacket(rtc::PacketTransportInternal* transport, |
| 84 const char* data, | 92 const char* data, |
| 85 size_t len, | 93 size_t len, |
| 86 const rtc::PacketTime& packet_time, | 94 const rtc::PacketTime& packet_time, |
| 87 int flags); | 95 int flags); |
| 88 | 96 |
| 89 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); | 97 bool WantsPacket(bool rtcp, const rtc::CopyOnWriteBuffer* packet); |
| 90 | 98 |
| 91 bool rtcp_mux_enabled_; | 99 bool rtcp_mux_enabled_; |
| 92 | 100 |
| 93 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr; | 101 rtc::PacketTransportInternal* rtp_packet_transport_ = nullptr; |
| 94 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr; | 102 rtc::PacketTransportInternal* rtcp_packet_transport_ = nullptr; |
| 95 | 103 |
| 96 bool ready_to_send_ = false; | 104 bool ready_to_send_ = false; |
| 97 bool rtp_ready_to_send_ = false; | 105 bool rtp_ready_to_send_ = false; |
| 98 bool rtcp_ready_to_send_ = false; | 106 bool rtcp_ready_to_send_ = false; |
| 99 | 107 |
| 100 RtpTransportParameters parameters_; | 108 RtpTransportParameters parameters_; |
| 101 | 109 |
| 102 cricket::BundleFilter bundle_filter_; | 110 cricket::BundleFilter bundle_filter_; |
| 103 }; | 111 }; |
| 104 | 112 |
| 105 } // namespace webrtc | 113 } // namespace webrtc |
| 106 | 114 |
| 107 #endif // WEBRTC_PC_RTPTRANSPORT_H_ | 115 #endif // WEBRTC_PC_RTPTRANSPORT_H_ |
| OLD | NEW |