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

Side by Side Diff: remoting/protocol/protobuf_video_reader.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: merged 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 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ 5 #ifndef REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_
6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ 6 #define REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_
7 7
8 #include "remoting/proto/video.pb.h"
8 #include "remoting/protocol/message_reader.h" 9 #include "remoting/protocol/message_reader.h"
9 #include "remoting/protocol/video_reader.h" 10 #include "remoting/protocol/video_reader.h"
10 11
11 namespace remoting { 12 namespace remoting {
12 namespace protocol { 13 namespace protocol {
13 14
14 class Session; 15 class Session;
15 16
16 class ProtobufVideoReader : public VideoReader { 17 class ProtobufVideoReader : public VideoReader {
17 public: 18 public:
18 ProtobufVideoReader(); 19 ProtobufVideoReader(VideoPacketFormat::Encoding encoding);
19 virtual ~ProtobufVideoReader(); 20 virtual ~ProtobufVideoReader();
20 21
21 // VideoReader interface. 22 // VideoReader interface.
22 virtual void Init(protocol::Session* session, VideoStub* video_stub); 23 virtual void Init(protocol::Session* session, VideoStub* video_stub);
23 virtual void Close(); 24 virtual void Close();
24 25
25 private: 26 private:
26 void OnNewData(VideoPacket* packet); 27 void OnNewData(VideoPacket* packet);
27 28
29 VideoPacketFormat::Encoding encoding_;
30
28 MessageReader reader_; 31 MessageReader reader_;
29 32
30 // The stub that processes all received packets. 33 // The stub that processes all received packets.
31 VideoStub* video_stub_; 34 VideoStub* video_stub_;
32 35
33 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoReader); 36 DISALLOW_COPY_AND_ASSIGN(ProtobufVideoReader);
34 }; 37 };
35 38
36 } // namespace protocol 39 } // namespace protocol
37 } // namespace remoting 40 } // namespace remoting
38 41
39 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_ 42 #endif // REMOTING_PROTOCOL_PROTOBUF_VIDEO_READER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/message_decoder_unittest.cc ('k') | remoting/protocol/protobuf_video_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698