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

Unified Diff: remoting/protocol/rtp_video_writer.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
Index: remoting/protocol/rtp_video_writer.cc
diff --git a/remoting/protocol/rtp_video_writer.cc b/remoting/protocol/rtp_video_writer.cc
index c188d660daaa799388b1bccd4b1f666b8730f6b1..3df1ada3ec52e9528db345903307a2c99e59d6dc 100644
--- a/remoting/protocol/rtp_video_writer.cc
+++ b/remoting/protocol/rtp_video_writer.cc
@@ -21,7 +21,8 @@ const int kMtu = 1200;
} // namespace
RtpVideoWriter::RtpVideoWriter(base::MessageLoopProxy* message_loop)
- : initialized_(false),
+ : session_(NULL),
+ initialized_(false),
rtp_writer_(message_loop) {
}
@@ -31,6 +32,7 @@ RtpVideoWriter::~RtpVideoWriter() {
void RtpVideoWriter::Init(protocol::Session* session,
const InitializedCallback& callback) {
+ session_ = session;
initialized_callback_ = callback;
session->CreateDatagramChannel(
kVideoRtpChannelName,
@@ -72,6 +74,10 @@ void RtpVideoWriter::Close() {
rtp_writer_.Close();
rtp_channel_.reset();
rtcp_channel_.reset();
+ if (session_) {
+ session_->CancelChannelCreation(kVideoRtpChannelName);
+ session_->CancelChannelCreation(kVideoRtcpChannelName);
+ }
Wez 2011/11/15 22:29:13 Shouldn't this also clear |session_|? Can we just
Sergey Ulanov 2011/11/16 00:01:33 Done.
}
void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet,

Powered by Google App Engine
This is Rietveld 408576698