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

Side by Side Diff: remoting/protocol/rtp_video_writer.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
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_writer.h" 5 #include "remoting/protocol/rtp_video_writer.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 "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "remoting/base/compound_buffer.h" 10 #include "remoting/base/compound_buffer.h"
(...skipping 26 matching lines...) Expand all
37 session->CreateDatagramChannel( 37 session->CreateDatagramChannel(
38 kVideoRtpChannelName, 38 kVideoRtpChannelName,
39 base::Bind(&RtpVideoWriter::OnChannelReady, 39 base::Bind(&RtpVideoWriter::OnChannelReady,
40 base::Unretained(this), true)); 40 base::Unretained(this), true));
41 session->CreateDatagramChannel( 41 session->CreateDatagramChannel(
42 kVideoRtcpChannelName, 42 kVideoRtcpChannelName,
43 base::Bind(&RtpVideoWriter::OnChannelReady, 43 base::Bind(&RtpVideoWriter::OnChannelReady,
44 base::Unretained(this), false)); 44 base::Unretained(this), false));
45 } 45 }
46 46
47 bool RtpVideoWriter::is_connected() {
48 return rtp_channel_.get() && rtcp_channel_.get();
49 }
50
47 void RtpVideoWriter::OnChannelReady(bool rtp, net::Socket* socket) { 51 void RtpVideoWriter::OnChannelReady(bool rtp, net::Socket* socket) {
48 if (!socket) { 52 if (!socket) {
49 if (!initialized_) { 53 if (!initialized_) {
50 initialized_ = true; 54 initialized_ = true;
51 initialized_callback_.Run(false); 55 initialized_callback_.Run(false);
52 } 56 }
53 return; 57 return;
54 } 58 }
55 59
56 if (rtp) { 60 if (rtp) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 142
139 done.Run(); 143 done.Run();
140 } 144 }
141 145
142 int RtpVideoWriter::GetPendingPackets() { 146 int RtpVideoWriter::GetPendingPackets() {
143 return rtp_writer_.GetPendingPackets(); 147 return rtp_writer_.GetPendingPackets();
144 } 148 }
145 149
146 } // namespace protocol 150 } // namespace protocol
147 } // namespace remoting 151 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698