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

Unified Diff: remoting/protocol/rtp_video_reader.cc

Issue 8573013: Add CancelChannelCreation() in protocol::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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/rtp_video_reader.h ('k') | remoting/protocol/rtp_video_writer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/rtp_video_reader.cc
diff --git a/remoting/protocol/rtp_video_reader.cc b/remoting/protocol/rtp_video_reader.cc
index 91f608ac76ecf762344a194602096baa5fe42cb2..e5f9f8b9122efa1878dadb988b5d5da047ef9aa2 100644
--- a/remoting/protocol/rtp_video_reader.cc
+++ b/remoting/protocol/rtp_video_reader.cc
@@ -24,27 +24,33 @@ RtpVideoReader::PacketsQueueEntry::PacketsQueueEntry()
}
RtpVideoReader::RtpVideoReader(base::MessageLoopProxy* message_loop)
- : initialized_(false),
+ : session_(NULL),
+ initialized_(false),
rtcp_writer_(message_loop),
last_sequence_number_(0),
video_stub_(NULL) {
}
RtpVideoReader::~RtpVideoReader() {
+ if (session_) {
+ session_->CancelChannelCreation(kVideoRtpChannelName);
+ session_->CancelChannelCreation(kVideoRtcpChannelName);
+ }
ResetQueue();
}
void RtpVideoReader::Init(protocol::Session* session,
VideoStub* video_stub,
const InitializedCallback& callback) {
+ session_ = session;
initialized_callback_ = callback;
video_stub_ = video_stub;
- session->CreateDatagramChannel(
+ session_->CreateDatagramChannel(
kVideoRtpChannelName,
base::Bind(&RtpVideoReader::OnChannelReady,
base::Unretained(this), true));
- session->CreateDatagramChannel(
+ session_->CreateDatagramChannel(
kVideoRtcpChannelName,
base::Bind(&RtpVideoReader::OnChannelReady,
base::Unretained(this), false));
« 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