OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 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 |
(...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2076 kCandidateFoundation1); | 2076 kCandidateFoundation1); |
2077 candidate.set_tcptype(cricket::TCPTYPE_ACTIVE_STR); | 2077 candidate.set_tcptype(cricket::TCPTYPE_ACTIVE_STR); |
2078 std::unique_ptr<IceCandidateInterface> jcandidate( | 2078 std::unique_ptr<IceCandidateInterface> jcandidate( |
2079 new JsepIceCandidate(std::string("audio_content_name"), 0, candidate)); | 2079 new JsepIceCandidate(std::string("audio_content_name"), 0, candidate)); |
2080 | 2080 |
2081 std::string message = webrtc::SdpSerializeCandidate(*jcandidate); | 2081 std::string message = webrtc::SdpSerializeCandidate(*jcandidate); |
2082 EXPECT_EQ(std::string(kSdpTcpActiveCandidate), message); | 2082 EXPECT_EQ(std::string(kSdpTcpActiveCandidate), message); |
2083 } | 2083 } |
2084 | 2084 |
2085 TEST_F(WebRtcSdpTest, SerializeSessionDescriptionWithH264) { | 2085 TEST_F(WebRtcSdpTest, SerializeSessionDescriptionWithH264) { |
2086 if (!webrtc::H264Encoder::IsSupported()) | 2086 cricket::VideoCodec h264_codec("H264"); |
hta-webrtc
2016/11/15 11:34:59
Does this compile & run if you're compiling withou
magjed_webrtc
2016/11/15 17:18:26
Yes, it doesn't use the actual encoder, it just se
| |
2087 return; | 2087 h264_codec.SetParam("profile-level-id", "42e01f"); |
hta-webrtc
2016/11/15 11:34:59
Can you use the constructor and stringifier for pr
magjed_webrtc
2016/11/15 17:18:26
I can, but in the test we are checking:
EXPECT_NE(
hta-webrtc
2016/11/15 20:36:24
Acknowledged.
| |
2088 for (const auto& codec : cricket::DefaultVideoCodecList()) { | 2088 h264_codec.SetParam("level-asymmetry-allowed", "1"); |
2089 video_desc_->AddCodec(codec); | 2089 h264_codec.SetParam("packetization-mode", "1"); |
2090 } | 2090 video_desc_->AddCodec(h264_codec); |
stefan-webrtc
2016/11/15 09:00:08
Could you explain why this change is needed? Do I
magjed_webrtc
2016/11/15 17:18:26
This change is needed because cricket::DefaultVide
| |
2091 | |
2091 jdesc_.Initialize(desc_.Copy(), kSessionId, kSessionVersion); | 2092 jdesc_.Initialize(desc_.Copy(), kSessionId, kSessionVersion); |
2092 | 2093 |
2093 std::string message = webrtc::SdpSerialize(jdesc_, false); | 2094 std::string message = webrtc::SdpSerialize(jdesc_, false); |
2094 size_t after_pt = message.find(" H264/90000"); | 2095 size_t after_pt = message.find(" H264/90000"); |
2095 ASSERT_NE(after_pt, std::string::npos); | 2096 ASSERT_NE(after_pt, std::string::npos); |
2096 size_t before_pt = message.rfind("a=rtpmap:", after_pt); | 2097 size_t before_pt = message.rfind("a=rtpmap:", after_pt); |
2097 ASSERT_NE(before_pt, std::string::npos); | 2098 ASSERT_NE(before_pt, std::string::npos); |
2098 before_pt += strlen("a=rtpmap:"); | 2099 before_pt += strlen("a=rtpmap:"); |
2099 std::string pt = message.substr(before_pt, after_pt - before_pt); | 2100 std::string pt = message.substr(before_pt, after_pt - before_pt); |
2100 // TODO(hta): Check if payload type |pt| occurs in the m=video line. | 2101 // TODO(hta): Check if payload type |pt| occurs in the m=video line. |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3193 "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n" | 3194 "o=- 18446744069414584320 18446462598732840960 IN IP4 127.0.0.1\r\n" |
3194 "s=-\r\n" | 3195 "s=-\r\n" |
3195 "t=0 0\r\n" | 3196 "t=0 0\r\n" |
3196 "m=video 9 UDP/DTLS/SCTP 120\r\n" | 3197 "m=video 9 UDP/DTLS/SCTP 120\r\n" |
3197 "a=sctp-port 5000\r\n" | 3198 "a=sctp-port 5000\r\n" |
3198 "a=fmtp:108 foo=10\r\n"; | 3199 "a=fmtp:108 foo=10\r\n"; |
3199 | 3200 |
3200 ExpectParseFailure(std::string(kSdpWithSctpPortInVideoDescription), | 3201 ExpectParseFailure(std::string(kSdpWithSctpPortInVideoDescription), |
3201 "sctp-port"); | 3202 "sctp-port"); |
3202 } | 3203 } |
OLD | NEW |