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

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

Issue 2113523007: More cleanups in FrameStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 4 years, 5 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
« no previous file with comments | « remoting/protocol/video_renderer.h ('k') | remoting/protocol/webrtc_video_renderer_adapter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_host.h" 5 #include "remoting/protocol/webrtc_connection_to_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "jingle/glue/thread_wrapper.h" 9 #include "jingle/glue/thread_wrapper.h"
10 #include "remoting/protocol/client_control_dispatcher.h" 10 #include "remoting/protocol/client_control_dispatcher.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 CloseChannels(); 117 CloseChannels();
118 SetState(FAILED, error); 118 SetState(FAILED, error);
119 } 119 }
120 120
121 void WebrtcConnectionToHost::OnWebrtcTransportMediaStreamAdded( 121 void WebrtcConnectionToHost::OnWebrtcTransportMediaStreamAdded(
122 scoped_refptr<webrtc::MediaStreamInterface> stream) { 122 scoped_refptr<webrtc::MediaStreamInterface> stream) {
123 if (video_adapter_) { 123 if (video_adapter_) {
124 LOG(WARNING) 124 LOG(WARNING)
125 << "Received multiple media streams. Ignoring all except the last one."; 125 << "Received multiple media streams. Ignoring all except the last one.";
126 } 126 }
127 video_adapter_.reset(new WebrtcVideoRendererAdapter( 127 video_adapter_.reset(new WebrtcVideoRendererAdapter(stream, video_renderer_));
128 stream, video_renderer_->GetFrameConsumer()));
129 } 128 }
130 129
131 void WebrtcConnectionToHost::OnWebrtcTransportMediaStreamRemoved( 130 void WebrtcConnectionToHost::OnWebrtcTransportMediaStreamRemoved(
132 scoped_refptr<webrtc::MediaStreamInterface> stream) { 131 scoped_refptr<webrtc::MediaStreamInterface> stream) {
133 if (video_adapter_ && video_adapter_->label() == stream->label()) 132 if (video_adapter_ && video_adapter_->label() == stream->label())
134 video_adapter_.reset(); 133 video_adapter_.reset();
135 } 134 }
136 135
137 void WebrtcConnectionToHost::OnChannelInitialized( 136 void WebrtcConnectionToHost::OnChannelInitialized(
138 ChannelDispatcherBase* channel_dispatcher) { 137 ChannelDispatcherBase* channel_dispatcher) {
(...skipping 29 matching lines...) Expand all
168 167
169 if (state != state_) { 168 if (state != state_) {
170 state_ = state; 169 state_ = state;
171 error_ = error; 170 error_ = error;
172 event_callback_->OnConnectionState(state_, error_); 171 event_callback_->OnConnectionState(state_, error_);
173 } 172 }
174 } 173 }
175 174
176 } // namespace protocol 175 } // namespace protocol
177 } // namespace remoting 176 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/video_renderer.h ('k') | remoting/protocol/webrtc_video_renderer_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698