Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: remoting/protocol/webrtc_video_stream.cc

Issue 1580823003: Implement client-side video stream support for WebRTC-based protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@packet_options_rem
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "remoting/protocol/webrtc_video_stream.h" 5 #include "remoting/protocol/webrtc_video_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "remoting/protocol/webrtc_video_capturer_adapter.h" 8 #include "remoting/protocol/webrtc_video_capturer_adapter.h"
9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" 9 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
10 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h " 10 #include "third_party/libjingle/source/talk/app/webrtc/peerconnectioninterface.h "
(...skipping 23 matching lines...) Expand all
34 capturer_adapter_->SetSizeCallback(SizeCallback()); 34 capturer_adapter_->SetSizeCallback(SizeCallback());
35 } 35 }
36 36
37 bool WebrtcVideoStream::Start( 37 bool WebrtcVideoStream::Start(
38 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer, 38 scoped_ptr<webrtc::DesktopCapturer> desktop_capturer,
39 scoped_refptr<webrtc::PeerConnectionInterface> connection, 39 scoped_refptr<webrtc::PeerConnectionInterface> connection,
40 scoped_refptr<webrtc::PeerConnectionFactoryInterface> 40 scoped_refptr<webrtc::PeerConnectionFactoryInterface>
41 peer_connection_factory) { 41 peer_connection_factory) {
42 scoped_ptr<WebrtcVideoCapturerAdapter> capturer_adapter( 42 scoped_ptr<WebrtcVideoCapturerAdapter> capturer_adapter(
43 new WebrtcVideoCapturerAdapter(std::move(desktop_capturer))); 43 new WebrtcVideoCapturerAdapter(std::move(desktop_capturer)));
44 capturer_adapter_ = capturer_adapter_->GetWeakPtr(); 44 capturer_adapter_ = capturer_adapter->GetWeakPtr();
Jamie 2016/01/12 21:00:04 Unrelated bug-fix? If so, then please mention it i
Sergey Ulanov 2016/01/12 22:13:45 Moved it to https://codereview.chromium.org/157825
45 45
46 connection_ = connection; 46 connection_ = connection;
47 47
48 // Set video stream constraints. 48 // Set video stream constraints.
49 webrtc::FakeConstraints video_constraints; 49 webrtc::FakeConstraints video_constraints;
50 video_constraints.AddMandatory( 50 video_constraints.AddMandatory(
51 webrtc::MediaConstraintsInterface::kMinFrameRate, 5); 51 webrtc::MediaConstraintsInterface::kMinFrameRate, 5);
52 52
53 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track = 53 rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track =
54 peer_connection_factory->CreateVideoTrack( 54 peer_connection_factory->CreateVideoTrack(
(...skipping 29 matching lines...) Expand all
84 NOTIMPLEMENTED(); 84 NOTIMPLEMENTED();
85 } 85 }
86 86
87 void WebrtcVideoStream::SetSizeCallback(const SizeCallback& size_callback) { 87 void WebrtcVideoStream::SetSizeCallback(const SizeCallback& size_callback) {
88 if (capturer_adapter_) 88 if (capturer_adapter_)
89 capturer_adapter_->SetSizeCallback(size_callback); 89 capturer_adapter_->SetSizeCallback(size_callback);
90 } 90 }
91 91
92 } // namespace protocol 92 } // namespace protocol
93 } // namespace remoting 93 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698