WebRtc_Word32 => int32_t in video_coding/
BUG=314 Review URL: https://webrtc-codereview.appspot.com/1203008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3778 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -75,7 +75,7 @@ FrameDropper::Enable(bool enable)
|
||||
}
|
||||
|
||||
void
|
||||
FrameDropper::Fill(WebRtc_UWord32 frameSizeBytes, bool deltaFrame)
|
||||
FrameDropper::Fill(uint32_t frameSizeBytes, bool deltaFrame)
|
||||
{
|
||||
if (!_enabled)
|
||||
{
|
||||
@ -104,12 +104,12 @@ FrameDropper::Fill(WebRtc_UWord32 frameSizeBytes, bool deltaFrame)
|
||||
// how much we allow the key frame compensation to be spread
|
||||
// out in time. Therefor we must use the key frame ratio rather
|
||||
// than keyFrameSpreadFrames.
|
||||
_keyFrameCount = static_cast<WebRtc_Word32>(1 / _keyFrameRatio.Value() + 0.5);
|
||||
_keyFrameCount = static_cast<int32_t>(1 / _keyFrameRatio.Value() + 0.5);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Compensate for the key frame the following frames
|
||||
_keyFrameCount = static_cast<WebRtc_Word32>(_keyFrameSpreadFrames + 0.5);
|
||||
_keyFrameCount = static_cast<int32_t>(_keyFrameSpreadFrames + 0.5);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -123,7 +123,7 @@ FrameDropper::Fill(WebRtc_UWord32 frameSizeBytes, bool deltaFrame)
|
||||
}
|
||||
|
||||
void
|
||||
FrameDropper::Leak(WebRtc_UWord32 inputFrameRate)
|
||||
FrameDropper::Leak(uint32_t inputFrameRate)
|
||||
{
|
||||
if (!_enabled)
|
||||
{
|
||||
@ -164,7 +164,7 @@ FrameDropper::Leak(WebRtc_UWord32 inputFrameRate)
|
||||
}
|
||||
|
||||
void
|
||||
FrameDropper::UpdateNack(WebRtc_UWord32 nackBytes)
|
||||
FrameDropper::UpdateNack(uint32_t nackBytes)
|
||||
{
|
||||
if (!_enabled)
|
||||
{
|
||||
@ -241,7 +241,7 @@ FrameDropper::DropFrame()
|
||||
{
|
||||
denom = (float)1e-5;
|
||||
}
|
||||
WebRtc_Word32 limit = static_cast<WebRtc_Word32>(1.0f / denom - 1.0f + 0.5f);
|
||||
int32_t limit = static_cast<int32_t>(1.0f / denom - 1.0f + 0.5f);
|
||||
// Put a bound on the max amount of dropped frames between each kept
|
||||
// frame, in terms of frame rate and window size (secs).
|
||||
int max_limit = static_cast<int>(_incoming_frame_rate *
|
||||
@ -284,7 +284,7 @@ FrameDropper::DropFrame()
|
||||
{
|
||||
denom = (float)1e-5;
|
||||
}
|
||||
WebRtc_Word32 limit = -static_cast<WebRtc_Word32>(1.0f / denom - 1.0f + 0.5f);
|
||||
int32_t limit = -static_cast<int32_t>(1.0f / denom - 1.0f + 0.5f);
|
||||
if (_dropCount > 0)
|
||||
{
|
||||
// Reset the _dropCount since we have a positive
|
||||
@ -344,7 +344,7 @@ FrameDropper::SetRates(float bitRate, float incoming_frame_rate)
|
||||
}
|
||||
|
||||
float
|
||||
FrameDropper::ActualFrameRate(WebRtc_UWord32 inputFrameRate) const
|
||||
FrameDropper::ActualFrameRate(uint32_t inputFrameRate) const
|
||||
{
|
||||
if (!_enabled)
|
||||
{
|
||||
|
||||
@ -49,11 +49,11 @@ public:
|
||||
// returned from the encoder.
|
||||
// - deltaFrame : True if the encoder returned
|
||||
// a key frame.
|
||||
virtual void Fill(WebRtc_UWord32 frameSizeBytes, bool deltaFrame);
|
||||
virtual void Fill(uint32_t frameSizeBytes, bool deltaFrame);
|
||||
|
||||
virtual void Leak(WebRtc_UWord32 inputFrameRate);
|
||||
virtual void Leak(uint32_t inputFrameRate);
|
||||
|
||||
void UpdateNack(WebRtc_UWord32 nackBytes);
|
||||
void UpdateNack(uint32_t nackBytes);
|
||||
|
||||
// Sets the target bit rate and the frame rate produced by
|
||||
// the camera.
|
||||
@ -65,7 +65,7 @@ public:
|
||||
// Return value : The current average frame rate produced
|
||||
// if the DropFrame() function is used as
|
||||
// instruction of when to drop frames.
|
||||
virtual float ActualFrameRate(WebRtc_UWord32 inputFrameRate) const;
|
||||
virtual float ActualFrameRate(uint32_t inputFrameRate) const;
|
||||
|
||||
private:
|
||||
void FillBucket(float inKbits, float outKbits);
|
||||
@ -75,13 +75,13 @@ private:
|
||||
VCMExpFilter _keyFrameSizeAvgKbits;
|
||||
VCMExpFilter _keyFrameRatio;
|
||||
float _keyFrameSpreadFrames;
|
||||
WebRtc_Word32 _keyFrameCount;
|
||||
int32_t _keyFrameCount;
|
||||
float _accumulator;
|
||||
float _accumulatorMax;
|
||||
float _targetBitRate;
|
||||
bool _dropNext;
|
||||
VCMExpFilter _dropRatio;
|
||||
WebRtc_Word32 _dropCount;
|
||||
int32_t _dropCount;
|
||||
float _windowSize;
|
||||
float _incoming_frame_rate;
|
||||
bool _wasBelowMax;
|
||||
|
||||
@ -27,13 +27,13 @@ class MockFrameDropper : public FrameDropper {
|
||||
MOCK_METHOD0(DropFrame,
|
||||
bool());
|
||||
MOCK_METHOD2(Fill,
|
||||
void(WebRtc_UWord32 frameSizeBytes, bool deltaFrame));
|
||||
void(uint32_t frameSizeBytes, bool deltaFrame));
|
||||
MOCK_METHOD1(Leak,
|
||||
void(WebRtc_UWord32 inputFrameRate));
|
||||
void(uint32_t inputFrameRate));
|
||||
MOCK_METHOD2(SetRates,
|
||||
void(float bitRate, float incoming_frame_rate));
|
||||
MOCK_CONST_METHOD1(ActualFrameRate,
|
||||
float(WebRtc_UWord32 inputFrameRate));
|
||||
float(uint32_t inputFrameRate));
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
Reference in New Issue
Block a user