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

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

Issue 7508044: Remove video_channel() from Session interface (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/protobuf_video_reader.cc ('k') | remoting/protocol/protobuf_video_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) 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 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ 5 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_
6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ 6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_
7 7
8 #include <string>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
10 #include "remoting/protocol/video_writer.h" 13 #include "remoting/protocol/video_writer.h"
11 14
15 namespace net {
16 class StreamSocket;
17 } // namespace net
18
12 namespace remoting { 19 namespace remoting {
13 namespace protocol { 20 namespace protocol {
14 21
15 class BufferedSocketWriter; 22 class BufferedSocketWriter;
16 class Session; 23 class Session;
17 24
18 class ProtobufVideoWriter : public VideoWriter { 25 class ProtobufVideoWriter : public VideoWriter {
19 public: 26 public:
20 ProtobufVideoWriter(); 27 ProtobufVideoWriter();
21 virtual ~ProtobufVideoWriter(); 28 virtual ~ProtobufVideoWriter();
22 29
23 // VideoWriter interface. 30 // VideoWriter interface.
24 virtual void Init(protocol::Session* session) OVERRIDE; 31 virtual void Init(protocol::Session* session,
32 const InitializedCallback& callback) OVERRIDE;
25 virtual void Close() OVERRIDE; 33 virtual void Close() OVERRIDE;
26 34
27 // VideoStub interface. 35 // VideoStub interface.
28 virtual void ProcessVideoPacket(const VideoPacket* packet, 36 virtual void ProcessVideoPacket(const VideoPacket* packet,
29 Task* done) OVERRIDE; 37 Task* done) OVERRIDE;
30 virtual int GetPendingPackets() OVERRIDE; 38 virtual int GetPendingPackets() OVERRIDE;
31 39
32 private: 40 private:
41 void OnChannelReady(const std::string& name, net::StreamSocket* socket);
42
43 InitializedCallback initialized_callback_;
44
45 // TODO(sergeyu): Remove |channel_| and let |buffered_writer_| own it.
46 scoped_ptr<net::StreamSocket> channel_;
47
33 scoped_refptr<BufferedSocketWriter> buffered_writer_; 48 scoped_refptr<BufferedSocketWriter> buffered_writer_;
34 49
35 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoWriter); 50 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoWriter);
36 }; 51 };
37 52
38 } // namespace protocol 53 } // namespace protocol
39 } // namespace remoting 54 } // namespace remoting
40 55
41 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_ 56 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/protobuf_video_reader.cc ('k') | remoting/protocol/protobuf_video_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698