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

Side by Side Diff: webrtc/pc/channel_unittest.cc

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 bool AddStream1(int id) { 261 bool AddStream1(int id) {
262 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id)); 262 return channel1_->AddRecvStream(cricket::StreamParams::CreateLegacy(id));
263 } 263 }
264 bool RemoveStream1(int id) { 264 bool RemoveStream1(int id) {
265 return channel1_->RemoveRecvStream(id); 265 return channel1_->RemoveRecvStream(id);
266 } 266 }
267 267
268 cricket::FakeTransport* GetTransport1() { 268 cricket::FakeTransport* GetTransport1() {
269 std::string name = channel1_->content_name(); 269 std::string name = channel1_->content_name();
270 return network_thread_->Invoke<cricket::FakeTransport*>( 270 return network_thread_->Invoke<cricket::FakeTransport*>(
271 FROM_HERE,
271 [this, name] { return transport_controller1_->GetTransport_n(name); }); 272 [this, name] { return transport_controller1_->GetTransport_n(name); });
272 } 273 }
273 cricket::FakeTransport* GetTransport2() { 274 cricket::FakeTransport* GetTransport2() {
274 std::string name = channel2_->content_name(); 275 std::string name = channel2_->content_name();
275 return network_thread_->Invoke<cricket::FakeTransport*>( 276 return network_thread_->Invoke<cricket::FakeTransport*>(
277 FROM_HERE,
276 [this, name] { return transport_controller2_->GetTransport_n(name); }); 278 [this, name] { return transport_controller2_->GetTransport_n(name); });
277 } 279 }
278 280
279 void SendRtp1() { 281 void SendRtp1() {
280 media_channel1_->SendRtp(rtp_packet_.data(), rtp_packet_.size(), 282 media_channel1_->SendRtp(rtp_packet_.data(), rtp_packet_.size(),
281 rtc::PacketOptions()); 283 rtc::PacketOptions());
282 } 284 }
283 void SendRtp2() { 285 void SendRtp2() {
284 media_channel2_->SendRtp(rtp_packet_.data(), rtp_packet_.size(), 286 media_channel2_->SendRtp(rtp_packet_.data(), rtp_packet_.size(),
285 rtc::PacketOptions()); 287 rtc::PacketOptions());
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 395
394 // Will manage the lifetime of a CallThread, making sure it's 396 // Will manage the lifetime of a CallThread, making sure it's
395 // destroyed before this object goes out of scope. 397 // destroyed before this object goes out of scope.
396 class ScopedCallThread { 398 class ScopedCallThread {
397 public: 399 public:
398 template <class FunctorT> 400 template <class FunctorT>
399 ScopedCallThread(const FunctorT& functor) 401 ScopedCallThread(const FunctorT& functor)
400 : thread_(rtc::Thread::Create()), 402 : thread_(rtc::Thread::Create()),
401 task_(new rtc::FunctorMessageHandler<void, FunctorT>(functor)) { 403 task_(new rtc::FunctorMessageHandler<void, FunctorT>(functor)) {
402 thread_->Start(); 404 thread_->Start();
403 thread_->Post(task_.get()); 405 thread_->Post(FROM_HERE, task_.get());
404 } 406 }
405 407
406 ~ScopedCallThread() { thread_->Stop(); } 408 ~ScopedCallThread() { thread_->Stop(); }
407 409
408 rtc::Thread* thread() { return thread_.get(); } 410 rtc::Thread* thread() { return thread_.get(); }
409 411
410 private: 412 private:
411 std::unique_ptr<rtc::Thread> thread_; 413 std::unique_ptr<rtc::Thread> thread_;
412 std::unique_ptr<rtc::MessageHandler> task_; 414 std::unique_ptr<rtc::MessageHandler> task_;
413 }; 415 };
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
904 CreateChannels(0, 0); 906 CreateChannels(0, 0);
905 907
906 cricket::TransportChannel* transport_channel1 = 908 cricket::TransportChannel* transport_channel1 =
907 channel1_->transport_channel(); 909 channel1_->transport_channel();
908 ASSERT_TRUE(transport_channel1); 910 ASSERT_TRUE(transport_channel1);
909 typename T::MediaChannel* media_channel1 = 911 typename T::MediaChannel* media_channel1 =
910 static_cast<typename T::MediaChannel*>(channel1_->media_channel()); 912 static_cast<typename T::MediaChannel*>(channel1_->media_channel());
911 ASSERT_TRUE(media_channel1); 913 ASSERT_TRUE(media_channel1);
912 914
913 media_channel1->set_num_network_route_changes(0); 915 media_channel1->set_num_network_route_changes(0);
914 network_thread_->Invoke<void>([transport_channel1] { 916 network_thread_->Invoke<void>(FROM_HERE, [transport_channel1] {
915 // The transport channel becomes disconnected. 917 // The transport channel becomes disconnected.
916 transport_channel1->SignalSelectedCandidatePairChanged(transport_channel1, 918 transport_channel1->SignalSelectedCandidatePairChanged(transport_channel1,
917 nullptr, -1); 919 nullptr, -1);
918 }); 920 });
919 WaitForThreads(); 921 WaitForThreads();
920 EXPECT_EQ(1, media_channel1->num_network_route_changes()); 922 EXPECT_EQ(1, media_channel1->num_network_route_changes());
921 EXPECT_FALSE(media_channel1->last_network_route().connected); 923 EXPECT_FALSE(media_channel1->last_network_route().connected);
922 media_channel1->set_num_network_route_changes(0); 924 media_channel1->set_num_network_route_changes(0);
923 925
924 network_thread_->Invoke<void>([this, transport_channel1, media_channel1, 926 network_thread_->Invoke<void>(FROM_HERE, [this, transport_channel1,
925 kLocalNetId, kRemoteNetId, kLastPacketId] { 927 media_channel1, kLocalNetId,
928 kRemoteNetId, kLastPacketId] {
926 // The transport channel becomes connected. 929 // The transport channel becomes connected.
927 rtc::SocketAddress local_address("192.168.1.1", 1000 /* port number */); 930 rtc::SocketAddress local_address("192.168.1.1", 1000 /* port number */);
928 rtc::SocketAddress remote_address("192.168.1.2", 2000 /* port number */); 931 rtc::SocketAddress remote_address("192.168.1.2", 2000 /* port number */);
929 std::unique_ptr<cricket::CandidatePairInterface> candidate_pair( 932 std::unique_ptr<cricket::CandidatePairInterface> candidate_pair(
930 transport_controller1_->CreateFakeCandidatePair( 933 transport_controller1_->CreateFakeCandidatePair(
931 local_address, kLocalNetId, remote_address, kRemoteNetId)); 934 local_address, kLocalNetId, remote_address, kRemoteNetId));
932 transport_channel1->SignalSelectedCandidatePairChanged( 935 transport_channel1->SignalSelectedCandidatePairChanged(
933 transport_channel1, candidate_pair.get(), kLastPacketId); 936 transport_channel1, candidate_pair.get(), kLastPacketId);
934 }); 937 });
935 WaitForThreads(); 938 WaitForThreads();
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 SendRtp1(); 1438 SendRtp1();
1436 SendRtp2(); 1439 SendRtp2();
1437 WaitForThreads(); 1440 WaitForThreads();
1438 EXPECT_TRUE(CheckRtp1()); 1441 EXPECT_TRUE(CheckRtp1());
1439 EXPECT_TRUE(CheckRtp2()); 1442 EXPECT_TRUE(CheckRtp2());
1440 EXPECT_TRUE(CheckNoRtp1()); 1443 EXPECT_TRUE(CheckNoRtp1());
1441 EXPECT_TRUE(CheckNoRtp2()); 1444 EXPECT_TRUE(CheckNoRtp2());
1442 1445
1443 // Lose writability, which should fail. 1446 // Lose writability, which should fail.
1444 network_thread_->Invoke<void>( 1447 network_thread_->Invoke<void>(
1445 [this] { GetTransport1()->SetWritable(false); }); 1448 FROM_HERE, [this] { GetTransport1()->SetWritable(false); });
1446 SendRtp1(); 1449 SendRtp1();
1447 SendRtp2(); 1450 SendRtp2();
1448 WaitForThreads(); 1451 WaitForThreads();
1449 EXPECT_TRUE(CheckRtp1()); 1452 EXPECT_TRUE(CheckRtp1());
1450 EXPECT_TRUE(CheckNoRtp2()); 1453 EXPECT_TRUE(CheckNoRtp2());
1451 1454
1452 // Regain writability 1455 // Regain writability
1453 network_thread_->Invoke<void>( 1456 network_thread_->Invoke<void>(
1454 [this] { GetTransport1()->SetWritable(true); }); 1457 FROM_HERE, [this] { GetTransport1()->SetWritable(true); });
1455 EXPECT_TRUE(media_channel1_->sending()); 1458 EXPECT_TRUE(media_channel1_->sending());
1456 SendRtp1(); 1459 SendRtp1();
1457 SendRtp2(); 1460 SendRtp2();
1458 WaitForThreads(); 1461 WaitForThreads();
1459 EXPECT_TRUE(CheckRtp1()); 1462 EXPECT_TRUE(CheckRtp1());
1460 EXPECT_TRUE(CheckRtp2()); 1463 EXPECT_TRUE(CheckRtp2());
1461 EXPECT_TRUE(CheckNoRtp1()); 1464 EXPECT_TRUE(CheckNoRtp1());
1462 EXPECT_TRUE(CheckNoRtp2()); 1465 EXPECT_TRUE(CheckNoRtp2());
1463 1466
1464 // Lose writability completely 1467 // Lose writability completely
1465 network_thread_->Invoke<void>( 1468 network_thread_->Invoke<void>(
1466 [this] { GetTransport1()->SetDestination(NULL); }); 1469 FROM_HERE, [this] { GetTransport1()->SetDestination(NULL); });
1467 EXPECT_TRUE(media_channel1_->sending()); 1470 EXPECT_TRUE(media_channel1_->sending());
1468 1471
1469 // Should fail also. 1472 // Should fail also.
1470 SendRtp1(); 1473 SendRtp1();
1471 SendRtp2(); 1474 SendRtp2();
1472 WaitForThreads(); 1475 WaitForThreads();
1473 EXPECT_TRUE(CheckRtp1()); 1476 EXPECT_TRUE(CheckRtp1());
1474 EXPECT_TRUE(CheckNoRtp2()); 1477 EXPECT_TRUE(CheckNoRtp2());
1475 1478
1476 // Gain writability back 1479 // Gain writability back
1477 network_thread_->Invoke<void>( 1480 network_thread_->Invoke<void>(FROM_HERE, [this] {
1478 [this] { GetTransport1()->SetDestination(GetTransport2()); }); 1481 GetTransport1()->SetDestination(GetTransport2());
1482 });
1479 EXPECT_TRUE(media_channel1_->sending()); 1483 EXPECT_TRUE(media_channel1_->sending());
1480 SendRtp1(); 1484 SendRtp1();
1481 SendRtp2(); 1485 SendRtp2();
1482 WaitForThreads(); 1486 WaitForThreads();
1483 EXPECT_TRUE(CheckRtp1()); 1487 EXPECT_TRUE(CheckRtp1());
1484 EXPECT_TRUE(CheckRtp2()); 1488 EXPECT_TRUE(CheckRtp2());
1485 EXPECT_TRUE(CheckNoRtp1()); 1489 EXPECT_TRUE(CheckNoRtp1());
1486 EXPECT_TRUE(CheckNoRtp2()); 1490 EXPECT_TRUE(CheckNoRtp2());
1487 } 1491 }
1488 1492
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 media_channel2_->SendRtp(kBadPacket, sizeof(kBadPacket), 1772 media_channel2_->SendRtp(kBadPacket, sizeof(kBadPacket),
1769 rtc::PacketOptions()); 1773 rtc::PacketOptions());
1770 WaitForThreads(); 1774 WaitForThreads();
1771 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_handler.error_); 1775 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_handler.error_);
1772 EXPECT_EQ(cricket::SrtpFilter::PROTECT, error_handler.mode_); 1776 EXPECT_EQ(cricket::SrtpFilter::PROTECT, error_handler.mode_);
1773 1777
1774 // Testing failures in receiving packets. 1778 // Testing failures in receiving packets.
1775 error_handler.error_ = cricket::SrtpFilter::ERROR_NONE; 1779 error_handler.error_ = cricket::SrtpFilter::ERROR_NONE;
1776 error_handler.mode_ = cricket::SrtpFilter::UNPROTECT; 1780 error_handler.mode_ = cricket::SrtpFilter::UNPROTECT;
1777 1781
1778 network_thread_->Invoke<void>([this] { 1782 network_thread_->Invoke<void>(FROM_HERE, [this] {
1779 cricket::TransportChannel* transport_channel = 1783 cricket::TransportChannel* transport_channel =
1780 channel2_->transport_channel(); 1784 channel2_->transport_channel();
1781 transport_channel->SignalReadPacket( 1785 transport_channel->SignalReadPacket(
1782 transport_channel, reinterpret_cast<const char*>(kBadPacket), 1786 transport_channel, reinterpret_cast<const char*>(kBadPacket),
1783 sizeof(kBadPacket), rtc::PacketTime(), 0); 1787 sizeof(kBadPacket), rtc::PacketTime(), 0);
1784 }); 1788 });
1785 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_handler.error_); 1789 EXPECT_EQ(cricket::SrtpFilter::ERROR_FAIL, error_handler.error_);
1786 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, error_handler.mode_); 1790 EXPECT_EQ(cricket::SrtpFilter::UNPROTECT, error_handler.mode_);
1787 } 1791 }
1788 1792
1789 void TestOnReadyToSend() { 1793 void TestOnReadyToSend() {
1790 CreateChannels(RTCP, RTCP); 1794 CreateChannels(RTCP, RTCP);
1791 TransportChannel* rtp = channel1_->transport_channel(); 1795 TransportChannel* rtp = channel1_->transport_channel();
1792 TransportChannel* rtcp = channel1_->rtcp_transport_channel(); 1796 TransportChannel* rtcp = channel1_->rtcp_transport_channel();
1793 EXPECT_FALSE(media_channel1_->ready_to_send()); 1797 EXPECT_FALSE(media_channel1_->ready_to_send());
1794 1798
1795 network_thread_->Invoke<void>([rtp] { rtp->SignalReadyToSend(rtp); }); 1799 network_thread_->Invoke<void>(FROM_HERE,
1800 [rtp] { rtp->SignalReadyToSend(rtp); });
1796 WaitForThreads(); 1801 WaitForThreads();
1797 EXPECT_FALSE(media_channel1_->ready_to_send()); 1802 EXPECT_FALSE(media_channel1_->ready_to_send());
1798 1803
1799 network_thread_->Invoke<void>([rtcp] { rtcp->SignalReadyToSend(rtcp); }); 1804 network_thread_->Invoke<void>(FROM_HERE,
1805 [rtcp] { rtcp->SignalReadyToSend(rtcp); });
1800 WaitForThreads(); 1806 WaitForThreads();
1801 // MediaChannel::OnReadyToSend only be called when both rtp and rtcp 1807 // MediaChannel::OnReadyToSend only be called when both rtp and rtcp
1802 // channel are ready to send. 1808 // channel are ready to send.
1803 EXPECT_TRUE(media_channel1_->ready_to_send()); 1809 EXPECT_TRUE(media_channel1_->ready_to_send());
1804 1810
1805 // rtp channel becomes not ready to send will be propagated to mediachannel 1811 // rtp channel becomes not ready to send will be propagated to mediachannel
1806 network_thread_->Invoke<void>( 1812 network_thread_->Invoke<void>(
1807 [this] { channel1_->SetReadyToSend(false, false); }); 1813 FROM_HERE, [this] { channel1_->SetReadyToSend(false, false); });
1808 WaitForThreads(); 1814 WaitForThreads();
1809 EXPECT_FALSE(media_channel1_->ready_to_send()); 1815 EXPECT_FALSE(media_channel1_->ready_to_send());
1810 1816
1811 network_thread_->Invoke<void>( 1817 network_thread_->Invoke<void>(
1812 [this] { channel1_->SetReadyToSend(false, true); }); 1818 FROM_HERE, [this] { channel1_->SetReadyToSend(false, true); });
1813 WaitForThreads(); 1819 WaitForThreads();
1814 EXPECT_TRUE(media_channel1_->ready_to_send()); 1820 EXPECT_TRUE(media_channel1_->ready_to_send());
1815 1821
1816 // rtcp channel becomes not ready to send will be propagated to mediachannel 1822 // rtcp channel becomes not ready to send will be propagated to mediachannel
1817 network_thread_->Invoke<void>( 1823 network_thread_->Invoke<void>(
1818 [this] { channel1_->SetReadyToSend(true, false); }); 1824 FROM_HERE, [this] { channel1_->SetReadyToSend(true, false); });
1819 WaitForThreads(); 1825 WaitForThreads();
1820 EXPECT_FALSE(media_channel1_->ready_to_send()); 1826 EXPECT_FALSE(media_channel1_->ready_to_send());
1821 1827
1822 network_thread_->Invoke<void>( 1828 network_thread_->Invoke<void>(
1823 [this] { channel1_->SetReadyToSend(true, true); }); 1829 FROM_HERE, [this] { channel1_->SetReadyToSend(true, true); });
1824 WaitForThreads(); 1830 WaitForThreads();
1825 EXPECT_TRUE(media_channel1_->ready_to_send()); 1831 EXPECT_TRUE(media_channel1_->ready_to_send());
1826 } 1832 }
1827 1833
1828 void TestOnReadyToSendWithRtcpMux() { 1834 void TestOnReadyToSendWithRtcpMux() {
1829 CreateChannels(RTCP, RTCP); 1835 CreateChannels(RTCP, RTCP);
1830 typename T::Content content; 1836 typename T::Content content;
1831 CreateContent(0, kPcmuCodec, kH264Codec, &content); 1837 CreateContent(0, kPcmuCodec, kH264Codec, &content);
1832 // Both sides agree on mux. Should no longer be a separate RTCP channel. 1838 // Both sides agree on mux. Should no longer be a separate RTCP channel.
1833 content.set_rtcp_mux(true); 1839 content.set_rtcp_mux(true);
1834 EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL)); 1840 EXPECT_TRUE(channel1_->SetLocalContent(&content, CA_OFFER, NULL));
1835 EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL)); 1841 EXPECT_TRUE(channel1_->SetRemoteContent(&content, CA_ANSWER, NULL));
1836 EXPECT_TRUE(channel1_->rtcp_transport_channel() == NULL); 1842 EXPECT_TRUE(channel1_->rtcp_transport_channel() == NULL);
1837 TransportChannel* rtp = channel1_->transport_channel(); 1843 TransportChannel* rtp = channel1_->transport_channel();
1838 EXPECT_FALSE(media_channel1_->ready_to_send()); 1844 EXPECT_FALSE(media_channel1_->ready_to_send());
1839 // In the case of rtcp mux, the SignalReadyToSend() from rtp channel 1845 // In the case of rtcp mux, the SignalReadyToSend() from rtp channel
1840 // should trigger the MediaChannel's OnReadyToSend. 1846 // should trigger the MediaChannel's OnReadyToSend.
1841 network_thread_->Invoke<void>([rtp] { rtp->SignalReadyToSend(rtp); }); 1847 network_thread_->Invoke<void>(FROM_HERE,
1848 [rtp] { rtp->SignalReadyToSend(rtp); });
1842 WaitForThreads(); 1849 WaitForThreads();
1843 EXPECT_TRUE(media_channel1_->ready_to_send()); 1850 EXPECT_TRUE(media_channel1_->ready_to_send());
1844 1851
1845 network_thread_->Invoke<void>( 1852 network_thread_->Invoke<void>(
1846 [this] { channel1_->SetReadyToSend(false, false); }); 1853 FROM_HERE, [this] { channel1_->SetReadyToSend(false, false); });
1847 WaitForThreads(); 1854 WaitForThreads();
1848 EXPECT_FALSE(media_channel1_->ready_to_send()); 1855 EXPECT_FALSE(media_channel1_->ready_to_send());
1849 } 1856 }
1850 1857
1851 bool SetRemoteContentWithBitrateLimit(int remote_limit) { 1858 bool SetRemoteContentWithBitrateLimit(int remote_limit) {
1852 typename T::Content content; 1859 typename T::Content content;
1853 CreateContent(0, kPcmuCodec, kH264Codec, &content); 1860 CreateContent(0, kPcmuCodec, kH264Codec, &content);
1854 content.set_bandwidth(remote_limit); 1861 content.set_bandwidth(remote_limit);
1855 return channel1_->SetRemoteContent(&content, CA_OFFER, NULL); 1862 return channel1_->SetRemoteContent(&content, CA_OFFER, NULL);
1856 } 1863 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 void WaitForThreads() { WaitForThreads(rtc::ArrayView<rtc::Thread*>()); } 1906 void WaitForThreads() { WaitForThreads(rtc::ArrayView<rtc::Thread*>()); }
1900 static void ProcessThreadQueue(rtc::Thread* thread) { 1907 static void ProcessThreadQueue(rtc::Thread* thread) {
1901 RTC_DCHECK(thread->IsCurrent()); 1908 RTC_DCHECK(thread->IsCurrent());
1902 while (!thread->empty()) { 1909 while (!thread->empty()) {
1903 thread->ProcessMessages(0); 1910 thread->ProcessMessages(0);
1904 } 1911 }
1905 } 1912 }
1906 void WaitForThreads(rtc::ArrayView<rtc::Thread*> threads) { 1913 void WaitForThreads(rtc::ArrayView<rtc::Thread*> threads) {
1907 // |threads| and current thread post packets to network thread. 1914 // |threads| and current thread post packets to network thread.
1908 for (rtc::Thread* thread : threads) { 1915 for (rtc::Thread* thread : threads) {
1909 thread->Invoke<void>([thread] { ProcessThreadQueue(thread); }); 1916 thread->Invoke<void>(FROM_HERE, [thread] { ProcessThreadQueue(thread); });
1910 } 1917 }
1911 ProcessThreadQueue(rtc::Thread::Current()); 1918 ProcessThreadQueue(rtc::Thread::Current());
1912 // Network thread move them around and post back to worker = current thread. 1919 // Network thread move them around and post back to worker = current thread.
1913 if (!network_thread_->IsCurrent()) { 1920 if (!network_thread_->IsCurrent()) {
1914 network_thread_->Invoke<void>( 1921 network_thread_->Invoke<void>(
1915 [this] { ProcessThreadQueue(network_thread_); }); 1922 FROM_HERE, [this] { ProcessThreadQueue(network_thread_); });
1916 } 1923 }
1917 // Worker thread = current Thread process received messages. 1924 // Worker thread = current Thread process received messages.
1918 ProcessThreadQueue(rtc::Thread::Current()); 1925 ProcessThreadQueue(rtc::Thread::Current());
1919 } 1926 }
1920 // TODO(pbos): Remove playout from all media channels and let renderers mute 1927 // TODO(pbos): Remove playout from all media channels and let renderers mute
1921 // themselves. 1928 // themselves.
1922 const bool verify_playout_; 1929 const bool verify_playout_;
1923 std::unique_ptr<rtc::Thread> network_thread_keeper_; 1930 std::unique_ptr<rtc::Thread> network_thread_keeper_;
1924 rtc::Thread* network_thread_; 1931 rtc::Thread* network_thread_;
1925 std::unique_ptr<cricket::FakeTransportController> transport_controller1_; 1932 std::unique_ptr<cricket::FakeTransportController> transport_controller1_;
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
3549 }; 3556 };
3550 rtc::CopyOnWriteBuffer payload(data, 3); 3557 rtc::CopyOnWriteBuffer payload(data, 3);
3551 cricket::SendDataResult result; 3558 cricket::SendDataResult result;
3552 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); 3559 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result));
3553 EXPECT_EQ(params.ssrc, 3560 EXPECT_EQ(params.ssrc,
3554 media_channel1_->last_sent_data_params().ssrc); 3561 media_channel1_->last_sent_data_params().ssrc);
3555 EXPECT_EQ("foo", media_channel1_->last_sent_data()); 3562 EXPECT_EQ("foo", media_channel1_->last_sent_data());
3556 } 3563 }
3557 3564
3558 // TODO(pthatcher): TestSetReceiver? 3565 // TODO(pthatcher): TestSetReceiver?
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698