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

Side by Side Diff: remoting/protocol/video_reader.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_writer.cc ('k') | remoting/protocol/video_reader.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 // VideoReader is a generic interface used by ConnectionToHost to read
6 // video stream. ProtobufVideoReader implements this interface for
7 // protobuf video stream.
8
9 #ifndef REMOTING_PROTOCOL_VIDEO_READER_H_
10 #define REMOTING_PROTOCOL_VIDEO_READER_H_
11
12 #include "base/callback.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/video_stub.h"
15
16 namespace remoting {
17 namespace protocol {
18
19 class Session;
20 class SessionConfig;
21
22 class VideoReader {
23 public:
24 // The callback is called when initialization is finished. The
25 // parameter is set to true on success.
26 typedef base::Callback<void(bool)> InitializedCallback;
27
28 virtual ~VideoReader();
29
30 static scoped_ptr<VideoReader> Create(const SessionConfig& config);
31
32 // Initializies the reader. Doesn't take ownership of either |connection|
33 // or |video_stub|.
34 virtual void Init(Session* session,
35 VideoStub* video_stub,
36 const InitializedCallback& callback) = 0;
37 virtual bool is_connected() = 0;
38
39 protected:
40 VideoReader() { }
41
42 private:
43 DISALLOW_COPY_AND_ASSIGN(VideoReader);
44 };
45
46 } // namespace protocol
47 } // namespace remoting
48
49 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/protobuf_video_writer.cc ('k') | remoting/protocol/video_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698