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

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

Issue 2329653002: Add WebrtcVideoEncoder interface (Closed)
Patch Set: win Created 4 years, 3 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_connection_to_client.h" 5 #include "remoting/protocol/webrtc_connection_to_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 session_->Close(error); 72 session_->Close(error);
73 } 73 }
74 74
75 void WebrtcConnectionToClient::OnInputEventReceived(int64_t timestamp) { 75 void WebrtcConnectionToClient::OnInputEventReceived(int64_t timestamp) {
76 DCHECK(thread_checker_.CalledOnValidThread()); 76 DCHECK(thread_checker_.CalledOnValidThread());
77 event_handler_->OnInputEventReceived(this, timestamp); 77 event_handler_->OnInputEventReceived(this, timestamp);
78 } 78 }
79 79
80 std::unique_ptr<VideoStream> WebrtcConnectionToClient::StartVideoStream( 80 std::unique_ptr<VideoStream> WebrtcConnectionToClient::StartVideoStream(
81 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) { 81 std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) {
82 // TODO(isheriff): make this codec independent
83 std::unique_ptr<VideoEncoder> video_encoder =
84 WebrtcVideoEncoderVpx::CreateForVP8();
85 std::unique_ptr<WebrtcVideoStream> stream(new WebrtcVideoStream()); 82 std::unique_ptr<WebrtcVideoStream> stream(new WebrtcVideoStream());
86 if (!stream->Start(std::move(desktop_capturer), transport_.get(), 83 if (!stream->Start(std::move(desktop_capturer), transport_.get(),
87 video_encode_task_runner_, std::move(video_encoder))) { 84 video_encode_task_runner_)) {
88 return nullptr; 85 return nullptr;
89 } 86 }
90 return std::move(stream); 87 return std::move(stream);
91 } 88 }
92 89
93 std::unique_ptr<AudioStream> WebrtcConnectionToClient::StartAudioStream( 90 std::unique_ptr<AudioStream> WebrtcConnectionToClient::StartAudioStream(
94 std::unique_ptr<AudioSource> audio_source) { 91 std::unique_ptr<AudioSource> audio_source) {
95 NOTIMPLEMENTED(); 92 NOTIMPLEMENTED();
96 return nullptr; 93 return nullptr;
97 } 94 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 ChannelDispatcherBase* channel_dispatcher) { 203 ChannelDispatcherBase* channel_dispatcher) {
207 DCHECK(thread_checker_.CalledOnValidThread()); 204 DCHECK(thread_checker_.CalledOnValidThread());
208 205
209 LOG(ERROR) << "Channel " << channel_dispatcher->channel_name() 206 LOG(ERROR) << "Channel " << channel_dispatcher->channel_name()
210 << " was closed unexpectedly."; 207 << " was closed unexpectedly.";
211 Disconnect(INCOMPATIBLE_PROTOCOL); 208 Disconnect(INCOMPATIBLE_PROTOCOL);
212 } 209 }
213 210
214 } // namespace protocol 211 } // namespace protocol
215 } // namespace remoting 212 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/video_frame_pump_unittest.cc ('k') | remoting/protocol/webrtc_dummy_video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698