niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 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 |
| 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 | |
mflodman@webrtc.org | e06ca3c | 2012-06-29 13:20:14 +0000 | [diff] [blame] | 11 | #ifndef WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_ |
| 12 | #define WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 14 | #include "typedefs.h" // NOLINT |
mflodman@webrtc.org | a4863db | 2011-12-22 08:51:52 +0000 | [diff] [blame] | 15 | #include "video_engine/include/vie_network.h" |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 16 | #include "video_engine/vie_ref_count.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 17 | |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 18 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 19 | |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 20 | class ViESharedData; |
| 21 | |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 22 | class ViENetworkImpl |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 23 | : public ViENetwork, |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 24 | public ViERefCount { |
| 25 | public: |
| 26 | // Implements ViENetwork. |
| 27 | virtual int Release(); |
stefan@webrtc.org | bfacda6 | 2013-03-27 16:36:01 +0000 | [diff] [blame^] | 28 | virtual void SetNetworkTransmissionState(const int video_channel, |
| 29 | const bool is_transmitting); |
pwestin@webrtc.org | 684f057 | 2013-03-13 23:20:57 +0000 | [diff] [blame] | 30 | virtual int SetLocalReceiver(const int video_channel, |
| 31 | const uint16_t rtp_port, |
| 32 | const uint16_t rtcp_port, |
| 33 | const char* ip_address); |
| 34 | virtual int GetLocalReceiver(const int video_channel, |
| 35 | uint16_t& rtp_port, |
| 36 | uint16_t& rtcp_port, |
| 37 | char* ip_address); |
| 38 | virtual int SetSendDestination(const int video_channel, |
| 39 | const char* ip_address, |
| 40 | const uint16_t rtp_port, |
| 41 | const uint16_t rtcp_port, |
| 42 | const uint16_t source_rtp_port, |
| 43 | const uint16_t source_rtcp_port); |
| 44 | virtual int GetSendDestination(const int video_channel, |
| 45 | char* ip_address, |
| 46 | uint16_t& rtp_port, |
| 47 | uint16_t& rtcp_port, |
| 48 | uint16_t& source_rtp_port, |
| 49 | uint16_t& source_rtcp_port); |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 50 | virtual int RegisterSendTransport(const int video_channel, |
| 51 | Transport& transport); |
| 52 | virtual int DeregisterSendTransport(const int video_channel); |
| 53 | virtual int ReceivedRTPPacket(const int video_channel, |
| 54 | const void* data, |
| 55 | const int length); |
| 56 | virtual int ReceivedRTCPPacket(const int video_channel, |
| 57 | const void* data, |
| 58 | const int length); |
pwestin@webrtc.org | 684f057 | 2013-03-13 23:20:57 +0000 | [diff] [blame] | 59 | virtual int GetSourceInfo(const int video_channel, |
| 60 | uint16_t& rtp_port, |
| 61 | uint16_t& rtcp_port, |
| 62 | char* ip_address, |
| 63 | unsigned int ip_address_length); |
| 64 | virtual int GetLocalIP(char ip_address[64], bool ipv6); |
| 65 | virtual int EnableIPv6(int video_channel); |
| 66 | virtual bool IsIPv6Enabled(int video_channel); |
| 67 | virtual int SetSourceFilter(const int video_channel, |
| 68 | const uint16_t rtp_port, |
| 69 | const uint16_t rtcp_port, |
| 70 | const char* ip_address); |
| 71 | virtual int GetSourceFilter(const int video_channel, |
| 72 | uint16_t& rtp_port, |
| 73 | uint16_t& rtcp_port, |
| 74 | char* ip_address); |
| 75 | virtual int SetSendToS(const int video_channel, |
| 76 | const int DSCP, |
| 77 | const bool use_set_sockOpt); |
| 78 | virtual int GetSendToS(const int video_channel, |
| 79 | int& DSCP, |
| 80 | bool& use_set_sockOpt); |
| 81 | virtual int SetSendGQoS(const int video_channel, |
| 82 | const bool enable, |
| 83 | const int service_type, |
| 84 | const int overrideDSCP); |
| 85 | virtual int GetSendGQoS(const int video_channel, |
| 86 | bool& enabled, |
| 87 | int& service_type, |
| 88 | int& overrideDSCP); |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 89 | virtual int SetMTU(int video_channel, unsigned int mtu); |
| 90 | virtual int SetPacketTimeoutNotification(const int video_channel, |
| 91 | bool enable, |
| 92 | int timeout_seconds); |
| 93 | virtual int RegisterObserver(const int video_channel, |
| 94 | ViENetworkObserver& observer); |
| 95 | virtual int DeregisterObserver(const int video_channel); |
| 96 | virtual int SetPeriodicDeadOrAliveStatus( |
| 97 | const int video_channel, |
| 98 | const bool enable, |
| 99 | const unsigned int sample_time_seconds); |
pwestin@webrtc.org | 684f057 | 2013-03-13 23:20:57 +0000 | [diff] [blame] | 100 | virtual int SendUDPPacket(const int video_channel, |
| 101 | const void* data, |
| 102 | const unsigned int length, |
| 103 | int& transmitted_bytes, |
| 104 | bool use_rtcp_socket); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 105 | |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 106 | protected: |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 107 | explicit ViENetworkImpl(ViESharedData* shared_data); |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 108 | virtual ~ViENetworkImpl(); |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 109 | |
| 110 | private: |
| 111 | ViESharedData* shared_data_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 112 | }; |
mflodman@webrtc.org | 1bdf1df | 2011-12-20 11:57:47 +0000 | [diff] [blame] | 113 | |
| 114 | } // namespace webrtc |
| 115 | |
mflodman@webrtc.org | e06ca3c | 2012-06-29 13:20:14 +0000 | [diff] [blame] | 116 | #endif // WEBRTC_VIDEO_ENGINE_VIE_NETWORK_IMPL_H_ |