niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
stefan@webrtc.org | 07b45a5 | 2012-02-02 08:37:48 +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_RTP_RTCP_IMPL_H_ |
| 12 | #define WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_ |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 13 | |
pbos@webrtc.org | f5d4cb1 | 2013-05-17 13:44:48 +0000 | [diff] [blame] | 14 | #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" |
| 15 | #include "webrtc/typedefs.h" |
| 16 | #include "webrtc/video_engine/include/vie_rtp_rtcp.h" |
| 17 | #include "webrtc/video_engine/vie_ref_count.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 19 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 20 | |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 21 | class ViESharedData; |
| 22 | |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 23 | class ViERTP_RTCPImpl |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 24 | : public ViERTP_RTCP, |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 25 | public ViERefCount { |
| 26 | public: |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 27 | // Implements ViERTP_RTCP. |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 28 | virtual int Release(); |
| 29 | virtual int SetLocalSSRC(const int video_channel, |
| 30 | const unsigned int SSRC, |
| 31 | const StreamType usage, |
| 32 | const unsigned char simulcast_idx); |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 33 | virtual int GetLocalSSRC(const int video_channel, |
| 34 | unsigned int& SSRC) const; // NOLINT |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 35 | virtual int SetRemoteSSRCType(const int video_channel, |
| 36 | const StreamType usage, |
| 37 | const unsigned int SSRC) const; |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 38 | virtual int GetRemoteSSRC(const int video_channel, |
| 39 | unsigned int& SSRC) const; // NOLINT |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 40 | virtual int GetRemoteCSRCs(const int video_channel, |
| 41 | unsigned int CSRCs[kRtpCsrcSize]) const; |
mflodman@webrtc.org | 9f5ebb5 | 2013-04-12 14:55:46 +0000 | [diff] [blame] | 42 | virtual int SetRtxSendPayloadType(const int video_channel, |
| 43 | const uint8_t payload_type); |
| 44 | virtual int SetRtxReceivePayloadType(const int video_channel, |
| 45 | const uint8_t payload_type); |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 46 | virtual int SetStartSequenceNumber(const int video_channel, |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 47 | uint16_t sequence_number); |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 48 | virtual int SetRTCPStatus(const int video_channel, |
| 49 | const ViERTCPMode rtcp_mode); |
| 50 | virtual int GetRTCPStatus(const int video_channel, |
| 51 | ViERTCPMode& rtcp_mode) const; |
| 52 | virtual int SetRTCPCName(const int video_channel, |
| 53 | const char rtcp_cname[KMaxRTCPCNameLength]); |
| 54 | virtual int GetRTCPCName(const int video_channel, |
| 55 | char rtcp_cname[KMaxRTCPCNameLength]) const; |
| 56 | virtual int GetRemoteRTCPCName(const int video_channel, |
| 57 | char rtcp_cname[KMaxRTCPCNameLength]) const; |
| 58 | virtual int SendApplicationDefinedRTCPPacket( |
| 59 | const int video_channel, |
| 60 | const unsigned char sub_type, |
| 61 | unsigned int name, |
| 62 | const char* data, |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 63 | uint16_t data_length_in_bytes); |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 64 | virtual int SetNACKStatus(const int video_channel, const bool enable); |
| 65 | virtual int SetFECStatus(const int video_channel, const bool enable, |
| 66 | const unsigned char payload_typeRED, |
| 67 | const unsigned char payload_typeFEC); |
| 68 | virtual int SetHybridNACKFECStatus(const int video_channel, const bool enable, |
| 69 | const unsigned char payload_typeRED, |
| 70 | const unsigned char payload_typeFEC); |
mikhal@webrtc.org | ef9f76a | 2013-02-15 23:22:18 +0000 | [diff] [blame] | 71 | virtual int SetSenderBufferingMode(int video_channel, |
| 72 | int target_delay_ms); |
| 73 | virtual int SetReceiverBufferingMode(int video_channel, |
| 74 | int target_delay_ms); |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 75 | virtual int SetKeyFrameRequestMethod(const int video_channel, |
| 76 | const ViEKeyFrameRequestMethod method); |
| 77 | virtual int SetTMMBRStatus(const int video_channel, const bool enable); |
mflodman@webrtc.org | 6cf529d | 2012-01-24 06:16:16 +0000 | [diff] [blame] | 78 | virtual int SetRembStatus(int video_channel, bool sender, bool receiver); |
mflodman@webrtc.org | 90071dd | 2012-08-13 17:13:27 +0000 | [diff] [blame] | 79 | virtual int SetSendTimestampOffsetStatus(int video_channel, |
| 80 | bool enable, |
| 81 | int id); |
| 82 | virtual int SetReceiveTimestampOffsetStatus(int video_channel, |
| 83 | bool enable, |
| 84 | int id); |
mflodman@webrtc.org | 5a7507f | 2012-09-12 13:47:06 +0000 | [diff] [blame] | 85 | virtual int SetTransmissionSmoothingStatus(int video_channel, bool enable); |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 86 | virtual int GetReceivedRTCPStatistics(const int video_channel, |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 87 | uint16_t& fraction_lost, |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 88 | unsigned int& cumulative_lost, |
| 89 | unsigned int& extended_max, |
| 90 | unsigned int& jitter, |
| 91 | int& rtt_ms) const; |
| 92 | virtual int GetSentRTCPStatistics(const int video_channel, |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 93 | uint16_t& fraction_lost, |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 94 | unsigned int& cumulative_lost, |
| 95 | unsigned int& extended_max, |
| 96 | unsigned int& jitter, int& rtt_ms) const; |
| 97 | virtual int GetRTPStatistics(const int video_channel, |
| 98 | unsigned int& bytes_sent, |
| 99 | unsigned int& packets_sent, |
| 100 | unsigned int& bytes_received, |
| 101 | unsigned int& packets_received) const; |
| 102 | virtual int GetBandwidthUsage(const int video_channel, |
| 103 | unsigned int& total_bitrate_sent, |
| 104 | unsigned int& video_bitrate_sent, |
| 105 | unsigned int& fec_bitrate_sent, |
| 106 | unsigned int& nackBitrateSent) const; |
stefan@webrtc.org | 439be29 | 2012-02-16 14:45:37 +0000 | [diff] [blame] | 107 | virtual int GetEstimatedSendBandwidth( |
| 108 | const int video_channel, |
| 109 | unsigned int* estimated_bandwidth) const; |
| 110 | virtual int GetEstimatedReceiveBandwidth( |
stefan@webrtc.org | 07b45a5 | 2012-02-02 08:37:48 +0000 | [diff] [blame] | 111 | const int video_channel, |
| 112 | unsigned int* estimated_bandwidth) const; |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 113 | virtual int StartRTPDump(const int video_channel, |
| 114 | const char file_nameUTF8[1024], |
| 115 | RTPDirections direction); |
| 116 | virtual int StopRTPDump(const int video_channel, RTPDirections direction); |
| 117 | virtual int RegisterRTPObserver(const int video_channel, |
| 118 | ViERTPObserver& observer); |
| 119 | virtual int DeregisterRTPObserver(const int video_channel); |
| 120 | virtual int RegisterRTCPObserver(const int video_channel, |
| 121 | ViERTCPObserver& observer); |
| 122 | virtual int DeregisterRTCPObserver(const int video_channel); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 123 | |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 124 | protected: |
mflodman@webrtc.org | 9ba151b | 2012-06-21 10:02:13 +0000 | [diff] [blame] | 125 | explicit ViERTP_RTCPImpl(ViESharedData* shared_data); |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 126 | virtual ~ViERTP_RTCPImpl(); |
mflodman@webrtc.org | b11424b | 2012-01-25 13:42:03 +0000 | [diff] [blame] | 127 | |
| 128 | private: |
| 129 | ViESharedData* shared_data_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 130 | }; |
mflodman@webrtc.org | 8da2417 | 2011-12-19 14:18:41 +0000 | [diff] [blame] | 131 | |
| 132 | } // namespace webrtc |
| 133 | |
mflodman@webrtc.org | e06ca3c | 2012-06-29 13:20:14 +0000 | [diff] [blame] | 134 | #endif // WEBRTC_VIDEO_ENGINE_VIE_RTP_RTCP_IMPL_H_ |