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