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.
5 // VideoReader is a generic interface used by ConnectionToHost to read
6 // video stream. ProtobufVideoReader implements this interface for
7 // protobuf video stream.
9 #ifndef REMOTING_PROTOCOL_VIDEO_READER_H_
10 #define REMOTING_PROTOCOL_VIDEO_READER_H_
12 #include "base/callback.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/video_stub.h"
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
;
28 virtual ~VideoReader();
30 static scoped_ptr
<VideoReader
> Create(const SessionConfig
& config
);
32 // Initializies the reader. Doesn't take ownership of either |connection|
34 virtual void Init(Session
* session
,
35 VideoStub
* video_stub
,
36 const InitializedCallback
& callback
) = 0;
37 virtual bool is_connected() = 0;
43 DISALLOW_COPY_AND_ASSIGN(VideoReader
);
46 } // namespace protocol
47 } // namespace remoting
49 #endif // REMOTING_PROTOCOL_VIDEO_READER_H_