| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 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 24 matching lines...) Expand all Loading... |
| 35 using cricket::CA_UPDATE; | 35 using cricket::CA_UPDATE; |
| 36 using cricket::FakeVoiceMediaChannel; | 36 using cricket::FakeVoiceMediaChannel; |
| 37 using cricket::ScreencastId; | 37 using cricket::ScreencastId; |
| 38 using cricket::StreamParams; | 38 using cricket::StreamParams; |
| 39 using cricket::TransportChannel; | 39 using cricket::TransportChannel; |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 const cricket::AudioCodec kPcmuCodec(0, "PCMU", 64000, 8000, 1); | 42 const cricket::AudioCodec kPcmuCodec(0, "PCMU", 64000, 8000, 1); |
| 43 const cricket::AudioCodec kPcmaCodec(8, "PCMA", 64000, 8000, 1); | 43 const cricket::AudioCodec kPcmaCodec(8, "PCMA", 64000, 8000, 1); |
| 44 const cricket::AudioCodec kIsacCodec(103, "ISAC", 40000, 16000, 1); | 44 const cricket::AudioCodec kIsacCodec(103, "ISAC", 40000, 16000, 1); |
| 45 const cricket::VideoCodec kH264Codec(97, "H264", 640, 400, 30); | 45 const cricket::VideoCodec kH264Codec(97, "H264"); |
| 46 const cricket::VideoCodec kH264SvcCodec(99, "H264-SVC", 320, 200, 15); | 46 const cricket::VideoCodec kH264SvcCodec(99, "H264-SVC"); |
| 47 const cricket::DataCodec kGoogleDataCodec(101, "google-data"); | 47 const cricket::DataCodec kGoogleDataCodec(101, "google-data"); |
| 48 const uint32_t kSsrc1 = 0x1111; | 48 const uint32_t kSsrc1 = 0x1111; |
| 49 const uint32_t kSsrc2 = 0x2222; | 49 const uint32_t kSsrc2 = 0x2222; |
| 50 const uint32_t kSsrc3 = 0x3333; | 50 const uint32_t kSsrc3 = 0x3333; |
| 51 const int kAudioPts[] = {0, 8}; | 51 const int kAudioPts[] = {0, 8}; |
| 52 const int kVideoPts[] = {97, 99}; | 52 const int kVideoPts[] = {97, 99}; |
| 53 enum class NetworkIsWorker { Yes, No }; | 53 enum class NetworkIsWorker { Yes, No }; |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| 56 template <class ChannelT, | 56 template <class ChannelT, |
| (...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 template<> | 2106 template<> |
| 2107 void ChannelTest<VideoTraits>::CopyContent( | 2107 void ChannelTest<VideoTraits>::CopyContent( |
| 2108 const cricket::VideoContentDescription& source, | 2108 const cricket::VideoContentDescription& source, |
| 2109 cricket::VideoContentDescription* video) { | 2109 cricket::VideoContentDescription* video) { |
| 2110 *video = source; | 2110 *video = source; |
| 2111 } | 2111 } |
| 2112 | 2112 |
| 2113 template<> | 2113 template<> |
| 2114 bool ChannelTest<VideoTraits>::CodecMatches(const cricket::VideoCodec& c1, | 2114 bool ChannelTest<VideoTraits>::CodecMatches(const cricket::VideoCodec& c1, |
| 2115 const cricket::VideoCodec& c2) { | 2115 const cricket::VideoCodec& c2) { |
| 2116 return c1.name == c2.name && c1.width == c2.width && c1.height == c2.height && | 2116 return c1.name == c2.name; |
| 2117 c1.framerate == c2.framerate; | |
| 2118 } | 2117 } |
| 2119 | 2118 |
| 2120 template <> | 2119 template <> |
| 2121 void ChannelTest<VideoTraits>::AddLegacyStreamInContent( | 2120 void ChannelTest<VideoTraits>::AddLegacyStreamInContent( |
| 2122 uint32_t ssrc, | 2121 uint32_t ssrc, |
| 2123 int flags, | 2122 int flags, |
| 2124 cricket::VideoContentDescription* video) { | 2123 cricket::VideoContentDescription* video) { |
| 2125 video->AddLegacyStream(ssrc); | 2124 video->AddLegacyStream(ssrc); |
| 2126 } | 2125 } |
| 2127 | 2126 |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3677 }; | 3676 }; |
| 3678 rtc::CopyOnWriteBuffer payload(data, 3); | 3677 rtc::CopyOnWriteBuffer payload(data, 3); |
| 3679 cricket::SendDataResult result; | 3678 cricket::SendDataResult result; |
| 3680 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 3679 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
| 3681 EXPECT_EQ(params.ssrc, | 3680 EXPECT_EQ(params.ssrc, |
| 3682 media_channel1_->last_sent_data_params().ssrc); | 3681 media_channel1_->last_sent_data_params().ssrc); |
| 3683 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 3682 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
| 3684 } | 3683 } |
| 3685 | 3684 |
| 3686 // TODO(pthatcher): TestSetReceiver? | 3685 // TODO(pthatcher): TestSetReceiver? |
| OLD | NEW |