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

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

Issue 577473002: Simplify VideoReader and VideoWriter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_
6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_WRITER_H_
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "remoting/protocol/buffered_socket_writer.h"
14 #include "remoting/protocol/video_writer.h"
15
16 namespace net {
17 class StreamSocket;
18 } // namespace net
19
20 namespace remoting {
21 namespace protocol {
22
23 class StreamChannelFactory;
24 class Session;
25
26 class ProtobufVideoWriter : public VideoWriter {
27 public:
28 ProtobufVideoWriter();
29 virtual ~ProtobufVideoWriter();
30
31 // VideoWriter interface.
32 virtual void Init(protocol::Session* session,
33 const InitializedCallback& callback) OVERRIDE;
34 virtual void Close() OVERRIDE;
35 virtual bool is_connected() OVERRIDE;
36
37 // VideoStub interface.
38 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> packet,
39 const base::Closure& done) OVERRIDE;
40
41 private:
42 void OnChannelReady(scoped_ptr<net::StreamSocket> socket);
43
44 InitializedCallback initialized_callback_;
45
46 StreamChannelFactory* channel_factory_;
47 scoped_ptr<net::StreamSocket> channel_;
48
49 BufferedSocketWriter buffered_writer_;
50
51 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoWriter);
52 };
53
54 } // namespace protocol
55 } // namespace remoting
56
57 #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