OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 #include "webrtc/config.h" | 10 #include "webrtc/config.h" |
11 | 11 |
12 #include <sstream> | 12 #include <sstream> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 namespace webrtc { | 15 namespace webrtc { |
16 std::string FecConfig::ToString() const { | 16 std::string FecConfig::ToString() const { |
17 std::stringstream ss; | 17 std::stringstream ss; |
18 ss << "{ulpfec_payload_type: " << ulpfec_payload_type; | 18 ss << "{ulpfec_payload_type: " << ulpfec_payload_type; |
19 ss << ", red_payload_type: " << red_payload_type; | 19 ss << ", red_payload_type: " << red_payload_type; |
20 ss << ", red_rtx_payload_type: " << red_rtx_payload_type; | 20 ss << ", red_rtx_payload_type: " << red_rtx_payload_type; |
21 ss << '}'; | 21 ss << '}'; |
22 return ss.str(); | 22 return ss.str(); |
23 } | 23 } |
24 | 24 |
25 std::string RtpExtension::ToString() const { | 25 std::string RtpExtension::ToString() const { |
26 std::stringstream ss; | 26 std::stringstream ss; |
27 ss << "{name: " << name; | 27 ss << "{uri: " << uri; |
28 ss << ", id: " << id; | 28 ss << ", id: " << id; |
29 ss << '}'; | 29 ss << '}'; |
30 return ss.str(); | 30 return ss.str(); |
31 } | 31 } |
32 | 32 |
33 const char* RtpExtension::kTOffset = "urn:ietf:params:rtp-hdrext:toffset"; | 33 const char* RtpExtension::kAudioLevelUri = |
34 const char* RtpExtension::kAbsSendTime = | 34 "urn:ietf:params:rtp-hdrext:ssrc-audio-level"; |
| 35 const int RtpExtension::kAudioLevelDefaultId = 1; |
| 36 |
| 37 const char* RtpExtension::kTimestampOffsetUri = |
| 38 "urn:ietf:params:rtp-hdrext:toffset"; |
| 39 const int RtpExtension::kTimestampOffsetDefaultId = 2; |
| 40 |
| 41 const char* RtpExtension::kAbsSendTimeUri = |
35 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; | 42 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; |
36 const char* RtpExtension::kVideoRotation = "urn:3gpp:video-orientation"; | 43 const int RtpExtension::kAbsSendTimeDefaultId = 3; |
37 const char* RtpExtension::kAudioLevel = | 44 |
38 "urn:ietf:params:rtp-hdrext:ssrc-audio-level"; | 45 const char* RtpExtension::kVideoRotationUri = "urn:3gpp:video-orientation"; |
39 const char* RtpExtension::kTransportSequenceNumber = | 46 const int RtpExtension::kVideoRotationDefaultId = 4; |
| 47 |
| 48 const char* RtpExtension::kTransportSequenceNumberUri = |
40 "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"; | 49 "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"; |
| 50 const int RtpExtension::kTransportSequenceNumberDefaultId = 5; |
41 | 51 |
42 bool RtpExtension::IsSupportedForAudio(const std::string& name) { | 52 bool RtpExtension::IsSupportedForAudio(const std::string& uri) { |
43 return name == webrtc::RtpExtension::kAbsSendTime || | 53 return uri == webrtc::RtpExtension::kAbsSendTimeUri || |
44 name == webrtc::RtpExtension::kAudioLevel || | 54 uri == webrtc::RtpExtension::kAudioLevelUri || |
45 name == webrtc::RtpExtension::kTransportSequenceNumber; | 55 uri == webrtc::RtpExtension::kTransportSequenceNumberUri; |
46 } | 56 } |
47 | 57 |
48 bool RtpExtension::IsSupportedForVideo(const std::string& name) { | 58 bool RtpExtension::IsSupportedForVideo(const std::string& uri) { |
49 return name == webrtc::RtpExtension::kTOffset || | 59 return uri == webrtc::RtpExtension::kTimestampOffsetUri || |
50 name == webrtc::RtpExtension::kAbsSendTime || | 60 uri == webrtc::RtpExtension::kAbsSendTimeUri || |
51 name == webrtc::RtpExtension::kVideoRotation || | 61 uri == webrtc::RtpExtension::kVideoRotationUri || |
52 name == webrtc::RtpExtension::kTransportSequenceNumber; | 62 uri == webrtc::RtpExtension::kTransportSequenceNumberUri; |
53 } | 63 } |
54 | 64 |
55 VideoStream::VideoStream() | 65 VideoStream::VideoStream() |
56 : width(0), | 66 : width(0), |
57 height(0), | 67 height(0), |
58 max_framerate(-1), | 68 max_framerate(-1), |
59 min_bitrate_bps(-1), | 69 min_bitrate_bps(-1), |
60 target_bitrate_bps(-1), | 70 target_bitrate_bps(-1), |
61 max_bitrate_bps(-1), | 71 max_bitrate_bps(-1), |
62 max_qp(-1) {} | 72 max_qp(-1) {} |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 124 } |
115 ss << ", encoder_specific_settings: "; | 125 ss << ", encoder_specific_settings: "; |
116 ss << (encoder_specific_settings != NULL ? "(ptr)" : "NULL"); | 126 ss << (encoder_specific_settings != NULL ? "(ptr)" : "NULL"); |
117 | 127 |
118 ss << ", min_transmit_bitrate_bps: " << min_transmit_bitrate_bps; | 128 ss << ", min_transmit_bitrate_bps: " << min_transmit_bitrate_bps; |
119 ss << '}'; | 129 ss << '}'; |
120 return ss.str(); | 130 return ss.str(); |
121 } | 131 } |
122 | 132 |
123 } // namespace webrtc | 133 } // namespace webrtc |
OLD | NEW |