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/base/basictypes.h" | |
| 18 #include "webrtc/config.h" | |
| 19 #include "webrtc/modules/include/module_common_types.h" | |
| 20 #include "webrtc/system_wrappers/include/clock.h" | |
| 21 | |
| 22 namespace webrtc { | |
| 23 | |
| 24 class RtpPacketToSend; | |
| 25 | |
| 26 // TODO(brandtr): Update this interface when FlexfecSender is hooked up | |
| 27 // to PacedSender. | |
| 28 class FlexfecSender { | |
| 29 public: | |
| 30 static std::unique_ptr<FlexfecSender> Create( | |
| 31 int flexfec_payload_type, | |
| 32 uint32_t flexfec_ssrc, | |
|
stefan-webrtc
2016/11/02 13:02:42
I would consider removing flexfec prefix here.
brandtr
2016/11/02 14:04:37
Done.
| |
| 33 uint32_t protected_media_ssrc, | |
| 34 const std::vector<RtpExtension>& rtp_header_extensions, | |
| 35 Clock* clock); | |
| 36 virtual ~FlexfecSender() = default; | |
| 37 | |
| 38 // Sets the FEC rate, max frames sent before FEC packets are sent, | |
| 39 // and what type of generator matrices are used. | |
| 40 virtual void SetFecParameters(const FecProtectionParams& params) = 0; | |
| 41 | |
| 42 // Adds a media packet to the internal buffer. When enough media packets | |
| 43 // have been added, the FEC packets are generated and stored internally. | |
| 44 // These FEC packets are then obtained by calling GetFecPackets(). | |
| 45 // Returns true if the media packet was successfully added. | |
| 46 virtual bool AddRtpPacketAndGenerateFec(const RtpPacketToSend& packet) = 0; | |
| 47 | |
| 48 // Returns true if there are generated FEC packets available. | |
| 49 virtual bool FecAvailable() const = 0; | |
| 50 | |
| 51 // Returns generated FlexFEC packets. | |
| 52 virtual std::vector<std::unique_ptr<RtpPacketToSend>> GetFecPackets() = 0; | |
| 53 | |
| 54 // Returns the overhead, per packet, for FlexFEC. | |
| 55 virtual size_t MaxPacketOverhead() const = 0; | |
| 56 }; | |
| 57 | |
| 58 } // namespace webrtc | |
| 59 | |
| 60 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_FLEXFEC_SENDER_H_ | |
| OLD | NEW |