| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | #ifndef VIDEO_TRANSPORT_ADAPTER_H_ |
| 11 | #define VIDEO_TRANSPORT_ADAPTER_H_ |
| 12 |
| 13 | #include <stddef.h> |
| 14 | #include <stdint.h> |
| 15 |
| 16 | #include <atomic> |
| 17 |
| 18 | #include "api/call/transport.h" |
| 19 |
| 20 | namespace webrtc { |
| 21 | namespace internal { |
| 22 |
| 23 | class TransportAdapter : public Transport { |
| 24 | public: |
| 25 | explicit TransportAdapter(Transport* transport); |
| 26 | ~TransportAdapter() override; |
| 27 |
| 28 | bool SendRtp(rtc::ArrayView<const uint8_t> packet, |
| 29 | const PacketOptions& options) override; |
| 30 | bool SendRtcp(rtc::ArrayView<const uint8_t> packet) override; |
| 31 |
| 32 | void Enable(); |
| 33 | void Disable(); |
| 34 |
| 35 | private: |
| 36 | Transport* transport_; |
| 37 | std::atomic<bool> enabled_; |
| 38 | }; |
| 39 | } // namespace internal |
| 40 | } // namespace webrtc |
| 41 |
| 42 | #endif // VIDEO_TRANSPORT_ADAPTER_H_ |
| 43 |