2011-07-07 08:21:25 +00:00
|
|
|
/*
|
2012-07-03 13:21:22 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2011-07-07 08:21:25 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H
|
|
|
|
|
#define COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2013-06-04 09:02:37 +00:00
|
|
|
#include "webrtc/typedefs.h"
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
namespace webrtc
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
enum VideoFrameType
|
|
|
|
|
{
|
|
|
|
|
kKeyFrame = 0,
|
|
|
|
|
kDeltaFrame = 1,
|
|
|
|
|
kGoldenFrame = 2,
|
|
|
|
|
kAltRefFrame = 3,
|
|
|
|
|
kSkipFrame = 4
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class EncodedImage
|
|
|
|
|
{
|
|
|
|
|
public:
|
2012-07-03 13:21:22 +00:00
|
|
|
EncodedImage()
|
|
|
|
|
: _encodedWidth(0),
|
|
|
|
|
_encodedHeight(0),
|
|
|
|
|
_timeStamp(0),
|
|
|
|
|
capture_time_ms_(0),
|
|
|
|
|
_frameType(kDeltaFrame),
|
|
|
|
|
_buffer(NULL),
|
|
|
|
|
_length(0),
|
|
|
|
|
_size(0),
|
|
|
|
|
_completeFrame(false) {}
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-04-09 13:36:08 +00:00
|
|
|
EncodedImage(uint8_t* buffer,
|
|
|
|
|
uint32_t length,
|
|
|
|
|
uint32_t size)
|
2012-07-03 13:21:22 +00:00
|
|
|
: _encodedWidth(0),
|
|
|
|
|
_encodedHeight(0),
|
|
|
|
|
_timeStamp(0),
|
2014-04-15 17:46:33 +00:00
|
|
|
ntp_time_ms_(0),
|
2012-07-03 13:21:22 +00:00
|
|
|
capture_time_ms_(0),
|
|
|
|
|
_frameType(kDeltaFrame),
|
|
|
|
|
_buffer(buffer),
|
|
|
|
|
_length(length),
|
|
|
|
|
_size(size),
|
|
|
|
|
_completeFrame(false) {}
|
2011-07-07 08:21:25 +00:00
|
|
|
|
2013-04-09 13:36:08 +00:00
|
|
|
uint32_t _encodedWidth;
|
|
|
|
|
uint32_t _encodedHeight;
|
|
|
|
|
uint32_t _timeStamp;
|
2014-04-15 17:46:33 +00:00
|
|
|
// NTP time of the capture time in local timebase in milliseconds.
|
|
|
|
|
int64_t ntp_time_ms_;
|
2013-04-09 13:36:08 +00:00
|
|
|
int64_t capture_time_ms_;
|
2011-07-07 08:21:25 +00:00
|
|
|
VideoFrameType _frameType;
|
2013-04-09 13:36:08 +00:00
|
|
|
uint8_t* _buffer;
|
|
|
|
|
uint32_t _length;
|
|
|
|
|
uint32_t _size;
|
2011-07-07 08:21:25 +00:00
|
|
|
bool _completeFrame;
|
|
|
|
|
};
|
|
|
|
|
|
2013-07-03 15:12:26 +00:00
|
|
|
} // namespace webrtc
|
2011-07-07 08:21:25 +00:00
|
|
|
|
|
|
|
|
#endif // COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H
|