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

Unified Diff: remoting/protocol/rtp_video_writer.cc

Issue 9827006: Refactor VideoStub interface to accept ownership of video packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months 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/rtp_video_writer_unittest.cc » ('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 ad8cc82afc2ee6d28cdca56073da85579d865f64..5534a46d3af57d690bfc13d8fd5ce15bdb63621d 100644
--- a/remoting/protocol/rtp_video_writer.cc
+++ b/remoting/protocol/rtp_video_writer.cc
@@ -85,7 +85,7 @@ bool RtpVideoWriter::is_connected() {
return rtp_channel_.get() && rtcp_channel_.get();
}
-void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet,
+void RtpVideoWriter::ProcessVideoPacket(const scoped_ptr<VideoPacket> packet,
const base::Closure& done) {
CHECK(packet->format().encoding() == VideoPacketFormat::ENCODING_VP8)
<< "Only VP8 is supported in RTP.";
@@ -140,7 +140,8 @@ void RtpVideoWriter::ProcessVideoPacket(const VideoPacket* packet,
}
DCHECK_EQ(position, payload.total_bytes());
- done.Run();
+ if (!done.is_null())
+ done.Run();
}
int RtpVideoWriter::GetPendingPackets() {
« no previous file with comments | « remoting/protocol/rtp_video_writer.h ('k') | remoting/protocol/rtp_video_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698