Reason for revert: Downstream projects have been fixed. Original issue's description: > Revert of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2854873003/ ) > > Reason for revert: > More downstream breakage discovered. > > Original issue's description: > > Reland of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2854883002/ ) > > > > Reason for revert: > > Will make another attempt to track down and fix downstream projects. > > > > Original issue's description: > > > Revert of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2852303002/ ) > > > > > > Reason for revert: > > > Unfortunately, more downstream updates needed. > > > > > > Original issue's description: > > > > Reland of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #1 id:1 of https://codereview.webrtc.org/2845333002/ ) > > > > > > > > Reason for revert: > > > > Downstream projects being updated. > > > > > > > > For Chrome, relanding depends on cl > > > > https://codereview.chromium.org/2855783003/ > > > > > > > > Original issue's description: > > > > > Revert of Delete deprecated and transitional stuff related to video frame refactoring. (patchset #17 id:320001 of https://codereview.webrtc.org/2622263002/ ) > > > > > > > > > > Reason for revert: > > > > > Broke Chrome build, see, e.g., > > > > > http://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/16237 > > > > > > > > > > Original issue's description: > > > > > > Delete deprecated and transitional stuff related to video frame refactoring. > > > > > > > > > > > > BUG=webrtc:5880 > > > > > > > > > > > > Review-Url: https://codereview.webrtc.org/2622263002 > > > > > > Cr-Commit-Position: refs/heads/master@{#17928} > > > > > > Committed:713a3bbcc7> > > > > > > > > > TBR=mflodman@webrtc.org,perkj@webrtc.org > > > > > # Skipping CQ checks because original CL landed less than 1 days ago. > > > > > NOPRESUBMIT=true > > > > > NOTREECHECKS=true > > > > > NOTRY=true > > > > > BUG=webrtc:5880 > > > > > > > > > > Review-Url: https://codereview.webrtc.org/2845333002 > > > > > Cr-Commit-Position: refs/heads/master@{#17929} > > > > > Committed:aec49d2b49> > > > > > > > TBR=mflodman@webrtc.org,perkj@webrtc.org > > > > # Not skipping CQ checks because original CL landed more than 1 days ago. > > > > BUG=webrtc:5880 > > > > > > > > Review-Url: https://codereview.webrtc.org/2852303002 > > > > Cr-Commit-Position: refs/heads/master@{#17974} > > > > Committed:d71ebd70f6> > > > > > TBR=mflodman@webrtc.org,perkj@webrtc.org > > > # Skipping CQ checks because original CL landed less than 1 days ago. > > > NOPRESUBMIT=true > > > NOTREECHECKS=true > > > NOTRY=true > > > BUG=webrtc:5880 > > > > > > Review-Url: https://codereview.webrtc.org/2854883002 > > > Cr-Commit-Position: refs/heads/master@{#17978} > > > Committed:6e6a485a02> > > > TBR=mflodman@webrtc.org,perkj@webrtc.org > > # Skipping CQ checks because original CL landed less than 1 days ago. > > NOPRESUBMIT=true > > > > BUG=webrtc:5880 > > > > Review-Url: https://codereview.webrtc.org/2854873003 > > Cr-Commit-Position: refs/heads/master@{#18006} > > Committed:3870a071c4> > TBR=mflodman@webrtc.org,perkj@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:5880 > > Review-Url: https://codereview.webrtc.org/2853383005 > Cr-Commit-Position: refs/heads/master@{#18008} > Committed:61b22dde13TBR=mflodman@webrtc.org,perkj@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=webrtc:5880 Review-Url: https://codereview.webrtc.org/2867703002 Cr-Commit-Position: refs/heads/master@{#18081}
71 lines
2.5 KiB
C++
71 lines
2.5 KiB
C++
/*
|
|
* Copyright (c) 2014 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 WEBRTC_VIDEO_FRAME_H_
|
|
#define WEBRTC_VIDEO_FRAME_H_
|
|
|
|
// TODO(nisse): This header file should eventually be deleted. For
|
|
// declarations of classes related to unencoded video frame, use the
|
|
// headers under api/video instead. The EncodedImage class stays in
|
|
// this file until we have figured out how to refactor and clean up
|
|
// related interfaces.
|
|
|
|
#include "webrtc/common_types.h"
|
|
#include "webrtc/typedefs.h"
|
|
|
|
namespace webrtc {
|
|
|
|
// TODO(pbos): Rename EncodedFrame and reformat this class' members.
|
|
class EncodedImage {
|
|
public:
|
|
static const size_t kBufferPaddingBytesH264;
|
|
|
|
// Some decoders require encoded image buffers to be padded with a small
|
|
// number of additional bytes (due to over-reading byte readers).
|
|
static size_t GetBufferPaddingBytes(VideoCodecType codec_type);
|
|
|
|
EncodedImage() : EncodedImage(nullptr, 0, 0) {}
|
|
|
|
EncodedImage(uint8_t* buffer, size_t length, size_t size)
|
|
: _buffer(buffer), _length(length), _size(size) {}
|
|
|
|
// TODO(kthelgason): get rid of this struct as it only has a single member
|
|
// remaining.
|
|
struct AdaptReason {
|
|
AdaptReason() : bw_resolutions_disabled(-1) {}
|
|
int bw_resolutions_disabled; // Number of resolutions that are not sent
|
|
// due to bandwidth for this frame.
|
|
// Or -1 if information is not provided.
|
|
};
|
|
uint32_t _encodedWidth = 0;
|
|
uint32_t _encodedHeight = 0;
|
|
uint32_t _timeStamp = 0;
|
|
// NTP time of the capture time in local timebase in milliseconds.
|
|
int64_t ntp_time_ms_ = 0;
|
|
int64_t capture_time_ms_ = 0;
|
|
FrameType _frameType = kVideoFrameDelta;
|
|
uint8_t* _buffer;
|
|
size_t _length;
|
|
size_t _size;
|
|
VideoRotation rotation_ = kVideoRotation_0;
|
|
VideoContentType content_type_ = VideoContentType::UNSPECIFIED;
|
|
bool _completeFrame = false;
|
|
AdaptReason adapt_reason_;
|
|
int qp_ = -1; // Quantizer value.
|
|
|
|
// When an application indicates non-zero values here, it is taken as an
|
|
// indication that all future frames will be constrained with those limits
|
|
// until the application indicates a change again.
|
|
PlayoutDelay playout_delay_ = {-1, -1};
|
|
};
|
|
|
|
} // namespace webrtc
|
|
#endif // WEBRTC_VIDEO_FRAME_H_
|