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

Side by Side Diff: remoting/protocol/rtp_video_writer.cc

Issue 7633009: Use MessageLoopProxy for network message loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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"
11 #include "remoting/base/constants.h" 11 #include "remoting/base/constants.h"
12 #include "remoting/proto/video.pb.h" 12 #include "remoting/proto/video.pb.h"
13 #include "remoting/protocol/rtp_writer.h" 13 #include "remoting/protocol/rtp_writer.h"
14 #include "remoting/protocol/session.h" 14 #include "remoting/protocol/session.h"
15 15
16 namespace remoting { 16 namespace remoting {
17 namespace protocol { 17 namespace protocol {
18 18
19 namespace { 19 namespace {
20 const int kMtu = 1200; 20 const int kMtu = 1200;
21 } // namespace 21 } // namespace
22 22
23 RtpVideoWriter::RtpVideoWriter() 23 RtpVideoWriter::RtpVideoWriter(base::MessageLoopProxy* message_loop)
24 : initialized_(false) { 24 : initialized_(false),
25 rtp_writer_(message_loop) {
25 } 26 }
26 27
27 RtpVideoWriter::~RtpVideoWriter() { 28 RtpVideoWriter::~RtpVideoWriter() {
28 Close(); 29 Close();
29 } 30 }
30 31
31 void RtpVideoWriter::Init(protocol::Session* session, 32 void RtpVideoWriter::Init(protocol::Session* session,
32 const InitializedCallback& callback) { 33 const InitializedCallback& callback) {
33 initialized_callback_ = callback; 34 initialized_callback_ = callback;
34 session->CreateDatagramChannel( 35 session->CreateDatagramChannel(
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 done->Run(); 131 done->Run();
131 delete done; 132 delete done;
132 } 133 }
133 134
134 int RtpVideoWriter::GetPendingPackets() { 135 int RtpVideoWriter::GetPendingPackets() {
135 return rtp_writer_.GetPendingPackets(); 136 return rtp_writer_.GetPendingPackets();
136 } 137 }
137 138
138 } // namespace protocol 139 } // namespace protocol
139 } // namespace remoting 140 } // namespace remoting
OLDNEW
« 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