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

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

Issue 4476003: Add VideoPacket struct for video packets. Refactor Decode interface to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed compilation on windows and mac Created 10 years, 1 month 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "remoting/proto/video.pb.h"
15 14
16 namespace remoting { 15 namespace remoting {
17 16
18 namespace protocol {
19 class Session;
20 } // namespace protocol
21
22 class ChromotocolConfig; 17 class ChromotocolConfig;
23 class ChromotocolConnection; 18 class VideoPacket;
24 19
25 namespace protocol { 20 namespace protocol {
26 21
22 class Session;
23
27 // TODO(sergeyu): VideoWriter should implement VideoStub interface. 24 // TODO(sergeyu): VideoWriter should implement VideoStub interface.
28 class VideoWriter { 25 class VideoWriter {
29 public: 26 public:
30 virtual ~VideoWriter(); 27 virtual ~VideoWriter();
31 28
32 static VideoWriter* Create(const ChromotocolConfig* config); 29 static VideoWriter* Create(const ChromotocolConfig* config);
33 30
34 // Initializes the writer. 31 // Initializes the writer.
35 virtual void Init(protocol::Session* session) = 0; 32 virtual void Init(protocol::Session* session) = 0;
36 33
37 // Sends the |packet|. 34 // Sends the |packet|.
38 virtual void SendPacket(const VideoPacket& packet) = 0; 35 virtual void SendPacket(const VideoPacket& packet) = 0;
39 36
40 // Returns number of packets currently pending in the buffer. 37 // Returns number of packets currently pending in the buffer.
41 virtual int GetPendingPackets() = 0; 38 virtual int GetPendingPackets() = 0;
42 39
43 virtual void Close() = 0; 40 virtual void Close() = 0;
44 41
45 protected: 42 protected:
46 VideoWriter() { } 43 VideoWriter() { }
47 44
48 private: 45 private:
49 DISALLOW_COPY_AND_ASSIGN(VideoWriter); 46 DISALLOW_COPY_AND_ASSIGN(VideoWriter);
50 }; 47 };
51 48
52 } // namespace protocol 49 } // namespace protocol
53 } // namespace remoting 50 } // namespace remoting
54 51
55 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_ 52 #endif // REMOTING_PROTOCOL_VIDEO_WRITER_H_
OLDNEW
« remoting/client/chromoting_client.h ('K') | « remoting/protocol/video_stub.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698