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

Side by Side Diff: remoting/protocol/rtcp_writer.h

Issue 7218061: Close all writers before JingleSession is destroyed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 9 years, 5 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/protobuf_video_writer.cc ('k') | remoting/protocol/rtcp_writer.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 #ifndef REMOTING_PROTOCOL_RTCP_WRITER_H_ 5 #ifndef REMOTING_PROTOCOL_RTCP_WRITER_H_
6 #define REMOTING_PROTOCOL_RTCP_WRITER_H_ 6 #define REMOTING_PROTOCOL_RTCP_WRITER_H_
7 7
8 #include "net/socket/socket.h" 8 #include "net/socket/socket.h"
9 9
10 namespace remoting { 10 namespace remoting {
11 11
12 class CompoundBuffer; 12 class CompoundBuffer;
13 13
14 namespace protocol { 14 namespace protocol {
15 15
16 class BufferedDatagramWriter; 16 class BufferedDatagramWriter;
17 struct RtcpReceiverReport; 17 struct RtcpReceiverReport;
18 18
19 class RtcpWriter { 19 class RtcpWriter {
20 public: 20 public:
21 RtcpWriter(); 21 RtcpWriter();
22 virtual ~RtcpWriter(); 22 virtual ~RtcpWriter();
23 23
24 // Initializes the writer. Must be called on the thread the socket 24 // Initializes the writer. Must be called on the thread the socket
25 // belongs to. 25 // belongs to.
26 void Init(net::Socket* socket); 26 void Init(net::Socket* socket);
27 void Close();
27 28
28 // Sends next packet. The packet is mutated by 29 // Sends next packet. The packet is mutated by
29 void SendReport(const RtcpReceiverReport& report); 30 void SendReport(const RtcpReceiverReport& report);
30 31
31 // Returns number of packets queued in the buffer. 32 // Returns number of packets queued in the buffer.
32 int GetPendingPackets(); 33 int GetPendingPackets();
33 34
34 private: 35 private:
35 scoped_refptr<BufferedDatagramWriter> buffered_rtcp_writer_; 36 scoped_refptr<BufferedDatagramWriter> buffered_rtcp_writer_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(RtcpWriter); 38 DISALLOW_COPY_AND_ASSIGN(RtcpWriter);
38 }; 39 };
39 40
40 } // namespace protocol 41 } // namespace protocol
41 } // namespace remoting 42 } // namespace remoting
42 43
43 #endif // REMOTING_PROTOCOL_RTCP_WRITER_H_ 44 #endif // REMOTING_PROTOCOL_RTCP_WRITER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/protobuf_video_writer.cc ('k') | remoting/protocol/rtcp_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698