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

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
« no previous file with comments | « remoting/protocol/rtp_video_writer.h ('k') | remoting/protocol/session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dce34fc09635bb6d6a226770eeb4828bb12a77d7 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,11 @@ void RtpVideoWriter::Close() {
rtp_writer_.Close();
rtp_channel_.reset();
rtcp_channel_.reset();
+ if (session_) {
+ session_->CancelChannelCreation(kVideoRtpChannelName);
+ session_->CancelChannelCreation(kVideoRtcpChannelName);
+ session_ = NULL;
+ }
}
void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet,
« no previous file with comments | « remoting/protocol/rtp_video_writer.h ('k') | remoting/protocol/session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698