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

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

Issue 9827006: Refactor VideoStub interface to accept ownership of video packets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/rtp_video_writer_unittest.cc ('k') | no next file » | 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 #ifndef REMOTING_PROTOCOL_VIDEO_STUB_H_ 5 #ifndef REMOTING_PROTOCOL_VIDEO_STUB_H_
6 #define REMOTING_PROTOCOL_VIDEO_STUB_H_ 6 #define REMOTING_PROTOCOL_VIDEO_STUB_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/memory/scoped_ptr.h"
9 10
10 namespace remoting { 11 namespace remoting {
11 12
12 class VideoPacket; 13 class VideoPacket;
13 14
14 namespace protocol { 15 namespace protocol {
15 16
16 class VideoStub { 17 class VideoStub {
17 public: 18 public:
18 virtual ~VideoStub() { } 19 virtual ~VideoStub() { }
19 20
20 // TODO(sergeyu): VideoPacket is the protobuf message that is used to send 21 // TODO(sergeyu): VideoPacket is the protobuf message that is used to send
21 // video packets in protobuf stream. It should not be used here. Add another 22 // video packets in protobuf stream. It should not be used here. Add another
22 // struct and use it to represent video packets internally. 23 // struct and use it to represent video packets internally.
23 virtual void ProcessVideoPacket(const VideoPacket* video_packet, 24 virtual void ProcessVideoPacket(scoped_ptr<VideoPacket> video_packet,
24 const base::Closure& done) = 0; 25 const base::Closure& done) = 0;
25 26
26 // Returns number of packets currently pending in the buffer. 27 // Returns number of packets currently pending in the buffer.
27 virtual int GetPendingPackets() = 0; 28 virtual int GetPendingPackets() = 0;
28 29
29 protected: 30 protected:
30 VideoStub() { } 31 VideoStub() { }
31 32
32 private: 33 private:
33 DISALLOW_COPY_AND_ASSIGN(VideoStub); 34 DISALLOW_COPY_AND_ASSIGN(VideoStub);
34 }; 35 };
35 36
36 } // namespace protocol 37 } // namespace protocol
37 } // namespace remoting 38 } // namespace remoting
38 39
39 #endif // REMOTING_PROTOCOL_VIDEO_STUB_H_ 40 #endif // REMOTING_PROTOCOL_VIDEO_STUB_H_
OLDNEW
« no previous file with comments | « remoting/protocol/rtp_video_writer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698