Index: webrtc/video/video_send_stream.cc |
diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc |
index 9e38384381f8d76ac15ef4b0d3b8e59457f82ae3..e87f56f383edbb3bddb2c4bb4e5a3860fdeff2a5 100644 |
--- a/webrtc/video/video_send_stream.cc |
+++ b/webrtc/video/video_send_stream.cc |
@@ -376,9 +376,7 @@ VideoSendStream::VideoSendStream( |
config_.rtp.ssrcs, |
module_process_thread_, |
&stats_proxy_, |
- config.pre_encode_callback, |
- &overuse_detector_, |
- congestion_controller_->pacer()), |
+ &overuse_detector_), |
video_sender_(vie_encoder_.video_sender()), |
bandwidth_observer_(congestion_controller_->GetBitrateController() |
->CreateRtcpBandwidthObserver()), |
@@ -578,8 +576,14 @@ void VideoSendStream::EncoderProcess() { |
} |
VideoFrame frame; |
- if (input_.GetVideoFrame(&frame)) |
+ if (input_.GetVideoFrame(&frame)) { |
+ // TODO(perkj): |pre_encode_callback| is only used by tests. Tests should |
+ // register as a sink to the VideoSource instead. |
+ if (config_.pre_encode_callback) { |
+ config_.pre_encode_callback->OnFrame(frame); |
+ } |
vie_encoder_.EncodeVideoFrame(frame); |
+ } |
} |
vie_encoder_.DeRegisterExternalEncoder(config_.encoder_settings.payload_type); |
} |