Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
| 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 | |
| 11 #ifndef WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ | |
| 12 #define WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 #include <vector> | |
| 16 | |
| 17 #include "webrtc/config.h" | |
| 18 #include "webrtc/base/basictypes.h" | |
| 19 #include "webrtc/modules/include/module_common_types.h" | |
| 20 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" | |
|
brandtr
2016/10/20 13:19:42
I guess the RtpPacket classes will become "public"
danilchap
2016/10/20 15:12:57
Either it will go into /include/ of some module (r
brandtr
2016/10/24 12:52:07
Right. But in the latter case (all RTP code in the
danilchap
2016/10/24 13:40:31
In the latter case:
If paced sender would be desig
brandtr
2016/10/24 14:16:30
Got it!
| |
| 21 #include "webrtc/system_wrappers/include/clock.h" | |
| 22 | |
| 23 namespace webrtc { | |
| 24 | |
| 25 // TODO(brandtr): Update this interface when FlexfecSender is hooked up | |
| 26 // to PacedSender. | |
| 27 class FlexfecSender { | |
|
danilchap
2016/10/20 15:12:57
this class doesn't send anything, it only generate
brandtr
2016/10/24 12:52:07
If your definition of "sending packets" is "emitti
danilchap
2016/10/24 13:40:31
Since it plan to put packet to transport itself, '
brandtr
2016/10/24 14:16:30
Makes sense! So I should probably rename ProducerF
| |
| 28 public: | |
| 29 static std::unique_ptr<FlexfecSender> Create( | |
| 30 int flexfec_payload_type, | |
| 31 uint32_t flexfec_ssrc, | |
| 32 uint32_t protected_media_ssrc, | |
| 33 std::vector<RtpExtension> rtp_header_extensions, | |
| 34 Clock* clock); | |
| 35 virtual ~FlexfecSender() = default; | |
| 36 | |
| 37 // Sets the FEC rate, max frames sent before FEC packets are sent, | |
| 38 // and what type of generator matrices are used. | |
| 39 virtual void SetFecParameters(const FecProtectionParams* params) = 0; | |
|
danilchap
2016/10/20 15:12:57
may be pass by const& (since internally it is assu
brandtr
2016/10/24 12:52:07
Agree. I just replicated the interface from Produc
| |
| 40 | |
| 41 // Adds a media packet to the internal buffer. When enough media packets | |
| 42 // have been added, the FEC packets are generated and stored internally. | |
| 43 // These FEC packets are then obtained by calling GetFecPackets(). | |
| 44 virtual int AddRtpPacketAndGenerateFec(RtpPacketToSend* packet) = 0; | |
|
danilchap
2016/10/20 15:12:57
what does this function return?
brandtr
2016/10/24 12:52:07
Added description. Also made parameter const& base
| |
| 45 | |
| 46 // Returns true if there are generated FEC packets available. | |
| 47 virtual bool FecAvailable() const = 0; | |
| 48 | |
| 49 // Returns generated FlexFEC packets. | |
| 50 virtual std::vector<std::unique_ptr<RtpPacketToSend>> GetFecPackets() = 0; | |
| 51 | |
| 52 // Returns the overhead, per packet, for FlexFEC. | |
| 53 virtual size_t MaxPacketOverhead() const = 0; | |
| 54 }; | |
| 55 | |
| 56 } // namespace webrtc | |
| 57 | |
| 58 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ | |
| OLD | NEW |