OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 // TODO(pbos): Move Config from common.h to here. | 11 // TODO(pbos): Move Config from common.h to here. |
12 | 12 |
13 #ifndef WEBRTC_CONFIG_H_ | 13 #ifndef WEBRTC_CONFIG_H_ |
14 #define WEBRTC_CONFIG_H_ | 14 #define WEBRTC_CONFIG_H_ |
15 | 15 |
16 #include <string> | 16 #include <string> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
| 19 #include "webrtc/base/basictypes.h" |
19 #include "webrtc/base/optional.h" | 20 #include "webrtc/base/optional.h" |
20 #include "webrtc/base/refcount.h" | 21 #include "webrtc/base/refcount.h" |
21 #include "webrtc/base/scoped_ref_ptr.h" | 22 #include "webrtc/base/scoped_ref_ptr.h" |
22 #include "webrtc/common_types.h" | 23 #include "webrtc/common_types.h" |
23 #include "webrtc/typedefs.h" | 24 #include "webrtc/typedefs.h" |
24 | 25 |
25 namespace webrtc { | 26 namespace webrtc { |
26 | 27 |
27 // Settings for NACK, see RFC 4585 for details. | 28 // Settings for NACK, see RFC 4585 for details. |
28 struct NackConfig { | 29 struct NackConfig { |
(...skipping 17 matching lines...) Expand all Loading... |
46 // Payload type used for ULPFEC packets. | 47 // Payload type used for ULPFEC packets. |
47 int ulpfec_payload_type; | 48 int ulpfec_payload_type; |
48 | 49 |
49 // Payload type used for RED packets. | 50 // Payload type used for RED packets. |
50 int red_payload_type; | 51 int red_payload_type; |
51 | 52 |
52 // RTX payload type for RED payload. | 53 // RTX payload type for RED payload. |
53 int red_rtx_payload_type; | 54 int red_rtx_payload_type; |
54 }; | 55 }; |
55 | 56 |
| 57 // Settings for FlexFEC forward error correction. |
| 58 // Set the payload type to '-1' to disable. |
| 59 struct FlexfecConfig { |
| 60 FlexfecConfig() |
| 61 : flexfec_payload_type(-1), flexfec_ssrc(0), protected_media_ssrcs() {} |
| 62 std::string ToString() const; |
| 63 |
| 64 // Payload type of FlexFEC. |
| 65 int flexfec_payload_type; |
| 66 |
| 67 // SSRC of FlexFEC stream. |
| 68 uint32_t flexfec_ssrc; |
| 69 |
| 70 // Vector containing a single element, corresponding to the SSRC of the media |
| 71 // stream being protected by this FlexFEC stream. The vector MUST have size 1. |
| 72 // |
| 73 // TODO(brandtr): Update comment above when we support multistream protection. |
| 74 std::vector<uint32_t> protected_media_ssrcs; |
| 75 }; |
| 76 |
56 // RTP header extension, see RFC 5285. | 77 // RTP header extension, see RFC 5285. |
57 struct RtpExtension { | 78 struct RtpExtension { |
58 RtpExtension() : id(0) {} | 79 RtpExtension() : id(0) {} |
59 RtpExtension(const std::string& uri, int id) : uri(uri), id(id) {} | 80 RtpExtension(const std::string& uri, int id) : uri(uri), id(id) {} |
60 std::string ToString() const; | 81 std::string ToString() const; |
61 bool operator==(const RtpExtension& rhs) const { | 82 bool operator==(const RtpExtension& rhs) const { |
62 return uri == rhs.uri && id == rhs.id; | 83 return uri == rhs.uri && id == rhs.id; |
63 } | 84 } |
64 static bool IsSupportedForAudio(const std::string& uri); | 85 static bool IsSupportedForAudio(const std::string& uri); |
65 static bool IsSupportedForVideo(const std::string& uri); | 86 static bool IsSupportedForVideo(const std::string& uri); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 252 |
232 class DecoderSpecificSettings { | 253 class DecoderSpecificSettings { |
233 public: | 254 public: |
234 virtual ~DecoderSpecificSettings() {} | 255 virtual ~DecoderSpecificSettings() {} |
235 rtc::Optional<VideoDecoderH264Settings> h264_extra_settings; | 256 rtc::Optional<VideoDecoderH264Settings> h264_extra_settings; |
236 }; | 257 }; |
237 | 258 |
238 } // namespace webrtc | 259 } // namespace webrtc |
239 | 260 |
240 #endif // WEBRTC_CONFIG_H_ | 261 #endif // WEBRTC_CONFIG_H_ |
OLD | NEW |