Follow-up fix for r3681.
TESTS=trybots and vie_auto_test BUG=1514 Review URL: https://webrtc-codereview.appspot.com/1216006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3689 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -317,7 +317,8 @@ GenericCodecTest::Perform(CmdArgs& args)
|
||||
_frameCnt = 0;
|
||||
totalBytes = 0;
|
||||
_encodeCompleteCallback->Initialize();
|
||||
sendStats.SetTargetFrameRate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_framerate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_bitrate(1000 * _bitRate);
|
||||
_vcm->RegisterSendStatisticsCallback(&sendStats);
|
||||
while (fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) ==
|
||||
_lengthSourceFrame)
|
||||
@ -436,7 +437,8 @@ GenericCodecTest::Perform(CmdArgs& args)
|
||||
// up to here
|
||||
_vcm->SetChannelParameters(static_cast<uint32_t>(1000 * _bitRate), 0, 20);
|
||||
_encodeCompleteCallback->Initialize();
|
||||
sendStats.SetTargetFrameRate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_framerate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_bitrate(1000 * _bitRate);
|
||||
_vcm->RegisterSendStatisticsCallback(&sendStats);
|
||||
rewind(_sourceFile);
|
||||
while (fread(tmpBuffer, 1, _lengthSourceFrame, _sourceFile) ==
|
||||
|
||||
@ -281,7 +281,8 @@ NormalTest::Perform(const CmdArgs& args)
|
||||
_vcm->SetChannelParameters(static_cast<uint32_t>(1000 * _bitRate), 0, 0);
|
||||
|
||||
SendStatsTest sendStats;
|
||||
sendStats.SetTargetFrameRate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_framerate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_bitrate(1000 * _bitRate);
|
||||
_vcm->RegisterSendStatisticsCallback(&sendStats);
|
||||
|
||||
while (feof(_sourceFile) == 0) {
|
||||
|
||||
@ -242,7 +242,8 @@ QualityModesTest::Perform(const CmdArgs& args)
|
||||
_vcm->SetChannelParameters(static_cast<uint32_t>(1000 * _bitRate), 0, 0);
|
||||
|
||||
SendStatsTest sendStats;
|
||||
sendStats.SetTargetFrameRate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_framerate(static_cast<WebRtc_UWord32>(_frameRate));
|
||||
sendStats.set_bitrate(1000 * _bitRate);
|
||||
_vcm->RegisterSendStatisticsCallback(&sendStats);
|
||||
|
||||
VideoContentMetrics* contentMetrics = NULL;
|
||||
|
||||
@ -408,8 +408,8 @@ WebRtc_Word32
|
||||
SendStatsTest::SendStatistics(const WebRtc_UWord32 bitRate,
|
||||
const WebRtc_UWord32 frameRate)
|
||||
{
|
||||
TEST(frameRate <= _frameRate);
|
||||
TEST(bitRate > 0 && bitRate < 100000);
|
||||
TEST(frameRate <= _framerate);
|
||||
TEST(bitRate > _bitrate / 2 && bitRate < 3 * _bitrate / 2);
|
||||
printf("VCM 1 sec: Bit rate: %u\tFrame rate: %u\n", bitRate, frameRate);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -223,12 +223,14 @@ public:
|
||||
class SendStatsTest: public webrtc::VCMSendStatisticsCallback
|
||||
{
|
||||
public:
|
||||
SendStatsTest() : _frameRate(15) {}
|
||||
SendStatsTest() : _framerate(15), _bitrate(500) {}
|
||||
WebRtc_Word32 SendStatistics(const WebRtc_UWord32 bitRate,
|
||||
const WebRtc_UWord32 frameRate);
|
||||
void SetTargetFrameRate(WebRtc_UWord32 frameRate) {_frameRate = frameRate;}
|
||||
void set_framerate(WebRtc_UWord32 frameRate) {_framerate = frameRate;}
|
||||
void set_bitrate(uint32_t bitrate) {_bitrate = bitrate;}
|
||||
private:
|
||||
WebRtc_UWord32 _frameRate;
|
||||
WebRtc_UWord32 _framerate;
|
||||
uint32_t _bitrate;
|
||||
};
|
||||
|
||||
// Protection callback - allows the VCM (media optimization) to inform the RTP
|
||||
|
||||
Reference in New Issue
Block a user