OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_CODEC_VIDEO_DECODER_H_ | 5 #ifndef REMOTING_CODEC_VIDEO_DECODER_H_ |
6 #define REMOTING_CODEC_VIDEO_DECODER_H_ | 6 #define REMOTING_CODEC_VIDEO_DECODER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | |
9 | 8 |
10 namespace webrtc { | 9 namespace webrtc { |
11 class DesktopFrame; | 10 class DesktopFrame; |
12 } // namespace webrtc | 11 } // namespace webrtc |
13 | 12 |
14 namespace remoting { | 13 namespace remoting { |
15 | 14 |
16 class VideoPacket; | 15 class VideoPacket; |
17 | 16 |
18 // Interface for a decoder that decodes video packets. | 17 // Interface for a decoder that decodes video packets. |
19 class VideoDecoder { | 18 class VideoDecoder { |
20 public: | 19 public: |
21 VideoDecoder() {} | 20 VideoDecoder() {} |
22 virtual ~VideoDecoder() {} | 21 virtual ~VideoDecoder() {} |
23 | 22 |
24 // Decodes a video frame. Returns false in case of a failure. The caller must | 23 // Decodes a video frame. Returns false in case of a failure. The caller must |
25 // pre-allocate a |frame| with the size specified in the |packet|. | 24 // pre-allocate a |frame| with the size specified in the |packet|. |
26 virtual bool DecodePacket(const VideoPacket& packet, | 25 virtual bool DecodePacket(const VideoPacket& packet, |
27 webrtc::DesktopFrame* frame) = 0; | 26 webrtc::DesktopFrame* frame) = 0; |
28 }; | 27 }; |
29 | 28 |
30 } // namespace remoting | 29 } // namespace remoting |
31 | 30 |
32 #endif // REMOTING_CODEC_VIDEO_DECODER_H_ | 31 #endif // REMOTING_CODEC_VIDEO_DECODER_H_ |
OLD | NEW |