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

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

Issue 2542413002: Generalize FlexfecReceiveStream::Config. (CL1) (Closed)
Patch Set: 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"
philipel 2016/12/02 09:33:40 Is config.h still used?
brandtr 2016/12/02 09:47:57 Yep, for RtpExtension and RtcpMode.
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()
philipel 2016/12/02 09:33:40 For small structs like this I think it's cleaner t
brandtr 2016/12/02 09:47:57 Done.
37 // the appropriate configs here and in FlexfecSendStream. 39 : payload_type(-1),
38 using Config = FlexfecConfig; 40 remote_ssrc(0),
41 protected_media_ssrcs(),
42 local_ssrc(0),
43 rtcp_mode(RtcpMode::kCompound),
44 rtcp_send_transport(nullptr),
45 transport_cc(false),
46 extensions() {}
philipel 2016/12/02 09:33:40 newline after ctor
brandtr 2016/12/02 09:47:57 Done.
47 ~Config() = default;
philipel 2016/12/02 09:33:40 Remove default dtor declaration.
brandtr 2016/12/02 09:47:57 I think this is a non-POD struct (due to the std::
philipel 2016/12/02 10:14:51 I can't find that rule in the style guide, so I do
brandtr 2016/12/02 10:36:50 I didn't get this from the style guide, but rather
48
49 std::string ToString() const;
50
51 // Payload type for FlexFEC.
52 int payload_type;
53
54 // SSRC for FlexFEC stream to be received.
55 uint32_t remote_ssrc;
56
57 // Vector containing a single element, corresponding to the SSRC of the
58 // media stream being protected by this FlexFEC stream. The vector MUST have
59 // size 1.
60 //
61 // TODO(brandtr): Update comment above when we support multistream
62 // protection.
63 std::vector<uint32_t> protected_media_ssrcs;
64
65 // SSRC for RTCP reports to be sent.
66 uint32_t local_ssrc;
67
68 // What RTCP mode to use in the reports.
69 RtcpMode rtcp_mode;
70
71 // Transport for outgoing RTCP packets.
72 Transport* rtcp_send_transport;
73
74 // |transport_cc| is true whenever the send-side BWE RTCP feedback message
75 // has been negotiated. This is a prerequisite for enabling send-side BWE.
76 bool transport_cc;
77
78 // RTP header extensions that have been negotiated for this track.
79 std::vector<RtpExtension> extensions;
80 };
39 81
40 // Starts stream activity. 82 // Starts stream activity.
41 // When a stream is active, it can receive and process packets. 83 // When a stream is active, it can receive and process packets.
42 virtual void Start() = 0; 84 virtual void Start() = 0;
43 // Stops stream activity. 85 // Stops stream activity.
44 // When a stream is stopped, it can't receive nor process packets. 86 // When a stream is stopped, it can't receive nor process packets.
45 virtual void Stop() = 0; 87 virtual void Stop() = 0;
46 88
47 virtual Stats GetStats() const = 0; 89 virtual Stats GetStats() const = 0;
48 90
49 protected: 91 protected:
50 virtual ~FlexfecReceiveStream() = default; 92 virtual ~FlexfecReceiveStream() = default;
51 }; 93 };
52 94
53 } // namespace webrtc 95 } // namespace webrtc
54 96
55 #endif // WEBRTC_API_CALL_FLEXFEC_RECEIVE_STREAM_H_ 97 #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