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

Side by Side Diff: talk/session/media/channel_unittest.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 months 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 | « talk/session/media/channel.cc ('k') | talk/session/media/currentspeakermonitor.h » ('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 * libjingle 2 * libjingle
3 * Copyright 2009 Google Inc. 3 * Copyright 2009 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 using cricket::StreamParams; 60 using cricket::StreamParams;
61 using cricket::TransportChannel; 61 using cricket::TransportChannel;
62 using rtc::WindowId; 62 using rtc::WindowId;
63 63
64 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 64000, 8000, 1, 0); 64 static const cricket::AudioCodec kPcmuCodec(0, "PCMU", 64000, 8000, 1, 0);
65 static const cricket::AudioCodec kPcmaCodec(8, "PCMA", 64000, 8000, 1, 0); 65 static const cricket::AudioCodec kPcmaCodec(8, "PCMA", 64000, 8000, 1, 0);
66 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 40000, 16000, 1, 0); 66 static const cricket::AudioCodec kIsacCodec(103, "ISAC", 40000, 16000, 1, 0);
67 static const cricket::VideoCodec kH264Codec(97, "H264", 640, 400, 30, 0); 67 static const cricket::VideoCodec kH264Codec(97, "H264", 640, 400, 30, 0);
68 static const cricket::VideoCodec kH264SvcCodec(99, "H264-SVC", 320, 200, 15, 0); 68 static const cricket::VideoCodec kH264SvcCodec(99, "H264-SVC", 320, 200, 15, 0);
69 static const cricket::DataCodec kGoogleDataCodec(101, "google-data", 0); 69 static const cricket::DataCodec kGoogleDataCodec(101, "google-data", 0);
70 static const uint32 kSsrc1 = 0x1111; 70 static const uint32_t kSsrc1 = 0x1111;
71 static const uint32 kSsrc2 = 0x2222; 71 static const uint32_t kSsrc2 = 0x2222;
72 static const uint32 kSsrc3 = 0x3333; 72 static const uint32_t kSsrc3 = 0x3333;
73 static const int kAudioPts[] = {0, 8}; 73 static const int kAudioPts[] = {0, 8};
74 static const int kVideoPts[] = {97, 99}; 74 static const int kVideoPts[] = {97, 99};
75 75
76 template <class ChannelT, 76 template <class ChannelT,
77 class MediaChannelT, 77 class MediaChannelT,
78 class ContentT, 78 class ContentT,
79 class CodecT, 79 class CodecT,
80 class MediaInfoT, 80 class MediaInfoT,
81 class OptionsT> 81 class OptionsT>
82 class Traits { 82 class Traits {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 121
122 // Base class for Voice/VideoChannel tests 122 // Base class for Voice/VideoChannel tests
123 template<class T> 123 template<class T>
124 class ChannelTest : public testing::Test, public sigslot::has_slots<> { 124 class ChannelTest : public testing::Test, public sigslot::has_slots<> {
125 public: 125 public:
126 enum Flags { RTCP = 0x1, RTCP_MUX = 0x2, SECURE = 0x4, SSRC_MUX = 0x8, 126 enum Flags { RTCP = 0x1, RTCP_MUX = 0x2, SECURE = 0x4, SSRC_MUX = 0x8,
127 DTLS = 0x10 }; 127 DTLS = 0x10 };
128 128
129 ChannelTest(bool verify_playout, 129 ChannelTest(bool verify_playout,
130 const uint8* rtp_data, 130 const uint8_t* rtp_data,
131 int rtp_len, 131 int rtp_len,
132 const uint8* rtcp_data, 132 const uint8_t* rtcp_data,
133 int rtcp_len) 133 int rtcp_len)
134 : verify_playout_(verify_playout), 134 : verify_playout_(verify_playout),
135 transport_controller1_(cricket::ICEROLE_CONTROLLING), 135 transport_controller1_(cricket::ICEROLE_CONTROLLING),
136 transport_controller2_(cricket::ICEROLE_CONTROLLED), 136 transport_controller2_(cricket::ICEROLE_CONTROLLED),
137 media_channel1_(NULL), 137 media_channel1_(NULL),
138 media_channel2_(NULL), 138 media_channel2_(NULL),
139 rtp_packet_(reinterpret_cast<const char*>(rtp_data), rtp_len), 139 rtp_packet_(reinterpret_cast<const char*>(rtp_data), rtp_len),
140 rtcp_packet_(reinterpret_cast<const char*>(rtcp_data), rtcp_len), 140 rtcp_packet_(reinterpret_cast<const char*>(rtcp_data), rtcp_len),
141 media_info_callbacks1_(), 141 media_info_callbacks1_(),
142 media_info_callbacks2_() {} 142 media_info_callbacks2_() {}
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 302 }
303 bool SendRtcp1() { 303 bool SendRtcp1() {
304 return media_channel1_->SendRtcp(rtcp_packet_.c_str(), 304 return media_channel1_->SendRtcp(rtcp_packet_.c_str(),
305 static_cast<int>(rtcp_packet_.size())); 305 static_cast<int>(rtcp_packet_.size()));
306 } 306 }
307 bool SendRtcp2() { 307 bool SendRtcp2() {
308 return media_channel2_->SendRtcp(rtcp_packet_.c_str(), 308 return media_channel2_->SendRtcp(rtcp_packet_.c_str(),
309 static_cast<int>(rtcp_packet_.size())); 309 static_cast<int>(rtcp_packet_.size()));
310 } 310 }
311 // Methods to send custom data. 311 // Methods to send custom data.
312 bool SendCustomRtp1(uint32 ssrc, int sequence_number, int pl_type = -1) { 312 bool SendCustomRtp1(uint32_t ssrc, int sequence_number, int pl_type = -1) {
313 std::string data(CreateRtpData(ssrc, sequence_number, pl_type)); 313 std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
314 return media_channel1_->SendRtp(data.c_str(), 314 return media_channel1_->SendRtp(data.c_str(),
315 static_cast<int>(data.size())); 315 static_cast<int>(data.size()));
316 } 316 }
317 bool SendCustomRtp2(uint32 ssrc, int sequence_number, int pl_type = -1) { 317 bool SendCustomRtp2(uint32_t ssrc, int sequence_number, int pl_type = -1) {
318 std::string data(CreateRtpData(ssrc, sequence_number, pl_type)); 318 std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
319 return media_channel2_->SendRtp(data.c_str(), 319 return media_channel2_->SendRtp(data.c_str(),
320 static_cast<int>(data.size())); 320 static_cast<int>(data.size()));
321 } 321 }
322 bool SendCustomRtcp1(uint32 ssrc) { 322 bool SendCustomRtcp1(uint32_t ssrc) {
323 std::string data(CreateRtcpData(ssrc)); 323 std::string data(CreateRtcpData(ssrc));
324 return media_channel1_->SendRtcp(data.c_str(), 324 return media_channel1_->SendRtcp(data.c_str(),
325 static_cast<int>(data.size())); 325 static_cast<int>(data.size()));
326 } 326 }
327 bool SendCustomRtcp2(uint32 ssrc) { 327 bool SendCustomRtcp2(uint32_t ssrc) {
328 std::string data(CreateRtcpData(ssrc)); 328 std::string data(CreateRtcpData(ssrc));
329 return media_channel2_->SendRtcp(data.c_str(), 329 return media_channel2_->SendRtcp(data.c_str(),
330 static_cast<int>(data.size())); 330 static_cast<int>(data.size()));
331 } 331 }
332 bool CheckRtp1() { 332 bool CheckRtp1() {
333 return media_channel1_->CheckRtp(rtp_packet_.c_str(), 333 return media_channel1_->CheckRtp(rtp_packet_.c_str(),
334 static_cast<int>(rtp_packet_.size())); 334 static_cast<int>(rtp_packet_.size()));
335 } 335 }
336 bool CheckRtp2() { 336 bool CheckRtp2() {
337 return media_channel2_->CheckRtp(rtp_packet_.c_str(), 337 return media_channel2_->CheckRtp(rtp_packet_.c_str(),
338 static_cast<int>(rtp_packet_.size())); 338 static_cast<int>(rtp_packet_.size()));
339 } 339 }
340 bool CheckRtcp1() { 340 bool CheckRtcp1() {
341 return media_channel1_->CheckRtcp(rtcp_packet_.c_str(), 341 return media_channel1_->CheckRtcp(rtcp_packet_.c_str(),
342 static_cast<int>(rtcp_packet_.size())); 342 static_cast<int>(rtcp_packet_.size()));
343 } 343 }
344 bool CheckRtcp2() { 344 bool CheckRtcp2() {
345 return media_channel2_->CheckRtcp(rtcp_packet_.c_str(), 345 return media_channel2_->CheckRtcp(rtcp_packet_.c_str(),
346 static_cast<int>(rtcp_packet_.size())); 346 static_cast<int>(rtcp_packet_.size()));
347 } 347 }
348 // Methods to check custom data. 348 // Methods to check custom data.
349 bool CheckCustomRtp1(uint32 ssrc, int sequence_number, int pl_type = -1 ) { 349 bool CheckCustomRtp1(uint32_t ssrc, int sequence_number, int pl_type = -1) {
350 std::string data(CreateRtpData(ssrc, sequence_number, pl_type)); 350 std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
351 return media_channel1_->CheckRtp(data.c_str(), 351 return media_channel1_->CheckRtp(data.c_str(),
352 static_cast<int>(data.size())); 352 static_cast<int>(data.size()));
353 } 353 }
354 bool CheckCustomRtp2(uint32 ssrc, int sequence_number, int pl_type = -1) { 354 bool CheckCustomRtp2(uint32_t ssrc, int sequence_number, int pl_type = -1) {
355 std::string data(CreateRtpData(ssrc, sequence_number, pl_type)); 355 std::string data(CreateRtpData(ssrc, sequence_number, pl_type));
356 return media_channel2_->CheckRtp(data.c_str(), 356 return media_channel2_->CheckRtp(data.c_str(),
357 static_cast<int>(data.size())); 357 static_cast<int>(data.size()));
358 } 358 }
359 bool CheckCustomRtcp1(uint32 ssrc) { 359 bool CheckCustomRtcp1(uint32_t ssrc) {
360 std::string data(CreateRtcpData(ssrc)); 360 std::string data(CreateRtcpData(ssrc));
361 return media_channel1_->CheckRtcp(data.c_str(), 361 return media_channel1_->CheckRtcp(data.c_str(),
362 static_cast<int>(data.size())); 362 static_cast<int>(data.size()));
363 } 363 }
364 bool CheckCustomRtcp2(uint32 ssrc) { 364 bool CheckCustomRtcp2(uint32_t ssrc) {
365 std::string data(CreateRtcpData(ssrc)); 365 std::string data(CreateRtcpData(ssrc));
366 return media_channel2_->CheckRtcp(data.c_str(), 366 return media_channel2_->CheckRtcp(data.c_str(),
367 static_cast<int>(data.size())); 367 static_cast<int>(data.size()));
368 } 368 }
369 std::string CreateRtpData(uint32 ssrc, int sequence_number, int pl_type) { 369 std::string CreateRtpData(uint32_t ssrc, int sequence_number, int pl_type) {
370 std::string data(rtp_packet_); 370 std::string data(rtp_packet_);
371 // Set SSRC in the rtp packet copy. 371 // Set SSRC in the rtp packet copy.
372 rtc::SetBE32(const_cast<char*>(data.c_str()) + 8, ssrc); 372 rtc::SetBE32(const_cast<char*>(data.c_str()) + 8, ssrc);
373 rtc::SetBE16(const_cast<char*>(data.c_str()) + 2, sequence_number); 373 rtc::SetBE16(const_cast<char*>(data.c_str()) + 2, sequence_number);
374 if (pl_type >= 0) { 374 if (pl_type >= 0) {
375 rtc::Set8(const_cast<char*>(data.c_str()), 1, 375 rtc::Set8(const_cast<char*>(data.c_str()), 1,
376 static_cast<uint8_t>(pl_type)); 376 static_cast<uint8_t>(pl_type));
377 } 377 }
378 return data; 378 return data;
379 } 379 }
380 std::string CreateRtcpData(uint32 ssrc) { 380 std::string CreateRtcpData(uint32_t ssrc) {
381 std::string data(rtcp_packet_); 381 std::string data(rtcp_packet_);
382 // Set SSRC in the rtcp packet copy. 382 // Set SSRC in the rtcp packet copy.
383 rtc::SetBE32(const_cast<char*>(data.c_str()) + 4, ssrc); 383 rtc::SetBE32(const_cast<char*>(data.c_str()) + 4, ssrc);
384 return data; 384 return data;
385 } 385 }
386 386
387 bool CheckNoRtp1() { 387 bool CheckNoRtp1() {
388 return media_channel1_->CheckNoRtp(); 388 return media_channel1_->CheckNoRtp();
389 } 389 }
390 bool CheckNoRtp2() { 390 bool CheckNoRtp2() {
(...skipping 12 matching lines...) Expand all
403 typename T::Content* content) { 403 typename T::Content* content) {
404 // overridden in specialized classes 404 // overridden in specialized classes
405 } 405 }
406 void CopyContent(const typename T::Content& source, 406 void CopyContent(const typename T::Content& source,
407 typename T::Content* content) { 407 typename T::Content* content) {
408 // overridden in specialized classes 408 // overridden in specialized classes
409 } 409 }
410 410
411 // Creates a cricket::SessionDescription with one MediaContent and one stream. 411 // Creates a cricket::SessionDescription with one MediaContent and one stream.
412 // kPcmuCodec is used as audio codec and kH264Codec is used as video codec. 412 // kPcmuCodec is used as audio codec and kH264Codec is used as video codec.
413 cricket::SessionDescription* CreateSessionDescriptionWithStream(uint32 ssrc) { 413 cricket::SessionDescription* CreateSessionDescriptionWithStream(
414 uint32_t ssrc) {
414 typename T::Content content; 415 typename T::Content content;
415 cricket::SessionDescription* sdesc = new cricket::SessionDescription(); 416 cricket::SessionDescription* sdesc = new cricket::SessionDescription();
416 CreateContent(SECURE, kPcmuCodec, kH264Codec, &content); 417 CreateContent(SECURE, kPcmuCodec, kH264Codec, &content);
417 AddLegacyStreamInContent(ssrc, 0, &content); 418 AddLegacyStreamInContent(ssrc, 0, &content);
418 sdesc->AddContent("DUMMY_CONTENT_NAME", 419 sdesc->AddContent("DUMMY_CONTENT_NAME",
419 cricket::NS_JINGLE_RTP, content.Copy()); 420 cricket::NS_JINGLE_RTP, content.Copy());
420 return sdesc; 421 return sdesc;
421 } 422 }
422 423
423 class CallThread : public rtc::SignalThread { 424 class CallThread : public rtc::SignalThread {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 460
460 void OnMediaMonitor(typename T::Channel* channel, 461 void OnMediaMonitor(typename T::Channel* channel,
461 const typename T::MediaInfo& info) { 462 const typename T::MediaInfo& info) {
462 if (channel == channel1_.get()) { 463 if (channel == channel1_.get()) {
463 media_info_callbacks1_++; 464 media_info_callbacks1_++;
464 } else if (channel == channel2_.get()) { 465 } else if (channel == channel2_.get()) {
465 media_info_callbacks2_++; 466 media_info_callbacks2_++;
466 } 467 }
467 } 468 }
468 469
469 void AddLegacyStreamInContent(uint32 ssrc, int flags, 470 void AddLegacyStreamInContent(uint32_t ssrc,
470 typename T::Content* content) { 471 int flags,
472 typename T::Content* content) {
471 // Base implementation. 473 // Base implementation.
472 } 474 }
473 475
474 // Tests that can be used by derived classes. 476 // Tests that can be used by derived classes.
475 477
476 // Basic sanity check. 478 // Basic sanity check.
477 void TestInit() { 479 void TestInit() {
478 CreateChannels(0, 0); 480 CreateChannels(0, 0);
479 EXPECT_FALSE(channel1_->secure()); 481 EXPECT_FALSE(channel1_->secure());
480 EXPECT_FALSE(media_channel1_->sending()); 482 EXPECT_FALSE(media_channel1_->sending());
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 void SendBundleToBundle( 1445 void SendBundleToBundle(
1444 const int* pl_types, int len, bool rtcp_mux, bool secure) { 1446 const int* pl_types, int len, bool rtcp_mux, bool secure) {
1445 ASSERT_EQ(2, len); 1447 ASSERT_EQ(2, len);
1446 int sequence_number1_1 = 0, sequence_number2_2 = 0; 1448 int sequence_number1_1 = 0, sequence_number2_2 = 0;
1447 // Only pl_type1 was added to the bundle filter for both |channel1_| 1449 // Only pl_type1 was added to the bundle filter for both |channel1_|
1448 // and |channel2_|. 1450 // and |channel2_|.
1449 int pl_type1 = pl_types[0]; 1451 int pl_type1 = pl_types[0];
1450 int pl_type2 = pl_types[1]; 1452 int pl_type2 = pl_types[1];
1451 int flags = SSRC_MUX | RTCP; 1453 int flags = SSRC_MUX | RTCP;
1452 if (secure) flags |= SECURE; 1454 if (secure) flags |= SECURE;
1453 uint32 expected_channels = 2U; 1455 uint32_t expected_channels = 2U;
1454 if (rtcp_mux) { 1456 if (rtcp_mux) {
1455 flags |= RTCP_MUX; 1457 flags |= RTCP_MUX;
1456 expected_channels = 1U; 1458 expected_channels = 1U;
1457 } 1459 }
1458 CreateChannels(flags, flags); 1460 CreateChannels(flags, flags);
1459 EXPECT_TRUE(SendInitiate()); 1461 EXPECT_TRUE(SendInitiate());
1460 ASSERT_TRUE(GetTransport1()); 1462 ASSERT_TRUE(GetTransport1());
1461 ASSERT_TRUE(GetTransport2()); 1463 ASSERT_TRUE(GetTransport2());
1462 EXPECT_EQ(2U, GetTransport1()->channels().size()); 1464 EXPECT_EQ(2U, GetTransport1()->channels().size());
1463 EXPECT_EQ(expected_channels, GetTransport2()->channels().size()); 1465 EXPECT_EQ(expected_channels, GetTransport2()->channels().size());
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1827 *audio = source; 1829 *audio = source;
1828 } 1830 }
1829 1831
1830 template<> 1832 template<>
1831 bool ChannelTest<VoiceTraits>::CodecMatches(const cricket::AudioCodec& c1, 1833 bool ChannelTest<VoiceTraits>::CodecMatches(const cricket::AudioCodec& c1,
1832 const cricket::AudioCodec& c2) { 1834 const cricket::AudioCodec& c2) {
1833 return c1.name == c2.name && c1.clockrate == c2.clockrate && 1835 return c1.name == c2.name && c1.clockrate == c2.clockrate &&
1834 c1.bitrate == c2.bitrate && c1.channels == c2.channels; 1836 c1.bitrate == c2.bitrate && c1.channels == c2.channels;
1835 } 1837 }
1836 1838
1837 template<> 1839 template <>
1838 void ChannelTest<VoiceTraits>::AddLegacyStreamInContent( 1840 void ChannelTest<VoiceTraits>::AddLegacyStreamInContent(
1839 uint32 ssrc, int flags, cricket::AudioContentDescription* audio) { 1841 uint32_t ssrc,
1842 int flags,
1843 cricket::AudioContentDescription* audio) {
1840 audio->AddLegacyStream(ssrc); 1844 audio->AddLegacyStream(ssrc);
1841 } 1845 }
1842 1846
1843 class VoiceChannelTest 1847 class VoiceChannelTest
1844 : public ChannelTest<VoiceTraits> { 1848 : public ChannelTest<VoiceTraits> {
1845 public: 1849 public:
1846 typedef ChannelTest<VoiceTraits> Base; 1850 typedef ChannelTest<VoiceTraits> Base;
1847 VoiceChannelTest() 1851 VoiceChannelTest()
1848 : Base(true, 1852 : Base(true,
1849 kPcmuFrame, 1853 kPcmuFrame,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1897 *video = source; 1901 *video = source;
1898 } 1902 }
1899 1903
1900 template<> 1904 template<>
1901 bool ChannelTest<VideoTraits>::CodecMatches(const cricket::VideoCodec& c1, 1905 bool ChannelTest<VideoTraits>::CodecMatches(const cricket::VideoCodec& c1,
1902 const cricket::VideoCodec& c2) { 1906 const cricket::VideoCodec& c2) {
1903 return c1.name == c2.name && c1.width == c2.width && c1.height == c2.height && 1907 return c1.name == c2.name && c1.width == c2.width && c1.height == c2.height &&
1904 c1.framerate == c2.framerate; 1908 c1.framerate == c2.framerate;
1905 } 1909 }
1906 1910
1907 template<> 1911 template <>
1908 void ChannelTest<VideoTraits>::AddLegacyStreamInContent( 1912 void ChannelTest<VideoTraits>::AddLegacyStreamInContent(
1909 uint32 ssrc, int flags, cricket::VideoContentDescription* video) { 1913 uint32_t ssrc,
1914 int flags,
1915 cricket::VideoContentDescription* video) {
1910 video->AddLegacyStream(ssrc); 1916 video->AddLegacyStream(ssrc);
1911 } 1917 }
1912 1918
1913 class VideoChannelTest 1919 class VideoChannelTest
1914 : public ChannelTest<VideoTraits> { 1920 : public ChannelTest<VideoTraits> {
1915 public: 1921 public:
1916 typedef ChannelTest<VideoTraits> Base; 1922 typedef ChannelTest<VideoTraits> Base;
1917 VideoChannelTest() 1923 VideoChannelTest()
1918 : Base(false, 1924 : Base(false,
1919 kH264Packet, 1925 kH264Packet,
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 cricket::DataContentDescription* data) { 2650 cricket::DataContentDescription* data) {
2645 *data = source; 2651 *data = source;
2646 } 2652 }
2647 2653
2648 template<> 2654 template<>
2649 bool ChannelTest<DataTraits>::CodecMatches(const cricket::DataCodec& c1, 2655 bool ChannelTest<DataTraits>::CodecMatches(const cricket::DataCodec& c1,
2650 const cricket::DataCodec& c2) { 2656 const cricket::DataCodec& c2) {
2651 return c1.name == c2.name; 2657 return c1.name == c2.name;
2652 } 2658 }
2653 2659
2654 template<> 2660 template <>
2655 void ChannelTest<DataTraits>::AddLegacyStreamInContent( 2661 void ChannelTest<DataTraits>::AddLegacyStreamInContent(
2656 uint32 ssrc, int flags, cricket::DataContentDescription* data) { 2662 uint32_t ssrc,
2663 int flags,
2664 cricket::DataContentDescription* data) {
2657 data->AddLegacyStream(ssrc); 2665 data->AddLegacyStream(ssrc);
2658 } 2666 }
2659 2667
2660 TEST_F(DataChannelTest, TestInit) { 2668 TEST_F(DataChannelTest, TestInit) {
2661 Base::TestInit(); 2669 Base::TestInit();
2662 EXPECT_FALSE(media_channel1_->IsStreamMuted(0)); 2670 EXPECT_FALSE(media_channel1_->IsStreamMuted(0));
2663 } 2671 }
2664 2672
2665 TEST_F(DataChannelTest, TestSetContents) { 2673 TEST_F(DataChannelTest, TestSetContents) {
2666 Base::TestSetContents(); 2674 Base::TestSetContents();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
2794 }; 2802 };
2795 rtc::Buffer payload(data, 3); 2803 rtc::Buffer payload(data, 3);
2796 cricket::SendDataResult result; 2804 cricket::SendDataResult result;
2797 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); 2805 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result));
2798 EXPECT_EQ(params.ssrc, 2806 EXPECT_EQ(params.ssrc,
2799 media_channel1_->last_sent_data_params().ssrc); 2807 media_channel1_->last_sent_data_params().ssrc);
2800 EXPECT_EQ("foo", media_channel1_->last_sent_data()); 2808 EXPECT_EQ("foo", media_channel1_->last_sent_data());
2801 } 2809 }
2802 2810
2803 // TODO(pthatcher): TestSetReceiver? 2811 // TODO(pthatcher): TestSetReceiver?
OLDNEW
« no previous file with comments | « talk/session/media/channel.cc ('k') | talk/session/media/currentspeakermonitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698