Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: webrtc/modules/rtp_rtcp/include/rtp_rtcp.h

Issue 1778503002: Experiment for the nack module. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/modules/include/module.h" 19 #include "webrtc/modules/include/module.h"
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
21 #include "webrtc/modules/video_coding/include/video_coding_defines.h"
21 22
22 namespace webrtc { 23 namespace webrtc {
23 // Forward declarations. 24 // Forward declarations.
24 class ReceiveStatistics; 25 class ReceiveStatistics;
25 class RemoteBitrateEstimator; 26 class RemoteBitrateEstimator;
26 class RtpReceiver; 27 class RtpReceiver;
27 class Transport; 28 class Transport;
28 class RtcEventLog; 29 class RtcEventLog;
29 30
30 RTPExtensionType StringToRtpExtensionType(const std::string& extension); 31 RTPExtensionType StringToRtpExtensionType(const std::string& extension);
31 32
32 namespace rtcp { 33 namespace rtcp {
33 class TransportFeedback; 34 class TransportFeedback;
34 } 35 }
35 36
36 class RtpRtcp : public Module { 37 class RtpRtcp : public Module, public NackSender {
37 public: 38 public:
38 struct Configuration { 39 struct Configuration {
39 Configuration(); 40 Configuration();
40 41
41 /* id - Unique identifier of this RTP/RTCP module object 42 /* id - Unique identifier of this RTP/RTCP module object
42 * audio - True for a audio version of the RTP/RTCP module 43 * audio - True for a audio version of the RTP/RTCP module
43 * object false will create a video version 44 * object false will create a video version
44 * clock - The clock to use to read time. If NULL object 45 * clock - The clock to use to read time. If NULL object
45 * will be using the system clock. 46 * will be using the system clock.
46 * incoming_data - Callback object that will receive the incoming 47 * incoming_data - Callback object that will receive the incoming
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 * 528 *
528 * Returns -1 on failure, otherwise 0. 529 * Returns -1 on failure, otherwise 0.
529 */ 530 */
530 virtual int SetSelectiveRetransmissions(uint8_t settings) = 0; 531 virtual int SetSelectiveRetransmissions(uint8_t settings) = 0;
531 532
532 /* 533 /*
533 * Send a Negative acknowledgement packet 534 * Send a Negative acknowledgement packet
534 * 535 *
535 * return -1 on failure else 0 536 * return -1 on failure else 0
536 */ 537 */
538 // TODO(philipel): Deprecate this and start using SendNack instead,
539 // mostly because we want a function that actually send
540 // NACK for the specified packets.
537 virtual int32_t SendNACK(const uint16_t* nackList, uint16_t size) = 0; 541 virtual int32_t SendNACK(const uint16_t* nackList, uint16_t size) = 0;
538 542
539 /* 543 /*
544 * Implements NackSender
545 * Send NACK for the packets specified.
546 */
547 virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0;
548
549 /*
540 * Store the sent packets, needed to answer to a Negative acknowledgement 550 * Store the sent packets, needed to answer to a Negative acknowledgement
541 * requests 551 * requests
542 */ 552 */
543 virtual void SetStorePacketsStatus(bool enable, uint16_t numberToStore) = 0; 553 virtual void SetStorePacketsStatus(bool enable, uint16_t numberToStore) = 0;
544 554
545 // Returns true if the module is configured to store packets. 555 // Returns true if the module is configured to store packets.
546 virtual bool StorePackets() const = 0; 556 virtual bool StorePackets() const = 0;
547 557
548 // Called on receipt of RTCP report block from remote side. 558 // Called on receipt of RTCP report block from remote side.
549 virtual void RegisterRtcpStatisticsCallback( 559 virtual void RegisterRtcpStatisticsCallback(
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 661
652 /* 662 /*
653 * send a request for a keyframe 663 * send a request for a keyframe
654 * 664 *
655 * return -1 on failure else 0 665 * return -1 on failure else 0
656 */ 666 */
657 virtual int32_t RequestKeyFrame() = 0; 667 virtual int32_t RequestKeyFrame() = 0;
658 }; 668 };
659 } // namespace webrtc 669 } // namespace webrtc
660 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ 670 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h » ('j') | webrtc/modules/video_coding/include/video_coding.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698