Fixes build errors in the VCM tests introduced with r140.

Also fixes a memory problem in mt_rx_tx_test.
Review URL: http://webrtc-codereview.appspot.com/62004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@183 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
holmer@google.com 2011-07-08 12:44:58 +00:00
parent 362b3e5811
commit 12c9df1a69
7 changed files with 60 additions and 41 deletions

View File

@ -562,12 +562,14 @@ RTPSendCallback_SizeTest::AveragePayloadSize() const
}
WebRtc_Word32
VCMEncComplete_KeyReqTest::SendData(const FrameType frameType,
VCMEncComplete_KeyReqTest::SendData(
const FrameType frameType,
const WebRtc_UWord8 payloadType,
const WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData,
const WebRtc_UWord32 payloadSize,
const RTPFragmentationHeader& fragmentationHeader)
const RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
{
WebRtcRTPHeader rtpInfo;
rtpInfo.header.markerBit = true; // end of frame

View File

@ -85,12 +85,14 @@ class VCMEncComplete_KeyReqTest : public webrtc::VCMPacketizationCallback
{
public:
VCMEncComplete_KeyReqTest(webrtc::VideoCodingModule &vcm) : _vcm(vcm), _seqNo(0), _timeStamp(0) {}
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
WebRtc_Word32 SendData(
const webrtc::FrameType frameType,
const WebRtc_UWord8 payloadType,
const WebRtc_UWord32 timeStamp,
WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData,
const WebRtc_UWord32 payloadSize,
const webrtc::RTPFragmentationHeader& fragmentationHeader);
const webrtc::RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr);
private:
webrtc::VideoCodingModule& _vcm;
WebRtc_UWord16 _seqNo;

View File

@ -47,7 +47,7 @@ MainSenderThread(void* obj)
{
printf ("Error when opening file \n");
delete &waitEvent;
delete tmpBuffer;
delete [] tmpBuffer;
return false;
}
}
@ -66,14 +66,14 @@ MainSenderThread(void* obj)
{
printf("Add Frame error: %d\n", ret);
delete &waitEvent;
delete tmpBuffer;
delete [] tmpBuffer;
return false;
}
waitEvent.Wait(33);
}
delete &waitEvent;
delete tmpBuffer;
delete [] tmpBuffer;
return true;
}

View File

@ -65,12 +65,14 @@ VCMNTEncodeCompleteCallback::RegisterTransportCallback(VCMPacketizationCallback*
}
WebRtc_Word32
VCMNTEncodeCompleteCallback::SendData(const FrameType frameType,
VCMNTEncodeCompleteCallback::SendData(
const FrameType frameType,
const WebRtc_UWord8 payloadType,
const WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData,
const WebRtc_UWord32 payloadSize,
const RTPFragmentationHeader& fragmentationHeader)
const RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
{
// will call the VCMReceiver input packet

View File

@ -34,7 +34,8 @@ public:
const WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData,
const WebRtc_UWord32 payloadSize,
const webrtc::RTPFragmentationHeader& fragmentationHeader);
const webrtc::RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr);
// Register exisitng VCM. Currently - encode and decode with the same vcm module.
void RegisterReceiverVCM(webrtc::VideoCodingModule *vcm);

View File

@ -43,12 +43,14 @@ VCMEncodeCompleteCallback::RegisterTransportCallback(VCMPacketizationCallback* t
}
WebRtc_Word32
VCMEncodeCompleteCallback::SendData(const FrameType frameType,
VCMEncodeCompleteCallback::SendData(
const FrameType frameType,
const WebRtc_UWord8 payloadType,
const WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData,
const WebRtc_UWord32 payloadSize,
const RTPFragmentationHeader& fragmentationHeader)
const RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
{
// will call the VCMReceiver input packet
_frameType = frameType;
@ -124,18 +126,26 @@ VCMEncodeCompleteCallback::ResetByteCount()
// Packetization callback implmentation
WebRtc_Word32
VCMRTPEncodeCompleteCallback::SendData(const FrameType frameType,
VCMRTPEncodeCompleteCallback::SendData(
const FrameType frameType,
const WebRtc_UWord8 payloadType,
const WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData,
const WebRtc_UWord32 payloadSize,
const RTPFragmentationHeader& fragmentationHeader)
const RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
{
_frameType = frameType;
_encodedBytes+= payloadSize;
_encodeComplete = true;
//printf("encoded = %d Bytes\n", payloadSize);
return _RTPModule->SendOutgoingData(frameType, payloadType, timeStamp, payloadData, payloadSize, &fragmentationHeader);
return _RTPModule->SendOutgoingData(frameType,
payloadType,
timeStamp,
payloadData,
payloadSize,
&fragmentationHeader,
videoTypeHdr);
}
float

View File

@ -74,7 +74,8 @@ public:
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
const WebRtc_UWord8 payloadType, const WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData, const WebRtc_UWord32 payloadSize,
const webrtc::RTPFragmentationHeader& fragmentationHeader);
const webrtc::RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr);
// Register exisitng VCM. Currently - encode and decode with the same vcm module.
void RegisterReceiverVCM(webrtc::VideoCodingModule *vcm) { _VCMReceiver = vcm; }
// Return size of last encoded frame encoded data (all frames in the sequence)
@ -123,7 +124,8 @@ public:
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
const WebRtc_UWord8 payloadType, const WebRtc_UWord32 timeStamp,
const WebRtc_UWord8* payloadData, const WebRtc_UWord32 payloadSize,
const webrtc::RTPFragmentationHeader& fragmentationHeader);
const webrtc::RTPFragmentationHeader& fragmentationHeader,
const webrtc::RTPVideoTypeHeader* videoTypeHdr);
// Return size of last encoded frame. Value good for one call
// (resets to zero after call to inform test of frame drop)
float EncodedBytes();