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