| 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_API_CALL_FLEXFEC_RECEIVE_STREAM_H_ | |
| 12 #define WEBRTC_API_CALL_FLEXFEC_RECEIVE_STREAM_H_ | |
| 13 | |
| 14 #include <string> | |
| 15 #include <vector> | |
| 16 | |
| 17 #include "webrtc/api/call/transport.h" | |
| 18 #include "webrtc/config.h" | |
| 19 | |
| 20 namespace webrtc { | |
| 21 | |
| 22 // WORK IN PROGRESS! | |
| 23 // This class is under development and it is not yet intended for use outside | |
| 24 // of WebRTC. | |
| 25 // | |
| 26 // TODO(brandtr): Remove this comment when FlexFEC is ready for public use. | |
| 27 | |
| 28 class FlexfecReceiveStream { | |
| 29 public: | |
| 30 struct Stats { | |
| 31 std::string ToString(int64_t time_ms) const; | |
| 32 | |
| 33 // TODO(brandtr): Add appropriate stats here. | |
| 34 int flexfec_bitrate_bps; | |
| 35 }; | |
| 36 | |
| 37 struct Config { | |
| 38 std::string ToString() const; | |
| 39 | |
| 40 // Payload type for FlexFEC. | |
| 41 int payload_type = -1; | |
| 42 | |
| 43 // SSRC for FlexFEC stream to be received. | |
| 44 uint32_t remote_ssrc = 0; | |
| 45 | |
| 46 // Vector containing a single element, corresponding to the SSRC of the | |
| 47 // media stream being protected by this FlexFEC stream. The vector MUST have | |
| 48 // size 1. | |
| 49 // | |
| 50 // TODO(brandtr): Update comment above when we support multistream | |
| 51 // protection. | |
| 52 std::vector<uint32_t> protected_media_ssrcs; | |
| 53 | |
| 54 // SSRC for RTCP reports to be sent. | |
| 55 uint32_t local_ssrc = 0; | |
| 56 | |
| 57 // What RTCP mode to use in the reports. | |
| 58 RtcpMode rtcp_mode = RtcpMode::kCompound; | |
| 59 | |
| 60 // Transport for outgoing RTCP packets. | |
| 61 Transport* rtcp_send_transport = nullptr; | |
| 62 | |
| 63 // |transport_cc| is true whenever the send-side BWE RTCP feedback message | |
| 64 // has been negotiated. This is a prerequisite for enabling send-side BWE. | |
| 65 bool transport_cc = false; | |
| 66 | |
| 67 // RTP header extensions that have been negotiated for this track. | |
| 68 std::vector<RtpExtension> extensions; | |
| 69 }; | |
| 70 | |
| 71 // Starts stream activity. | |
| 72 // When a stream is active, it can receive and process packets. | |
| 73 virtual void Start() = 0; | |
| 74 // Stops stream activity. | |
| 75 // When a stream is stopped, it can't receive nor process packets. | |
| 76 virtual void Stop() = 0; | |
| 77 | |
| 78 virtual Stats GetStats() const = 0; | |
| 79 | |
| 80 protected: | |
| 81 virtual ~FlexfecReceiveStream() = default; | |
| 82 }; | |
| 83 | |
| 84 } // namespace webrtc | |
| 85 | |
| 86 #endif // WEBRTC_API_CALL_FLEXFEC_RECEIVE_STREAM_H_ | |
| OLD | NEW |