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

Side by Side Diff: remoting/protocol/rtp_video_reader.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_reader.h ('k') | remoting/protocol/rtp_video_reader_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_reader.h" 5 #include "remoting/protocol/rtp_video_reader.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 "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/proto/video.pb.h" 10 #include "remoting/proto/video.pb.h"
11 #include "remoting/protocol/session.h" 11 #include "remoting/protocol/session.h"
12 12
13 namespace remoting { 13 namespace remoting {
14 namespace protocol { 14 namespace protocol {
15 15
16 namespace { 16 namespace {
17 const int kMaxPacketsInQueue = 1024; 17 const int kMaxPacketsInQueue = 1024;
18 const int kReceiverReportsIntervalMs = 1000; 18 const int kReceiverReportsIntervalMs = 1000;
19 } // namespace 19 } // namespace
20 20
21 RtpVideoReader::PacketsQueueEntry::PacketsQueueEntry() 21 RtpVideoReader::PacketsQueueEntry::PacketsQueueEntry()
22 : received(false), 22 : received(false),
23 packet(NULL) { 23 packet(NULL) {
24 } 24 }
25 25
26 RtpVideoReader::RtpVideoReader() 26 RtpVideoReader::RtpVideoReader(base::MessageLoopProxy* message_loop)
27 : initialized_(false), 27 : initialized_(false),
28 rtcp_writer_(message_loop),
28 last_sequence_number_(0), 29 last_sequence_number_(0),
29 video_stub_(NULL) { 30 video_stub_(NULL) {
30 } 31 }
31 32
32 RtpVideoReader::~RtpVideoReader() { 33 RtpVideoReader::~RtpVideoReader() {
33 ResetQueue(); 34 ResetQueue();
34 } 35 }
35 36
36 void RtpVideoReader::Init(protocol::Session* session, 37 void RtpVideoReader::Init(protocol::Session* session,
37 VideoStub* video_stub, 38 VideoStub* video_stub,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 RtcpReceiverReport report; 220 RtcpReceiverReport report;
220 rtp_reader_.GetReceiverReport(&report); 221 rtp_reader_.GetReceiverReport(&report);
221 rtcp_writer_.SendReport(report); 222 rtcp_writer_.SendReport(report);
222 223
223 last_receiver_report_ = now; 224 last_receiver_report_ = now;
224 } 225 }
225 } 226 }
226 227
227 } // namespace protocol 228 } // namespace protocol
228 } // namespace remoting 229 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/rtp_video_reader.h ('k') | remoting/protocol/rtp_video_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698