diff --git a/src/modules/video_coding/codecs/test_framework/normal_test.cc b/src/modules/video_coding/codecs/test_framework/normal_test.cc index 0cc20efb8e..2dd7bce2fd 100644 --- a/src/modules/video_coding/codecs/test_framework/normal_test.cc +++ b/src/modules/video_coding/codecs/test_framework/normal_test.cc @@ -235,7 +235,7 @@ NormalTest::Encode() } int -NormalTest::Decode() +NormalTest::Decode(int lossValue) { _encodedVideoBuffer.SetWidth(_inst.width); _encodedVideoBuffer.SetHeight(_inst.height); diff --git a/src/modules/video_coding/codecs/test_framework/normal_test.h b/src/modules/video_coding/codecs/test_framework/normal_test.h index c7bb676f62..0dcd9c269e 100644 --- a/src/modules/video_coding/codecs/test_framework/normal_test.h +++ b/src/modules/video_coding/codecs/test_framework/normal_test.h @@ -26,7 +26,7 @@ protected: virtual void Setup(); virtual void Teardown(); virtual bool Encode(); - virtual int Decode(); + virtual int Decode(int lossValue = 0); virtual void CodecSpecific_InitBitrate()=0; virtual int DoPacketLoss() {return 0;}; diff --git a/src/modules/video_coding/main/test/generic_codec_test.h b/src/modules/video_coding/main/test/generic_codec_test.h index f8eff1aa36..f7217007f5 100644 --- a/src/modules/video_coding/main/test/generic_codec_test.h +++ b/src/modules/video_coding/main/test/generic_codec_test.h @@ -26,6 +26,9 @@ Test consists of: 4. Decoder control test / General API functionality */ + +namespace webrtc { + int VCMGenericCodecTest(CmdArgs& args); class GenericCodecTest @@ -97,4 +100,6 @@ private: WebRtc_UWord32 _timeStamp; }; // end of VCMEncodeCompleteCallback +} // namespace webrtc + #endif // WEBRTC_MODULES_VIDEO_CODING_TEST_GENERIC_CODEC_TEST_H_ diff --git a/src/modules/video_coding/main/test/media_opt_test.h b/src/modules/video_coding/main/test/media_opt_test.h index e2bc6f8d04..6f1981cd0f 100644 --- a/src/modules/video_coding/main/test/media_opt_test.h +++ b/src/modules/video_coding/main/test/media_opt_test.h @@ -20,8 +20,6 @@ #include "video_coding.h" #include "video_source.h" -using namespace std; - // media optimization test // This test simulates a complete encode-decode cycle via the RTP module. // allows error resilience tests, packet loss tests, etc. @@ -76,7 +74,7 @@ private: WebRtc_Word32 _frameCnt; float _sumEncBytes; WebRtc_Word32 _numFramesDropped; - string _codecName; + std::string _codecName; webrtc::VideoCodecType _sendCodecType; WebRtc_Word32 _numberOfCores; diff --git a/src/modules/video_coding/main/test/mt_test_common.cc b/src/modules/video_coding/main/test/mt_test_common.cc index 0af731c301..7addb876b9 100644 --- a/src/modules/video_coding/main/test/mt_test_common.cc +++ b/src/modules/video_coding/main/test/mt_test_common.cc @@ -14,6 +14,7 @@ #include "rtp_dump.h" +namespace webrtc { TransportCallback::TransportCallback(webrtc::RtpRtcp* rtp, const char* filename): @@ -130,3 +131,5 @@ bool TransportThread(void *obj) state->_transport.TransportPackets(); return true; } + +} // namespace webrtc diff --git a/src/modules/video_coding/main/test/mt_test_common.h b/src/modules/video_coding/main/test/mt_test_common.h index 6dcbceda95..5863d048ca 100644 --- a/src/modules/video_coding/main/test/mt_test_common.h +++ b/src/modules/video_coding/main/test/mt_test_common.h @@ -20,7 +20,7 @@ #include "test_util.h" #include "video_coding.h" -using namespace webrtc; +namespace webrtc { class SendSharedState { @@ -83,5 +83,6 @@ bool VCMProcessingThread(void* obj); bool VCMDecodeThread(void* obj); bool TransportThread(void *obj); +} // namespace webrtc #endif // WEBRTC_MODULES_VIDEO_CODING_TEST_MT_TEST_COMMON_H_ diff --git a/src/modules/video_coding/main/test/test_callbacks.cc b/src/modules/video_coding/main/test/test_callbacks.cc index 4a4fe004bf..0dd9be3cdd 100644 --- a/src/modules/video_coding/main/test/test_callbacks.cc +++ b/src/modules/video_coding/main/test/test_callbacks.cc @@ -15,6 +15,8 @@ #include "rtp_dump.h" #include "test_macros.h" +namespace webrtc { + /****************************** * VCMEncodeCompleteCallback *****************************/ @@ -503,14 +505,13 @@ VideoProtectionCallback::FECKeyUepProtection() void RTPFeedbackCallback::OnNetworkChanged(const WebRtc_Word32 id, - const WebRtc_UWord16 bitrateTargetKbit, + const WebRtc_UWord32 bitrateBps, const WebRtc_UWord8 fractionLost, - const WebRtc_UWord16 roundTripTimeMs, - const WebRtc_UWord32 jitterMS, - const WebRtc_UWord16 bwEstimateKbitMin, - const WebRtc_UWord16 bwEstimateKbitMax) + const WebRtc_UWord16 roundTripTimeMs) { - _vcm->SetChannelParameters(bitrateTargetKbit, fractionLost, + _vcm->SetChannelParameters(bitrateBps / 1000, fractionLost, (WebRtc_UWord8)roundTripTimeMs); } + +} // namespace webrtc diff --git a/src/modules/video_coding/main/test/test_callbacks.h b/src/modules/video_coding/main/test/test_callbacks.h index 637ab96798..deb24b4bc3 100644 --- a/src/modules/video_coding/main/test/test_callbacks.h +++ b/src/modules/video_coding/main/test/test_callbacks.h @@ -28,12 +28,9 @@ #include "trace.h" #include "video_coding.h" -using namespace webrtc; - namespace webrtc { class RtpDump; -} // Send Side - Packetization callback - send an encoded frame to the VCMReceiver class VCMEncodeCompleteCallback: public VCMPacketizationCallback @@ -238,7 +235,7 @@ class VideoProtectionCallback: public VCMProtectionCallback public: VideoProtectionCallback(); virtual ~VideoProtectionCallback(); - void RegisterRtpModule(RtpRtcp* rtp){_rtp = rtp;} + void RegisterRtpModule(RtpRtcp* rtp) {_rtp = rtp;} WebRtc_Word32 ProtectionRequest(const WebRtc_UWord8 deltaFECRate, const WebRtc_UWord8 keyFECRate, const bool deltaUseUepProtection, @@ -259,23 +256,22 @@ private: }; // Feed back from the RTP Module callback -class RTPFeedbackCallback: public RtpVideoFeedback -{ -public: - RTPFeedbackCallback(VideoCodingModule* vcm) {_vcm = vcm;}; - void OnReceivedIntraFrameRequest(const WebRtc_Word32 id, - const WebRtc_UWord8 message = 0){}; +class RTPFeedbackCallback : public RtpVideoFeedback { + public: + RTPFeedbackCallback(VideoCodingModule* vcm) {_vcm = vcm;}; + void OnReceivedIntraFrameRequest(const WebRtc_Word32 id, + const FrameType type, + const WebRtc_UWord8 streamIdx) {}; void OnNetworkChanged(const WebRtc_Word32 id, - const WebRtc_UWord16 bitrateTargetKbit, - const WebRtc_UWord8 fractionLost, - const WebRtc_UWord16 roundTripTimeMs, - const WebRtc_UWord32 jitterMS, - const WebRtc_UWord16 bwEstimateKbitMin, - const WebRtc_UWord16 bwEstimateKbitMax); -private: - VideoCodingModule* _vcm; + const WebRtc_UWord32 bitrateBps, + const WebRtc_UWord8 fractionLost, + const WebRtc_UWord16 roundTripTimeMs); + + private: + VideoCodingModule* _vcm; }; +} // namespace webrtc #endif