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

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

Issue 7633009: Use MessageLoopProxy for network message loop. (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/video_reader.cc ('k') | remoting/protocol/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 // VideoWriter is a generic interface for a video stream writer. RtpVideoWriter 5 // VideoWriter is a generic interface for a video stream writer. RtpVideoWriter
6 // and ProtobufVideoWriter implement this interface for RTP and protobuf video 6 // and ProtobufVideoWriter implement this interface for RTP and protobuf video
7 // streams. VideoWriter is used by ConnectionToClient to write into the video 7 // streams. VideoWriter is used by ConnectionToClient to write into the video
8 // stream. 8 // stream.
9 9
10 #ifndef REMOTING_PROTOCOL_VIDEO_WRITER_H_ 10 #ifndef REMOTING_PROTOCOL_VIDEO_WRITER_H_
11 #define REMOTING_PROTOCOL_VIDEO_WRITER_H_ 11 #define REMOTING_PROTOCOL_VIDEO_WRITER_H_
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "remoting/protocol/video_stub.h" 15 #include "remoting/protocol/video_stub.h"
16 16
17 namespace base {
18 class MessageLoopProxy;
19 } // namespace base
20
17 namespace remoting { 21 namespace remoting {
18 namespace protocol { 22 namespace protocol {
19 23
20 class Session; 24 class Session;
21 class SessionConfig; 25 class SessionConfig;
22 26
23 class VideoWriter : public VideoStub { 27 class VideoWriter : public VideoStub {
24 public: 28 public:
25 virtual ~VideoWriter(); 29 virtual ~VideoWriter();
26 30
27 // The callback is called when initialization is finished. The 31 // The callback is called when initialization is finished. The
28 // parameter is set to true on success. 32 // parameter is set to true on success.
29 typedef base::Callback<void(bool)> InitializedCallback; 33 typedef base::Callback<void(bool)> InitializedCallback;
30 34
31 static VideoWriter* Create(const SessionConfig* config); 35 static VideoWriter* Create(base::MessageLoopProxy* message_loop,
36 const SessionConfig* config);
32 37
33 // Initializes the writer. 38 // Initializes the writer.
34 virtual void Init(Session* session, const InitializedCallback& callback) = 0; 39 virtual void Init(Session* session, const InitializedCallback& callback) = 0;
35 40
36 // Stops writing. Must be called on the network thread before this 41 // Stops writing. Must be called on the network thread before this
37 // object is destroyed. 42 // object is destroyed.
38 virtual void Close() = 0; 43 virtual void Close() = 0;
39 44
40 protected: 45 protected:
41 VideoWriter() { } 46 VideoWriter() { }
42 47
43 private: 48 private:
44 DISALLOW_COPY_AND_ASSIGN(VideoWriter); 49 DISALLOW_COPY_AND_ASSIGN(VideoWriter);
45 }; 50 };
46 51
47 } // namespace protocol 52 } // namespace protocol
48 } // namespace remoting 53 } // namespace remoting
49 54
50 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ 55 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/video_reader.cc ('k') | remoting/protocol/video_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698