| OLD | NEW | 
|     1 /* |     1 /* | 
|     2  *  Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |     2  *  Copyright (c) 2015 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 "webrtc/video/video_quality_test.h" |    10 #include "webrtc/video/video_quality_test.h" | 
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   932       copy.set_timestamp(copy.ntp_time_ms() * 90); |   932       copy.set_timestamp(copy.ntp_time_ms() * 90); | 
|   933       analyzer_->AddCapturedFrameForComparison(copy); |   933       analyzer_->AddCapturedFrameForComparison(copy); | 
|   934       rtc::CritScope lock(&crit_); |   934       rtc::CritScope lock(&crit_); | 
|   935       if (send_stream_input_) |   935       if (send_stream_input_) | 
|   936         send_stream_input_->OnFrame(copy); |   936         send_stream_input_->OnFrame(copy); | 
|   937     } |   937     } | 
|   938  |   938  | 
|   939     // Called when |send_stream_.SetSource()| is called. |   939     // Called when |send_stream_.SetSource()| is called. | 
|   940     void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |   940     void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, | 
|   941                          const rtc::VideoSinkWants& wants) override { |   941                          const rtc::VideoSinkWants& wants) override { | 
|   942       rtc::CritScope lock(&crit_); |   942       { | 
|   943       RTC_DCHECK(!send_stream_input_ || send_stream_input_ == sink); |   943         rtc::CritScope lock(&crit_); | 
|   944       send_stream_input_ = sink; |   944         RTC_DCHECK(!send_stream_input_ || send_stream_input_ == sink); | 
 |   945         send_stream_input_ = sink; | 
 |   946       } | 
|   945       if (video_capturer_) { |   947       if (video_capturer_) { | 
|   946         video_capturer_->AddOrUpdateSink(this, wants); |   948         video_capturer_->AddOrUpdateSink(this, wants); | 
|   947       } |   949       } | 
|   948     } |   950     } | 
|   949  |   951  | 
|   950     // Called by |send_stream_| when |send_stream_.SetSource()| is called. |   952     // Called by |send_stream_| when |send_stream_.SetSource()| is called. | 
|   951     void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override { |   953     void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override { | 
|   952       rtc::CritScope lock(&crit_); |   954       rtc::CritScope lock(&crit_); | 
|   953       RTC_DCHECK(sink == send_stream_input_); |   955       RTC_DCHECK(sink == send_stream_input_); | 
|   954       send_stream_input_ = nullptr; |   956       send_stream_input_ = nullptr; | 
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2010   if (!params_.video.encoded_frame_base_path.empty()) { |  2012   if (!params_.video.encoded_frame_base_path.empty()) { | 
|  2011     std::ostringstream str; |  2013     std::ostringstream str; | 
|  2012     str << receive_logs_++; |  2014     str << receive_logs_++; | 
|  2013     std::string path = |  2015     std::string path = | 
|  2014         params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; |  2016         params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; | 
|  2015     stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), |  2017     stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), | 
|  2016                                         10000000); |  2018                                         10000000); | 
|  2017   } |  2019   } | 
|  2018 } |  2020 } | 
|  2019 }  // namespace webrtc |  2021 }  // namespace webrtc | 
| OLD | NEW |