Lint fix for webrtc/modules/video_coding PART 2!
Trying to submit all changes at once proved impossible since there were too many changes in too many files. The changes to PRESUBMIT.py will be uploaded in the last CL. (original CL: https://codereview.webrtc.org/1528503003/) BUG=webrtc:5309 TBR=mflodman@webrtc.org Review URL: https://codereview.webrtc.org/1543503002 Cr-Commit-Position: refs/heads/master@{#11102}
This commit is contained in:
@ -19,109 +19,114 @@
|
||||
#include "webrtc/modules/video_coding/include/video_codec_interface.h"
|
||||
#include "webrtc/modules/video_coding/include/video_coding_defines.h"
|
||||
|
||||
namespace webrtc
|
||||
{
|
||||
namespace webrtc {
|
||||
|
||||
class VCMEncodedFrame : protected EncodedImage
|
||||
{
|
||||
public:
|
||||
VCMEncodedFrame();
|
||||
VCMEncodedFrame(const webrtc::EncodedImage& rhs);
|
||||
VCMEncodedFrame(const VCMEncodedFrame& rhs);
|
||||
class VCMEncodedFrame : protected EncodedImage {
|
||||
public:
|
||||
VCMEncodedFrame();
|
||||
explicit VCMEncodedFrame(const webrtc::EncodedImage& rhs);
|
||||
VCMEncodedFrame(const VCMEncodedFrame& rhs);
|
||||
|
||||
~VCMEncodedFrame();
|
||||
/**
|
||||
* Delete VideoFrame and resets members to zero
|
||||
*/
|
||||
void Free();
|
||||
/**
|
||||
* Set render time in milliseconds
|
||||
*/
|
||||
void SetRenderTime(const int64_t renderTimeMs) {_renderTimeMs = renderTimeMs;}
|
||||
~VCMEncodedFrame();
|
||||
/**
|
||||
* Delete VideoFrame and resets members to zero
|
||||
*/
|
||||
void Free();
|
||||
/**
|
||||
* Set render time in milliseconds
|
||||
*/
|
||||
void SetRenderTime(const int64_t renderTimeMs) {
|
||||
_renderTimeMs = renderTimeMs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the encoded frame size
|
||||
*/
|
||||
void SetEncodedSize(uint32_t width, uint32_t height)
|
||||
{ _encodedWidth = width; _encodedHeight = height; }
|
||||
/**
|
||||
* Get the encoded image
|
||||
*/
|
||||
const webrtc::EncodedImage& EncodedImage() const
|
||||
{ return static_cast<const webrtc::EncodedImage&>(*this); }
|
||||
/**
|
||||
* Get pointer to frame buffer
|
||||
*/
|
||||
const uint8_t* Buffer() const {return _buffer;}
|
||||
/**
|
||||
* Get frame length
|
||||
*/
|
||||
size_t Length() const {return _length;}
|
||||
/**
|
||||
* Get frame timestamp (90kHz)
|
||||
*/
|
||||
uint32_t TimeStamp() const {return _timeStamp;}
|
||||
/**
|
||||
* Get render time in milliseconds
|
||||
*/
|
||||
int64_t RenderTimeMs() const {return _renderTimeMs;}
|
||||
/**
|
||||
* Get frame type
|
||||
*/
|
||||
webrtc::FrameType FrameType() const { return _frameType; }
|
||||
/**
|
||||
* Get frame rotation
|
||||
*/
|
||||
VideoRotation rotation() const { return _rotation; }
|
||||
/**
|
||||
* True if this frame is complete, false otherwise
|
||||
*/
|
||||
bool Complete() const { return _completeFrame; }
|
||||
/**
|
||||
* True if there's a frame missing before this frame
|
||||
*/
|
||||
bool MissingFrame() const { return _missingFrame; }
|
||||
/**
|
||||
* Payload type of the encoded payload
|
||||
*/
|
||||
uint8_t PayloadType() const { return _payloadType; }
|
||||
/**
|
||||
* Get codec specific info.
|
||||
* The returned pointer is only valid as long as the VCMEncodedFrame
|
||||
* is valid. Also, VCMEncodedFrame owns the pointer and will delete
|
||||
* the object.
|
||||
*/
|
||||
const CodecSpecificInfo* CodecSpecific() const {return &_codecSpecificInfo;}
|
||||
/**
|
||||
* Set the encoded frame size
|
||||
*/
|
||||
void SetEncodedSize(uint32_t width, uint32_t height) {
|
||||
_encodedWidth = width;
|
||||
_encodedHeight = height;
|
||||
}
|
||||
/**
|
||||
* Get the encoded image
|
||||
*/
|
||||
const webrtc::EncodedImage& EncodedImage() const {
|
||||
return static_cast<const webrtc::EncodedImage&>(*this);
|
||||
}
|
||||
/**
|
||||
* Get pointer to frame buffer
|
||||
*/
|
||||
const uint8_t* Buffer() const { return _buffer; }
|
||||
/**
|
||||
* Get frame length
|
||||
*/
|
||||
size_t Length() const { return _length; }
|
||||
/**
|
||||
* Get frame timestamp (90kHz)
|
||||
*/
|
||||
uint32_t TimeStamp() const { return _timeStamp; }
|
||||
/**
|
||||
* Get render time in milliseconds
|
||||
*/
|
||||
int64_t RenderTimeMs() const { return _renderTimeMs; }
|
||||
/**
|
||||
* Get frame type
|
||||
*/
|
||||
webrtc::FrameType FrameType() const { return _frameType; }
|
||||
/**
|
||||
* Get frame rotation
|
||||
*/
|
||||
VideoRotation rotation() const { return _rotation; }
|
||||
/**
|
||||
* True if this frame is complete, false otherwise
|
||||
*/
|
||||
bool Complete() const { return _completeFrame; }
|
||||
/**
|
||||
* True if there's a frame missing before this frame
|
||||
*/
|
||||
bool MissingFrame() const { return _missingFrame; }
|
||||
/**
|
||||
* Payload type of the encoded payload
|
||||
*/
|
||||
uint8_t PayloadType() const { return _payloadType; }
|
||||
/**
|
||||
* Get codec specific info.
|
||||
* The returned pointer is only valid as long as the VCMEncodedFrame
|
||||
* is valid. Also, VCMEncodedFrame owns the pointer and will delete
|
||||
* the object.
|
||||
*/
|
||||
const CodecSpecificInfo* CodecSpecific() const { return &_codecSpecificInfo; }
|
||||
|
||||
const RTPFragmentationHeader* FragmentationHeader() const;
|
||||
const RTPFragmentationHeader* FragmentationHeader() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Verifies that current allocated buffer size is larger than or equal to the input size.
|
||||
* If the current buffer size is smaller, a new allocation is made and the old buffer data
|
||||
* is copied to the new buffer.
|
||||
* Buffer size is updated to minimumSize.
|
||||
*/
|
||||
void VerifyAndAllocate(size_t minimumSize);
|
||||
protected:
|
||||
/**
|
||||
* Verifies that current allocated buffer size is larger than or equal to the
|
||||
* input size.
|
||||
* If the current buffer size is smaller, a new allocation is made and the old
|
||||
* buffer data
|
||||
* is copied to the new buffer.
|
||||
* Buffer size is updated to minimumSize.
|
||||
*/
|
||||
void VerifyAndAllocate(size_t minimumSize);
|
||||
|
||||
void Reset();
|
||||
void Reset();
|
||||
|
||||
void CopyCodecSpecific(const RTPVideoHeader* header);
|
||||
void CopyCodecSpecific(const RTPVideoHeader* header);
|
||||
|
||||
int64_t _renderTimeMs;
|
||||
uint8_t _payloadType;
|
||||
bool _missingFrame;
|
||||
CodecSpecificInfo _codecSpecificInfo;
|
||||
webrtc::VideoCodecType _codec;
|
||||
RTPFragmentationHeader _fragmentation;
|
||||
VideoRotation _rotation;
|
||||
int64_t _renderTimeMs;
|
||||
uint8_t _payloadType;
|
||||
bool _missingFrame;
|
||||
CodecSpecificInfo _codecSpecificInfo;
|
||||
webrtc::VideoCodecType _codec;
|
||||
RTPFragmentationHeader _fragmentation;
|
||||
VideoRotation _rotation;
|
||||
|
||||
// Video rotation is only set along with the last packet for each frame
|
||||
// (same as marker bit). This |_rotation_set| is only for debugging purpose
|
||||
// to ensure we don't set it twice for a frame.
|
||||
bool _rotation_set;
|
||||
// Video rotation is only set along with the last packet for each frame
|
||||
// (same as marker bit). This |_rotation_set| is only for debugging purpose
|
||||
// to ensure we don't set it twice for a frame.
|
||||
bool _rotation_set;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_
|
||||
#endif // WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_
|
||||
|
||||
Reference in New Issue
Block a user