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

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

Issue 8587053: Remove event_channel() and control_channel() from Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/rtp_video_reader.h ('k') | remoting/protocol/rtp_video_writer.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/rtp_video_reader.h" 5 #include "remoting/protocol/rtp_video_reader.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/proto/video.pb.h" 10 #include "remoting/proto/video.pb.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 session_->CreateDatagramChannel( 49 session_->CreateDatagramChannel(
50 kVideoRtpChannelName, 50 kVideoRtpChannelName,
51 base::Bind(&RtpVideoReader::OnChannelReady, 51 base::Bind(&RtpVideoReader::OnChannelReady,
52 base::Unretained(this), true)); 52 base::Unretained(this), true));
53 session_->CreateDatagramChannel( 53 session_->CreateDatagramChannel(
54 kVideoRtcpChannelName, 54 kVideoRtcpChannelName,
55 base::Bind(&RtpVideoReader::OnChannelReady, 55 base::Bind(&RtpVideoReader::OnChannelReady,
56 base::Unretained(this), false)); 56 base::Unretained(this), false));
57 } 57 }
58 58
59 bool RtpVideoReader::is_connected() {
60 return rtp_channel_.get() && rtcp_channel_.get();
61 }
62
59 void RtpVideoReader::OnChannelReady(bool rtp, net::Socket* socket) { 63 void RtpVideoReader::OnChannelReady(bool rtp, net::Socket* socket) {
60 if (!socket) { 64 if (!socket) {
61 if (!initialized_) { 65 if (!initialized_) {
62 initialized_ = true; 66 initialized_ = true;
63 initialized_callback_.Run(false); 67 initialized_callback_.Run(false);
64 } 68 }
65 return; 69 return;
66 } 70 }
67 71
68 if (rtp) { 72 if (rtp) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 RtcpReceiverReport report; 232 RtcpReceiverReport report;
229 rtp_reader_.GetReceiverReport(&report); 233 rtp_reader_.GetReceiverReport(&report);
230 rtcp_writer_.SendReport(report); 234 rtcp_writer_.SendReport(report);
231 235
232 last_receiver_report_ = now; 236 last_receiver_report_ = now;
233 } 237 }
234 } 238 }
235 239
236 } // namespace protocol 240 } // namespace protocol
237 } // namespace remoting 241 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/rtp_video_reader.h ('k') | remoting/protocol/rtp_video_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698