| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |    2  *  Copyright (c) 2013 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 <functional> |   10 #include <functional> | 
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   96 static const int kASTExtensionId = 5; |   96 static const int kASTExtensionId = 5; | 
|   97  |   97  | 
|   98 class BitrateEstimatorTest : public test::CallTest { |   98 class BitrateEstimatorTest : public test::CallTest { | 
|   99  public: |   99  public: | 
|  100   BitrateEstimatorTest() : receive_config_(nullptr) {} |  100   BitrateEstimatorTest() : receive_config_(nullptr) {} | 
|  101  |  101  | 
|  102   virtual ~BitrateEstimatorTest() { EXPECT_TRUE(streams_.empty()); } |  102   virtual ~BitrateEstimatorTest() { EXPECT_TRUE(streams_.empty()); } | 
|  103  |  103  | 
|  104   virtual void SetUp() { |  104   virtual void SetUp() { | 
|  105     Call::Config config(event_log_.get()); |  105     Call::Config config(event_log_.get()); | 
|  106     receiver_call_.reset(Call::Create(config)); |  106     CreateReceiverCall(config); | 
|  107     sender_call_.reset(Call::Create(config)); |  107     CreateSenderCall(config); | 
|  108  |  108  | 
|  109     send_transport_.reset( |  109     send_transport_.reset( | 
|  110         new test::DirectTransport(sender_call_.get(), payload_type_map_)); |  110         new test::DirectTransport(sender_call_.get(), payload_type_map_)); | 
|  111     send_transport_->SetReceiver(receiver_call_->Receiver()); |  111     send_transport_->SetReceiver(receiver_call_->Receiver()); | 
|  112     receive_transport_.reset( |  112     receive_transport_.reset( | 
|  113         new test::DirectTransport(receiver_call_.get(), payload_type_map_)); |  113         new test::DirectTransport(receiver_call_.get(), payload_type_map_)); | 
|  114     receive_transport_->SetReceiver(sender_call_->Receiver()); |  114     receive_transport_->SetReceiver(sender_call_->Receiver()); | 
|  115  |  115  | 
|  116     video_send_config_ = VideoSendStream::Config(send_transport_.get()); |  116     video_send_config_ = VideoSendStream::Config(send_transport_.get()); | 
|  117     video_send_config_.rtp.ssrcs.push_back(kVideoSendSsrcs[0]); |  117     video_send_config_.rtp.ssrcs.push_back(kVideoSendSsrcs[0]); | 
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  222     VideoSendStream* send_stream_; |  222     VideoSendStream* send_stream_; | 
|  223     VideoReceiveStream* video_receive_stream_; |  223     VideoReceiveStream* video_receive_stream_; | 
|  224     std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_; |  224     std::unique_ptr<test::FrameGeneratorCapturer> frame_generator_capturer_; | 
|  225     test::FakeEncoder fake_encoder_; |  225     test::FakeEncoder fake_encoder_; | 
|  226     test::FakeDecoder fake_decoder_; |  226     test::FakeDecoder fake_decoder_; | 
|  227   }; |  227   }; | 
|  228  |  228  | 
|  229   LogObserver receiver_log_; |  229   LogObserver receiver_log_; | 
|  230   std::unique_ptr<test::DirectTransport> send_transport_; |  230   std::unique_ptr<test::DirectTransport> send_transport_; | 
|  231   std::unique_ptr<test::DirectTransport> receive_transport_; |  231   std::unique_ptr<test::DirectTransport> receive_transport_; | 
|  232   std::unique_ptr<Call> sender_call_; |  | 
|  233   std::unique_ptr<Call> receiver_call_; |  | 
|  234   VideoReceiveStream::Config receive_config_; |  232   VideoReceiveStream::Config receive_config_; | 
|  235   std::vector<Stream*> streams_; |  233   std::vector<Stream*> streams_; | 
|  236 }; |  234 }; | 
|  237  |  235  | 
|  238 static const char* kAbsSendTimeLog = |  236 static const char* kAbsSendTimeLog = | 
|  239     "RemoteBitrateEstimatorAbsSendTime: Instantiating."; |  237     "RemoteBitrateEstimatorAbsSendTime: Instantiating."; | 
|  240 static const char* kSingleStreamLog = |  238 static const char* kSingleStreamLog = | 
|  241     "RemoteBitrateEstimatorSingleStream: Instantiating."; |  239     "RemoteBitrateEstimatorSingleStream: Instantiating."; | 
|  242  |  240  | 
|  243 TEST_F(BitrateEstimatorTest, InstantiatesTOFPerDefaultForVideo) { |  241 TEST_F(BitrateEstimatorTest, InstantiatesTOFPerDefaultForVideo) { | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  297       RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId); |  295       RtpExtension(RtpExtension::kTimestampOffsetUri, kTOFExtensionId); | 
|  298   receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); |  296   receiver_log_.PushExpectedLogLine(kAbsSendTimeLog); | 
|  299   receiver_log_.PushExpectedLogLine( |  297   receiver_log_.PushExpectedLogLine( | 
|  300       "WrappingBitrateEstimator: Switching to transmission time offset RBE."); |  298       "WrappingBitrateEstimator: Switching to transmission time offset RBE."); | 
|  301   streams_.push_back(new Stream(this)); |  299   streams_.push_back(new Stream(this)); | 
|  302   streams_[0]->StopSending(); |  300   streams_[0]->StopSending(); | 
|  303   streams_[1]->StopSending(); |  301   streams_[1]->StopSending(); | 
|  304   EXPECT_TRUE(receiver_log_.Wait()); |  302   EXPECT_TRUE(receiver_log_.Wait()); | 
|  305 } |  303 } | 
|  306 }  // namespace webrtc |  304 }  // namespace webrtc | 
| OLD | NEW |