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

Side by Side Diff: webrtc/api/call/flexfec_receive_stream.h

Issue 2542413002: Generalize FlexfecReceiveStream::Config. (CL1) (Closed)
Patch Set: Rebase. Created 4 years 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
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 std::string ToString() const;
37 // the appropriate configs here and in FlexfecSendStream. 39
38 using Config = FlexfecConfig; 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 };
39 70
40 // Starts stream activity. 71 // Starts stream activity.
41 // When a stream is active, it can receive and process packets. 72 // When a stream is active, it can receive and process packets.
42 virtual void Start() = 0; 73 virtual void Start() = 0;
43 // Stops stream activity. 74 // Stops stream activity.
44 // When a stream is stopped, it can't receive nor process packets. 75 // When a stream is stopped, it can't receive nor process packets.
45 virtual void Stop() = 0; 76 virtual void Stop() = 0;
46 77
47 virtual Stats GetStats() const = 0; 78 virtual Stats GetStats() const = 0;
48 79
49 protected: 80 protected:
50 virtual ~FlexfecReceiveStream() = default; 81 virtual ~FlexfecReceiveStream() = default;
51 }; 82 };
52 83
53 } // namespace webrtc 84 } // namespace webrtc
54 85
55 #endif // WEBRTC_API_CALL_FLEXFEC_RECEIVE_STREAM_H_ 86 #endif // WEBRTC_API_CALL_FLEXFEC_RECEIVE_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/call/call.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698