blob: 8e48b440efa7267eb6cf3b7bf4116fa54e519d19 [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
14#include "typedefs.h"
15#include <stdlib.h>
16
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
43 EncodedImage(WebRtc_UWord8* buffer,
44 WebRtc_UWord32 length,
stefan@webrtc.orgddfdfed2012-07-03 13:21:22 +000045 WebRtc_UWord32 size)
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.com470e71d2011-07-07 08:21:25 +000055
56 WebRtc_UWord32 _encodedWidth;
57 WebRtc_UWord32 _encodedHeight;
58 WebRtc_UWord32 _timeStamp;
stefan@webrtc.orgddfdfed2012-07-03 13:21:22 +000059 int64_t capture_time_ms_;
niklase@google.com470e71d2011-07-07 08:21:25 +000060 VideoFrameType _frameType;
61 WebRtc_UWord8* _buffer;
62 WebRtc_UWord32 _length;
63 WebRtc_UWord32 _size;
64 bool _completeFrame;
65};
66
67} // namespace webrtc
68
69#endif // COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H