| Index: remoting/protocol/webrtc_video_capturer_adapter.cc
|
| diff --git a/remoting/protocol/webrtc_video_capturer_adapter.cc b/remoting/protocol/webrtc_video_capturer_adapter.cc
|
| index fcf7972ca44e40dc828080a2a69146866156b2bb..f40ff9505fd6a38978288f1604e1ee42931542a6 100644
|
| --- a/remoting/protocol/webrtc_video_capturer_adapter.cc
|
| +++ b/remoting/protocol/webrtc_video_capturer_adapter.cc
|
| @@ -29,6 +29,12 @@ WebrtcVideoCapturerAdapter::~WebrtcVideoCapturerAdapter() {
|
| DCHECK(!capture_timer_);
|
| }
|
|
|
| +void WebrtcVideoCapturerAdapter::SetSizeCallback(
|
| + const SizeCallback& size_callback) {
|
| + DCHECK(thread_checker_.CalledOnValidThread());
|
| + size_callback_ = size_callback;
|
| +}
|
| +
|
| bool WebrtcVideoCapturerAdapter::GetBestCaptureFormat(
|
| const cricket::VideoFormat& desired,
|
| cricket::VideoFormat* best_format) {
|
| @@ -160,6 +166,9 @@ void WebrtcVideoCapturerAdapter::OnCaptureCompleted(
|
| size_t height = frame->size().height();
|
| if (!yuv_frame_ || yuv_frame_->GetWidth() != width ||
|
| yuv_frame_->GetHeight() != height) {
|
| + if (!size_callback_.is_null())
|
| + size_callback_.Run(frame->size());
|
| +
|
| scoped_ptr<cricket::WebRtcVideoFrame> webrtc_frame(
|
| new cricket::WebRtcVideoFrame());
|
| webrtc_frame->InitToEmptyBuffer(width, height, 1, 1, 0);
|
|
|