OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ | 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ | 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ |
13 | 13 |
14 #include <set> | 14 #include <set> |
15 #include <string> | 15 #include <string> |
16 #include <utility> | 16 #include <utility> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
| 19 #include "webrtc/call.h" |
19 #include "webrtc/modules/include/module.h" | 20 #include "webrtc/modules/include/module.h" |
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" | 21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
21 #include "webrtc/modules/video_coding/include/video_coding_defines.h" | 22 #include "webrtc/modules/video_coding/include/video_coding_defines.h" |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 // Forward declarations. | 25 // Forward declarations. |
25 class ReceiveStatistics; | 26 class ReceiveStatistics; |
26 class RemoteBitrateEstimator; | 27 class RemoteBitrateEstimator; |
27 class RtpReceiver; | 28 class RtpReceiver; |
28 class Transport; | 29 class Transport; |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 /* | 182 /* |
182 * (De)register RTP header extension type and id. | 183 * (De)register RTP header extension type and id. |
183 * | 184 * |
184 * return -1 on failure else 0 | 185 * return -1 on failure else 0 |
185 */ | 186 */ |
186 virtual int32_t RegisterSendRtpHeaderExtension(RTPExtensionType type, | 187 virtual int32_t RegisterSendRtpHeaderExtension(RTPExtensionType type, |
187 uint8_t id) = 0; | 188 uint8_t id) = 0; |
188 | 189 |
189 virtual int32_t DeregisterSendRtpHeaderExtension(RTPExtensionType type) = 0; | 190 virtual int32_t DeregisterSendRtpHeaderExtension(RTPExtensionType type) = 0; |
190 | 191 |
| 192 // TODO(danilchap): Make pure virtual in 3 months. |
| 193 virtual bool RegisterRtpHeaderExtension(const std::string& type, |
| 194 MediaType media, |
| 195 uint8_t id); |
| 196 |
191 /* | 197 /* |
192 * get start timestamp | 198 * get start timestamp |
193 */ | 199 */ |
194 virtual uint32_t StartTimestamp() const = 0; | 200 virtual uint32_t StartTimestamp() const = 0; |
195 | 201 |
196 /* | 202 /* |
197 * configure start timestamp, default is a random number | 203 * configure start timestamp, default is a random number |
198 * | 204 * |
199 * timestamp - start timestamp | 205 * timestamp - start timestamp |
200 */ | 206 */ |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 * return -1 on failure else 0 | 361 * return -1 on failure else 0 |
356 */ | 362 */ |
357 virtual int32_t RemoteCNAME(uint32_t remoteSSRC, | 363 virtual int32_t RemoteCNAME(uint32_t remoteSSRC, |
358 char cName[RTCP_CNAME_SIZE]) const = 0; | 364 char cName[RTCP_CNAME_SIZE]) const = 0; |
359 | 365 |
360 /* | 366 /* |
361 * Get remote NTP | 367 * Get remote NTP |
362 * | 368 * |
363 * return -1 on failure else 0 | 369 * return -1 on failure else 0 |
364 */ | 370 */ |
365 virtual int32_t RemoteNTP( | 371 virtual int32_t RemoteNTP(uint32_t* ReceivedNTPsecs, |
366 uint32_t *ReceivedNTPsecs, | 372 uint32_t* ReceivedNTPfrac, |
367 uint32_t *ReceivedNTPfrac, | 373 uint32_t* RTCPArrivalTimeSecs, |
368 uint32_t *RTCPArrivalTimeSecs, | 374 uint32_t* RTCPArrivalTimeFrac, |
369 uint32_t *RTCPArrivalTimeFrac, | 375 uint32_t* rtcp_timestamp) const = 0; |
370 uint32_t *rtcp_timestamp) const = 0; | |
371 | 376 |
372 /* | 377 /* |
373 * AddMixedCNAME | 378 * AddMixedCNAME |
374 * | 379 * |
375 * return -1 on failure else 0 | 380 * return -1 on failure else 0 |
376 */ | 381 */ |
377 virtual int32_t AddMixedCNAME(uint32_t SSRC, const char* c_name) = 0; | 382 virtual int32_t AddMixedCNAME(uint32_t SSRC, const char* c_name) = 0; |
378 | 383 |
379 /* | 384 /* |
380 * RemoveMixedCNAME | 385 * RemoveMixedCNAME |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 * Send NACK for the packets specified. | 546 * Send NACK for the packets specified. |
542 */ | 547 */ |
543 virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0; | 548 virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0; |
544 | 549 |
545 /* | 550 /* |
546 * Store the sent packets, needed to answer to a Negative acknowledgement | 551 * Store the sent packets, needed to answer to a Negative acknowledgement |
547 * requests | 552 * requests |
548 */ | 553 */ |
549 virtual void SetStorePacketsStatus(bool enable, uint16_t numberToStore) = 0; | 554 virtual void SetStorePacketsStatus(bool enable, uint16_t numberToStore) = 0; |
550 | 555 |
551 // Returns true if the module is configured to store packets. | |
552 virtual bool StorePackets() const = 0; | |
553 | |
554 // Called on receipt of RTCP report block from remote side. | 556 // Called on receipt of RTCP report block from remote side. |
555 virtual void RegisterRtcpStatisticsCallback( | 557 virtual void RegisterRtcpStatisticsCallback( |
556 RtcpStatisticsCallback* callback) = 0; | 558 RtcpStatisticsCallback* callback) = 0; |
557 virtual RtcpStatisticsCallback* | 559 virtual RtcpStatisticsCallback* GetRtcpStatisticsCallback() = 0; |
558 GetRtcpStatisticsCallback() = 0; | |
559 // BWE feedback packets. | 560 // BWE feedback packets. |
560 virtual bool SendFeedbackPacket(const rtcp::TransportFeedback& packet) = 0; | 561 virtual bool SendFeedbackPacket(const rtcp::TransportFeedback& packet) = 0; |
561 | 562 |
562 /************************************************************************** | 563 /************************************************************************** |
563 * | 564 * |
564 * Audio | 565 * Audio |
565 * | 566 * |
566 ***************************************************************************/ | 567 ***************************************************************************/ |
567 | 568 |
568 /* | 569 /* |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 658 |
658 /* | 659 /* |
659 * send a request for a keyframe | 660 * send a request for a keyframe |
660 * | 661 * |
661 * return -1 on failure else 0 | 662 * return -1 on failure else 0 |
662 */ | 663 */ |
663 virtual int32_t RequestKeyFrame() = 0; | 664 virtual int32_t RequestKeyFrame() = 0; |
664 }; | 665 }; |
665 } // namespace webrtc | 666 } // namespace webrtc |
666 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ | 667 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ |
OLD | NEW |