niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
stefan@webrtc.org | ddfdfed | 2012-07-03 13:21:22 +0000 | [diff] [blame] | 2 | * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H |
| 12 | #define COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H |
| 13 | |
| 14 | #include "typedefs.h" |
| 15 | #include <stdlib.h> |
| 16 | |
| 17 | namespace webrtc |
| 18 | { |
| 19 | |
| 20 | enum VideoFrameType |
| 21 | { |
| 22 | kKeyFrame = 0, |
| 23 | kDeltaFrame = 1, |
| 24 | kGoldenFrame = 2, |
| 25 | kAltRefFrame = 3, |
| 26 | kSkipFrame = 4 |
| 27 | }; |
| 28 | |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 29 | class EncodedImage |
| 30 | { |
| 31 | public: |
stefan@webrtc.org | ddfdfed | 2012-07-03 13:21:22 +0000 | [diff] [blame] | 32 | EncodedImage() |
| 33 | : _encodedWidth(0), |
| 34 | _encodedHeight(0), |
| 35 | _timeStamp(0), |
| 36 | capture_time_ms_(0), |
| 37 | _frameType(kDeltaFrame), |
| 38 | _buffer(NULL), |
| 39 | _length(0), |
| 40 | _size(0), |
| 41 | _completeFrame(false) {} |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 42 | |
pbos@webrtc.org | fd2bfc8 | 2013-04-09 13:36:08 +0000 | [diff] [blame] | 43 | EncodedImage(uint8_t* buffer, |
| 44 | uint32_t length, |
| 45 | uint32_t size) |
stefan@webrtc.org | ddfdfed | 2012-07-03 13:21:22 +0000 | [diff] [blame] | 46 | : _encodedWidth(0), |
| 47 | _encodedHeight(0), |
| 48 | _timeStamp(0), |
| 49 | capture_time_ms_(0), |
| 50 | _frameType(kDeltaFrame), |
| 51 | _buffer(buffer), |
| 52 | _length(length), |
| 53 | _size(size), |
| 54 | _completeFrame(false) {} |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 55 | |
pbos@webrtc.org | fd2bfc8 | 2013-04-09 13:36:08 +0000 | [diff] [blame] | 56 | uint32_t _encodedWidth; |
| 57 | uint32_t _encodedHeight; |
| 58 | uint32_t _timeStamp; |
| 59 | int64_t capture_time_ms_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 60 | VideoFrameType _frameType; |
pbos@webrtc.org | fd2bfc8 | 2013-04-09 13:36:08 +0000 | [diff] [blame] | 61 | uint8_t* _buffer; |
| 62 | uint32_t _length; |
| 63 | uint32_t _size; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 64 | bool _completeFrame; |
| 65 | }; |
| 66 | |
| 67 | } // namespace webrtc |
| 68 | |
| 69 | #endif // COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H |