Fix some chromium-style warnings in webrtc/modules/video_coding/
BUG=163 R=mikhal@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1901005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4429 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
e6c3966530
commit
7f7162a003
@ -38,7 +38,7 @@ class I420Encoder : public VideoEncoder {
|
||||
// <0 - Error
|
||||
virtual int InitEncode(const VideoCodec* codecSettings,
|
||||
int /*numberOfCores*/,
|
||||
uint32_t /*maxPayloadSize*/);
|
||||
uint32_t /*maxPayloadSize*/) OVERRIDE;
|
||||
|
||||
// "Encode" an I420 image (as a part of a video stream). The encoded image
|
||||
// will be returned to the user via the encode complete callback.
|
||||
@ -50,9 +50,10 @@ class I420Encoder : public VideoEncoder {
|
||||
//
|
||||
// Return value : WEBRTC_VIDEO_CODEC_OK if OK.
|
||||
// <0 - Error
|
||||
virtual int Encode(const I420VideoFrame& inputImage,
|
||||
virtual int Encode(
|
||||
const I420VideoFrame& inputImage,
|
||||
const CodecSpecificInfo* /*codecSpecificInfo*/,
|
||||
const std::vector<VideoFrameType>* /*frame_types*/);
|
||||
const std::vector<VideoFrameType>* /*frame_types*/) OVERRIDE;
|
||||
|
||||
// Register an encode complete callback object.
|
||||
//
|
||||
@ -60,22 +61,26 @@ class I420Encoder : public VideoEncoder {
|
||||
// - callback : Callback object which handles encoded images.
|
||||
//
|
||||
// Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
|
||||
virtual int RegisterEncodeCompleteCallback(EncodedImageCallback* callback);
|
||||
virtual int RegisterEncodeCompleteCallback(
|
||||
EncodedImageCallback* callback) OVERRIDE;
|
||||
|
||||
// Free encoder memory.
|
||||
//
|
||||
// Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
|
||||
virtual int Release();
|
||||
virtual int Release() OVERRIDE;
|
||||
|
||||
virtual int SetRates(uint32_t /*newBitRate*/, uint32_t /*frameRate*/) {
|
||||
virtual int SetRates(uint32_t /*newBitRate*/,
|
||||
uint32_t /*frameRate*/) OVERRIDE {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
virtual int SetChannelParameters(uint32_t /*packetLoss*/, int /*rtt*/) {
|
||||
virtual int SetChannelParameters(uint32_t /*packetLoss*/,
|
||||
int /*rtt*/) OVERRIDE {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
virtual int CodecConfigParameters(uint8_t* /*buffer*/, int /*size*/) {
|
||||
virtual int CodecConfigParameters(uint8_t* /*buffer*/,
|
||||
int /*size*/) OVERRIDE {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
@ -100,10 +105,10 @@ class I420Decoder : public VideoDecoder {
|
||||
// Return value : WEBRTC_VIDEO_CODEC_OK.
|
||||
// <0 - Errors
|
||||
virtual int InitDecode(const VideoCodec* codecSettings,
|
||||
int /*numberOfCores*/);
|
||||
int /*numberOfCores*/) OVERRIDE;
|
||||
|
||||
virtual int SetCodecConfigParameters(const uint8_t* /*buffer*/,
|
||||
int /*size*/) {
|
||||
int /*size*/) OVERRIDE {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
@ -123,7 +128,7 @@ class I420Decoder : public VideoDecoder {
|
||||
bool missingFrames,
|
||||
const RTPFragmentationHeader* /*fragmentation*/,
|
||||
const CodecSpecificInfo* /*codecSpecificInfo*/,
|
||||
int64_t /*renderTimeMs*/);
|
||||
int64_t /*renderTimeMs*/) OVERRIDE;
|
||||
|
||||
// Register a decode complete callback object.
|
||||
//
|
||||
@ -131,22 +136,24 @@ class I420Decoder : public VideoDecoder {
|
||||
// - callback : Callback object which handles decoded images.
|
||||
//
|
||||
// Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise.
|
||||
virtual int RegisterDecodeCompleteCallback(DecodedImageCallback* callback);
|
||||
virtual int RegisterDecodeCompleteCallback(
|
||||
DecodedImageCallback* callback) OVERRIDE;
|
||||
|
||||
// Free decoder memory.
|
||||
//
|
||||
// Return value : WEBRTC_VIDEO_CODEC_OK if OK.
|
||||
// <0 - Error
|
||||
virtual int Release();
|
||||
virtual int Release() OVERRIDE;
|
||||
|
||||
// Reset decoder state and prepare for a new call.
|
||||
//
|
||||
// Return value : WEBRTC_VIDEO_CODEC_OK.
|
||||
// <0 - Error
|
||||
virtual int Reset();
|
||||
virtual int Reset() OVERRIDE;
|
||||
|
||||
private:
|
||||
static const uint8_t* ExtractHeader(const uint8_t* buffer, uint16_t* width,
|
||||
static const uint8_t* ExtractHeader(const uint8_t* buffer,
|
||||
uint16_t* width,
|
||||
uint16_t* height);
|
||||
|
||||
I420VideoFrame _decodedImage;
|
||||
|
@ -92,7 +92,7 @@ class PacketManipulatorImpl : public PacketManipulator {
|
||||
const NetworkingConfig& config,
|
||||
bool verbose);
|
||||
virtual ~PacketManipulatorImpl();
|
||||
virtual int ManipulatePackets(webrtc::EncodedImage* encoded_image);
|
||||
virtual int ManipulatePackets(webrtc::EncodedImage* encoded_image) OVERRIDE;
|
||||
virtual void InitializeRandomSeed(unsigned int seed);
|
||||
protected:
|
||||
// Returns a uniformly distributed random value between 0.0 and 1.0
|
||||
|
@ -33,7 +33,7 @@ class PredictivePacketManipulator : public PacketManipulatorImpl {
|
||||
void AddRandomResult(double result);
|
||||
protected:
|
||||
// Returns a uniformly distributed random value between 0.0 and 1.0
|
||||
virtual double RandomUniform();
|
||||
virtual double RandomUniform() OVERRIDE;
|
||||
|
||||
private:
|
||||
std::queue<double> random_results_;
|
||||
|
@ -17,6 +17,20 @@
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
FrameStatistic::FrameStatistic()
|
||||
: encoding_successful(false),
|
||||
decoding_successful(false),
|
||||
encode_return_code(0),
|
||||
decode_return_code(0),
|
||||
encode_time_in_us(0),
|
||||
decode_time_in_us(0),
|
||||
frame_number(0),
|
||||
packets_dropped(0),
|
||||
total_packets(0),
|
||||
bit_rate_in_kbps(0),
|
||||
encoded_frame_length_in_bytes(0),
|
||||
frame_type(kDeltaFrame) {}
|
||||
|
||||
Stats::Stats() {}
|
||||
|
||||
Stats::~Stats() {}
|
||||
|
@ -20,14 +20,8 @@ namespace test {
|
||||
|
||||
// Contains statistics of a single frame that has been processed.
|
||||
struct FrameStatistic {
|
||||
FrameStatistic() :
|
||||
encoding_successful(false), decoding_successful(false),
|
||||
encode_return_code(0), decode_return_code(0),
|
||||
encode_time_in_us(0), decode_time_in_us(0),
|
||||
frame_number(0), packets_dropped(0), total_packets(0),
|
||||
bit_rate_in_kbps(0), encoded_frame_length_in_bytes(0),
|
||||
frame_type(kDeltaFrame) {
|
||||
};
|
||||
FrameStatistic();
|
||||
|
||||
bool encoding_successful;
|
||||
bool decoding_successful;
|
||||
int encode_return_code;
|
||||
@ -35,7 +29,7 @@ struct FrameStatistic {
|
||||
int encode_time_in_us;
|
||||
int decode_time_in_us;
|
||||
int frame_number;
|
||||
// How many packets were discarded of the encoded frame data (if any)
|
||||
// How many packets were discarded of the encoded frame data (if any).
|
||||
int packets_dropped;
|
||||
int total_packets;
|
||||
|
||||
|
@ -20,6 +20,23 @@
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
|
||||
TestConfig::TestConfig()
|
||||
: name(""),
|
||||
description(""),
|
||||
test_number(0),
|
||||
input_filename(""),
|
||||
output_filename(""),
|
||||
output_dir("out"),
|
||||
networking_config(),
|
||||
exclude_frame_types(kExcludeOnlyFirstKeyFrame),
|
||||
frame_length_in_bytes(-1),
|
||||
use_single_core(false),
|
||||
keyframe_interval(0),
|
||||
codec_settings(NULL),
|
||||
verbose(true) {}
|
||||
|
||||
TestConfig::~TestConfig() {}
|
||||
|
||||
VideoProcessorImpl::VideoProcessorImpl(webrtc::VideoEncoder* encoder,
|
||||
webrtc::VideoDecoder* decoder,
|
||||
FrameReader* frame_reader,
|
||||
|
@ -40,13 +40,8 @@ const char* ExcludeFrameTypesToStr(ExcludeFrameTypes e);
|
||||
|
||||
// Test configuration for a test run
|
||||
struct TestConfig {
|
||||
TestConfig()
|
||||
: name(""), description(""), test_number(0),
|
||||
input_filename(""), output_filename(""), output_dir("out"),
|
||||
networking_config(), exclude_frame_types(kExcludeOnlyFirstKeyFrame),
|
||||
frame_length_in_bytes(-1), use_single_core(false), keyframe_interval(0),
|
||||
codec_settings(NULL), verbose(true) {
|
||||
};
|
||||
TestConfig();
|
||||
~TestConfig();
|
||||
|
||||
// Name of the test. This is purely metadata and does not affect
|
||||
// the test in any way.
|
||||
@ -168,8 +163,8 @@ class VideoProcessorImpl : public VideoProcessor {
|
||||
const TestConfig& config,
|
||||
Stats* stats);
|
||||
virtual ~VideoProcessorImpl();
|
||||
virtual bool Init();
|
||||
virtual bool ProcessFrame(int frame_number);
|
||||
virtual bool Init() OVERRIDE;
|
||||
virtual bool ProcessFrame(int frame_number) OVERRIDE;
|
||||
|
||||
private:
|
||||
// Invoked by the callback when a frame has completed encoding.
|
||||
@ -181,13 +176,13 @@ class VideoProcessorImpl : public VideoProcessor {
|
||||
int GetElapsedTimeMicroseconds(const webrtc::TickTime& start,
|
||||
const webrtc::TickTime& stop);
|
||||
// Updates the encoder with the target bit rate and the frame rate.
|
||||
void SetRates(int bit_rate, int frame_rate);
|
||||
virtual void SetRates(int bit_rate, int frame_rate) OVERRIDE;
|
||||
// Return the size of the encoded frame in bytes.
|
||||
int EncodedFrameSize();
|
||||
virtual int EncodedFrameSize() OVERRIDE;
|
||||
// Return the number of dropped frames.
|
||||
int NumberDroppedFrames();
|
||||
virtual int NumberDroppedFrames() OVERRIDE;
|
||||
// Return the number of spatial resizes.
|
||||
int NumberSpatialResizes();
|
||||
virtual int NumberSpatialResizes() OVERRIDE;
|
||||
|
||||
webrtc::VideoEncoder* encoder_;
|
||||
webrtc::VideoDecoder* decoder_;
|
||||
@ -229,11 +224,11 @@ class VideoProcessorImpl : public VideoProcessor {
|
||||
: public webrtc::EncodedImageCallback {
|
||||
public:
|
||||
explicit VideoProcessorEncodeCompleteCallback(VideoProcessorImpl* vp)
|
||||
: video_processor_(vp) {
|
||||
}
|
||||
int32_t Encoded(webrtc::EncodedImage& encoded_image,
|
||||
: video_processor_(vp) {}
|
||||
virtual int32_t Encoded(
|
||||
webrtc::EncodedImage& encoded_image,
|
||||
const webrtc::CodecSpecificInfo* codec_specific_info = NULL,
|
||||
const webrtc::RTPFragmentationHeader* fragmentation = NULL);
|
||||
const webrtc::RTPFragmentationHeader* fragmentation = NULL) OVERRIDE;
|
||||
|
||||
private:
|
||||
VideoProcessorImpl* video_processor_;
|
||||
@ -246,7 +241,7 @@ class VideoProcessorImpl : public VideoProcessor {
|
||||
explicit VideoProcessorDecodeCompleteCallback(VideoProcessorImpl* vp)
|
||||
: video_processor_(vp) {
|
||||
}
|
||||
int32_t Decoded(webrtc::I420VideoFrame& image);
|
||||
virtual int32_t Decoded(webrtc::I420VideoFrame& image) OVERRIDE;
|
||||
|
||||
private:
|
||||
VideoProcessorImpl* video_processor_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user