blob: a7b65fd2cd5c48ba30e92ecb103929fd22d059e7 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
stefan@webrtc.orgddfdfed2012-07-03 13:21:22 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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
niklase@google.com470e71d2011-07-07 08:21:25 +000014#include <stdlib.h>
pbos@webrtc.orgc69ae692013-06-04 09:02:37 +000015#include "webrtc/typedefs.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016
17namespace webrtc
18{
19
20enum VideoFrameType
21{
22 kKeyFrame = 0,
23 kDeltaFrame = 1,
24 kGoldenFrame = 2,
25 kAltRefFrame = 3,
26 kSkipFrame = 4
27};
28
niklase@google.com470e71d2011-07-07 08:21:25 +000029class EncodedImage
30{
31public:
stefan@webrtc.orgddfdfed2012-07-03 13:21:22 +000032 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.com470e71d2011-07-07 08:21:25 +000042
pbos@webrtc.orgfd2bfc82013-04-09 13:36:08 +000043 EncodedImage(uint8_t* buffer,
44 uint32_t length,
45 uint32_t size)
stefan@webrtc.orgddfdfed2012-07-03 13:21:22 +000046 : _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.com470e71d2011-07-07 08:21:25 +000055
pbos@webrtc.orgfd2bfc82013-04-09 13:36:08 +000056 uint32_t _encodedWidth;
57 uint32_t _encodedHeight;
58 uint32_t _timeStamp;
59 int64_t capture_time_ms_;
niklase@google.com470e71d2011-07-07 08:21:25 +000060 VideoFrameType _frameType;
pbos@webrtc.orgfd2bfc82013-04-09 13:36:08 +000061 uint8_t* _buffer;
62 uint32_t _length;
63 uint32_t _size;
niklase@google.com470e71d2011-07-07 08:21:25 +000064 bool _completeFrame;
65};
66
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000067} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000068
69#endif // COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H