wu@webrtc.org 6c75c98964 Propagate capture ntp timestamp from rtp to renderer.
Mostly the interface changes, the real implementation of ntp timestamp will come in a follow up cl.

TEST=new tests and try bots
BUG=3111
R=niklas.enbom@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/11469004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5911 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-04-15 17:46:33 +00:00

73 lines
1.9 KiB
C++

/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* 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>
#include "webrtc/typedefs.h"
namespace webrtc
{
enum VideoFrameType
{
kKeyFrame = 0,
kDeltaFrame = 1,
kGoldenFrame = 2,
kAltRefFrame = 3,
kSkipFrame = 4
};
class EncodedImage
{
public:
EncodedImage()
: _encodedWidth(0),
_encodedHeight(0),
_timeStamp(0),
capture_time_ms_(0),
_frameType(kDeltaFrame),
_buffer(NULL),
_length(0),
_size(0),
_completeFrame(false) {}
EncodedImage(uint8_t* buffer,
uint32_t length,
uint32_t size)
: _encodedWidth(0),
_encodedHeight(0),
_timeStamp(0),
ntp_time_ms_(0),
capture_time_ms_(0),
_frameType(kDeltaFrame),
_buffer(buffer),
_length(length),
_size(size),
_completeFrame(false) {}
uint32_t _encodedWidth;
uint32_t _encodedHeight;
uint32_t _timeStamp;
// NTP time of the capture time in local timebase in milliseconds.
int64_t ntp_time_ms_;
int64_t capture_time_ms_;
VideoFrameType _frameType;
uint8_t* _buffer;
uint32_t _length;
uint32_t _size;
bool _completeFrame;
};
} // namespace webrtc
#endif // COMMON_VIDEO_INTERFACE_VIDEO_IMAGE_H