| 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 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 int GetLastHeight() const; | 120 int GetLastHeight() const; |
| 121 int64_t GetLastTimestamp() const; | 121 int64_t GetLastTimestamp() const; |
| 122 void SetStats(const webrtc::VideoSendStream::Stats& stats); | 122 void SetStats(const webrtc::VideoSendStream::Stats& stats); |
| 123 int num_encoder_reconfigurations() const { | 123 int num_encoder_reconfigurations() const { |
| 124 return num_encoder_reconfigurations_; | 124 return num_encoder_reconfigurations_; |
| 125 } | 125 } |
| 126 | 126 |
| 127 void EnableEncodedFrameRecording(const std::vector<rtc::PlatformFile>& files, | 127 void EnableEncodedFrameRecording(const std::vector<rtc::PlatformFile>& files, |
| 128 size_t byte_limit) override; | 128 size_t byte_limit) override; |
| 129 | 129 |
| 130 bool resolution_scaling_disabled() { return resolution_scaling_disabled_; } |
| 131 void InjectVideoSinkWants(const rtc::VideoSinkWants& wants); |
| 132 |
| 133 rtc::VideoSourceInterface<webrtc::VideoFrame>* source() { return source_; } |
| 134 |
| 130 private: | 135 private: |
| 131 // rtc::VideoSinkInterface<VideoFrame> implementation. | 136 // rtc::VideoSinkInterface<VideoFrame> implementation. |
| 132 void OnFrame(const webrtc::VideoFrame& frame) override; | 137 void OnFrame(const webrtc::VideoFrame& frame) override; |
| 133 | 138 |
| 134 // webrtc::VideoSendStream implementation. | 139 // webrtc::VideoSendStream implementation. |
| 135 void Start() override; | 140 void Start() override; |
| 136 void Stop() override; | 141 void Stop() override; |
| 137 void SetSource( | 142 void SetSource(rtc::VideoSourceInterface<webrtc::VideoFrame>* source, |
| 138 rtc::VideoSourceInterface<webrtc::VideoFrame>* source) override; | 143 bool disable_resolution_scaling) override; |
| 139 webrtc::VideoSendStream::Stats GetStats() override; | 144 webrtc::VideoSendStream::Stats GetStats() override; |
| 140 void ReconfigureVideoEncoder(webrtc::VideoEncoderConfig config) override; | 145 void ReconfigureVideoEncoder(webrtc::VideoEncoderConfig config) override; |
| 141 | 146 |
| 142 bool sending_; | 147 bool sending_; |
| 143 webrtc::VideoSendStream::Config config_; | 148 webrtc::VideoSendStream::Config config_; |
| 144 webrtc::VideoEncoderConfig encoder_config_; | 149 webrtc::VideoEncoderConfig encoder_config_; |
| 145 std::vector<webrtc::VideoStream> video_streams_; | 150 std::vector<webrtc::VideoStream> video_streams_; |
| 151 rtc::VideoSinkWants sink_wants_; |
| 152 |
| 146 bool codec_settings_set_; | 153 bool codec_settings_set_; |
| 147 union VpxSettings { | 154 union VpxSettings { |
| 148 webrtc::VideoCodecVP8 vp8; | 155 webrtc::VideoCodecVP8 vp8; |
| 149 webrtc::VideoCodecVP9 vp9; | 156 webrtc::VideoCodecVP9 vp9; |
| 150 } vpx_settings_; | 157 } vpx_settings_; |
| 158 bool resolution_scaling_disabled_; |
| 151 rtc::VideoSourceInterface<webrtc::VideoFrame>* source_; | 159 rtc::VideoSourceInterface<webrtc::VideoFrame>* source_; |
| 152 int num_swapped_frames_; | 160 int num_swapped_frames_; |
| 153 webrtc::VideoFrame last_frame_; | 161 webrtc::VideoFrame last_frame_; |
| 154 webrtc::VideoSendStream::Stats stats_; | 162 webrtc::VideoSendStream::Stats stats_; |
| 155 int num_encoder_reconfigurations_ = 0; | 163 int num_encoder_reconfigurations_ = 0; |
| 156 }; | 164 }; |
| 157 | 165 |
| 158 class FakeVideoReceiveStream final : public webrtc::VideoReceiveStream { | 166 class FakeVideoReceiveStream final : public webrtc::VideoReceiveStream { |
| 159 public: | 167 public: |
| 160 explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config); | 168 explicit FakeVideoReceiveStream(webrtc::VideoReceiveStream::Config config); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 std::vector<FakeAudioSendStream*> audio_send_streams_; | 267 std::vector<FakeAudioSendStream*> audio_send_streams_; |
| 260 std::vector<FakeVideoReceiveStream*> video_receive_streams_; | 268 std::vector<FakeVideoReceiveStream*> video_receive_streams_; |
| 261 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; | 269 std::vector<FakeAudioReceiveStream*> audio_receive_streams_; |
| 262 | 270 |
| 263 int num_created_send_streams_; | 271 int num_created_send_streams_; |
| 264 int num_created_receive_streams_; | 272 int num_created_receive_streams_; |
| 265 }; | 273 }; |
| 266 | 274 |
| 267 } // namespace cricket | 275 } // namespace cricket |
| 268 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ | 276 #endif // WEBRTC_MEDIA_ENGINE_FAKEWEBRTCCALL_H_ |
| OLD | NEW |