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:
parent
362b3e5811
commit
12c9df1a69
@ -562,12 +562,14 @@ RTPSendCallback_SizeTest::AveragePayloadSize() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32
|
WebRtc_Word32
|
||||||
VCMEncComplete_KeyReqTest::SendData(const FrameType frameType,
|
VCMEncComplete_KeyReqTest::SendData(
|
||||||
const WebRtc_UWord8 payloadType,
|
const FrameType frameType,
|
||||||
const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord8 payloadType,
|
||||||
const WebRtc_UWord8* payloadData,
|
const WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord32 payloadSize,
|
const WebRtc_UWord8* payloadData,
|
||||||
const RTPFragmentationHeader& fragmentationHeader)
|
const WebRtc_UWord32 payloadSize,
|
||||||
|
const RTPFragmentationHeader& fragmentationHeader,
|
||||||
|
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
|
||||||
{
|
{
|
||||||
WebRtcRTPHeader rtpInfo;
|
WebRtcRTPHeader rtpInfo;
|
||||||
rtpInfo.header.markerBit = true; // end of frame
|
rtpInfo.header.markerBit = true; // end of frame
|
||||||
|
@ -85,12 +85,14 @@ class VCMEncComplete_KeyReqTest : public webrtc::VCMPacketizationCallback
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VCMEncComplete_KeyReqTest(webrtc::VideoCodingModule &vcm) : _vcm(vcm), _seqNo(0), _timeStamp(0) {}
|
VCMEncComplete_KeyReqTest(webrtc::VideoCodingModule &vcm) : _vcm(vcm), _seqNo(0), _timeStamp(0) {}
|
||||||
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
|
WebRtc_Word32 SendData(
|
||||||
const WebRtc_UWord8 payloadType,
|
const webrtc::FrameType frameType,
|
||||||
const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord8 payloadType,
|
||||||
const WebRtc_UWord8* payloadData,
|
WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord32 payloadSize,
|
const WebRtc_UWord8* payloadData,
|
||||||
const webrtc::RTPFragmentationHeader& fragmentationHeader);
|
const WebRtc_UWord32 payloadSize,
|
||||||
|
const webrtc::RTPFragmentationHeader& fragmentationHeader,
|
||||||
|
const webrtc::RTPVideoTypeHeader* videoTypeHdr);
|
||||||
private:
|
private:
|
||||||
webrtc::VideoCodingModule& _vcm;
|
webrtc::VideoCodingModule& _vcm;
|
||||||
WebRtc_UWord16 _seqNo;
|
WebRtc_UWord16 _seqNo;
|
||||||
|
@ -47,7 +47,7 @@ MainSenderThread(void* obj)
|
|||||||
{
|
{
|
||||||
printf ("Error when opening file \n");
|
printf ("Error when opening file \n");
|
||||||
delete &waitEvent;
|
delete &waitEvent;
|
||||||
delete tmpBuffer;
|
delete [] tmpBuffer;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -66,14 +66,14 @@ MainSenderThread(void* obj)
|
|||||||
{
|
{
|
||||||
printf("Add Frame error: %d\n", ret);
|
printf("Add Frame error: %d\n", ret);
|
||||||
delete &waitEvent;
|
delete &waitEvent;
|
||||||
delete tmpBuffer;
|
delete [] tmpBuffer;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
waitEvent.Wait(33);
|
waitEvent.Wait(33);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete &waitEvent;
|
delete &waitEvent;
|
||||||
delete tmpBuffer;
|
delete [] tmpBuffer;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -65,12 +65,14 @@ VCMNTEncodeCompleteCallback::RegisterTransportCallback(VCMPacketizationCallback*
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32
|
WebRtc_Word32
|
||||||
VCMNTEncodeCompleteCallback::SendData(const FrameType frameType,
|
VCMNTEncodeCompleteCallback::SendData(
|
||||||
const WebRtc_UWord8 payloadType,
|
const FrameType frameType,
|
||||||
const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord8 payloadType,
|
||||||
const WebRtc_UWord8* payloadData,
|
const WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord32 payloadSize,
|
const WebRtc_UWord8* payloadData,
|
||||||
const RTPFragmentationHeader& fragmentationHeader)
|
const WebRtc_UWord32 payloadSize,
|
||||||
|
const RTPFragmentationHeader& fragmentationHeader,
|
||||||
|
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
|
||||||
|
|
||||||
{
|
{
|
||||||
// will call the VCMReceiver input packet
|
// will call the VCMReceiver input packet
|
||||||
|
@ -30,11 +30,12 @@ public:
|
|||||||
void RegisterTransportCallback(webrtc::VCMPacketizationCallback* transport);
|
void RegisterTransportCallback(webrtc::VCMPacketizationCallback* transport);
|
||||||
// process encoded data received from the encoder, pass stream to the VCMReceiver module
|
// process encoded data received from the encoder, pass stream to the VCMReceiver module
|
||||||
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
|
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
|
||||||
const WebRtc_UWord8 payloadType,
|
const WebRtc_UWord8 payloadType,
|
||||||
const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord8* payloadData,
|
const WebRtc_UWord8* payloadData,
|
||||||
const WebRtc_UWord32 payloadSize,
|
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.
|
// Register exisitng VCM. Currently - encode and decode with the same vcm module.
|
||||||
void RegisterReceiverVCM(webrtc::VideoCodingModule *vcm);
|
void RegisterReceiverVCM(webrtc::VideoCodingModule *vcm);
|
||||||
|
@ -43,12 +43,14 @@ VCMEncodeCompleteCallback::RegisterTransportCallback(VCMPacketizationCallback* t
|
|||||||
}
|
}
|
||||||
|
|
||||||
WebRtc_Word32
|
WebRtc_Word32
|
||||||
VCMEncodeCompleteCallback::SendData(const FrameType frameType,
|
VCMEncodeCompleteCallback::SendData(
|
||||||
const WebRtc_UWord8 payloadType,
|
const FrameType frameType,
|
||||||
const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord8 payloadType,
|
||||||
const WebRtc_UWord8* payloadData,
|
const WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord32 payloadSize,
|
const WebRtc_UWord8* payloadData,
|
||||||
const RTPFragmentationHeader& fragmentationHeader)
|
const WebRtc_UWord32 payloadSize,
|
||||||
|
const RTPFragmentationHeader& fragmentationHeader,
|
||||||
|
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
|
||||||
{
|
{
|
||||||
// will call the VCMReceiver input packet
|
// will call the VCMReceiver input packet
|
||||||
_frameType = frameType;
|
_frameType = frameType;
|
||||||
@ -124,18 +126,26 @@ VCMEncodeCompleteCallback::ResetByteCount()
|
|||||||
// Packetization callback implmentation
|
// Packetization callback implmentation
|
||||||
|
|
||||||
WebRtc_Word32
|
WebRtc_Word32
|
||||||
VCMRTPEncodeCompleteCallback::SendData(const FrameType frameType,
|
VCMRTPEncodeCompleteCallback::SendData(
|
||||||
const WebRtc_UWord8 payloadType,
|
const FrameType frameType,
|
||||||
const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord8 payloadType,
|
||||||
const WebRtc_UWord8* payloadData,
|
const WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord32 payloadSize,
|
const WebRtc_UWord8* payloadData,
|
||||||
const RTPFragmentationHeader& fragmentationHeader)
|
const WebRtc_UWord32 payloadSize,
|
||||||
|
const RTPFragmentationHeader& fragmentationHeader,
|
||||||
|
const webrtc::RTPVideoTypeHeader* videoTypeHdr)
|
||||||
{
|
{
|
||||||
_frameType = frameType;
|
_frameType = frameType;
|
||||||
_encodedBytes+= payloadSize;
|
_encodedBytes+= payloadSize;
|
||||||
_encodeComplete = true;
|
_encodeComplete = true;
|
||||||
//printf("encoded = %d Bytes\n", payloadSize);
|
//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
|
float
|
||||||
|
@ -74,7 +74,8 @@ public:
|
|||||||
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
|
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
|
||||||
const WebRtc_UWord8 payloadType, const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord8 payloadType, const WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord8* payloadData, const WebRtc_UWord32 payloadSize,
|
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.
|
// Register exisitng VCM. Currently - encode and decode with the same vcm module.
|
||||||
void RegisterReceiverVCM(webrtc::VideoCodingModule *vcm) { _VCMReceiver = vcm; }
|
void RegisterReceiverVCM(webrtc::VideoCodingModule *vcm) { _VCMReceiver = vcm; }
|
||||||
// Return size of last encoded frame encoded data (all frames in the sequence)
|
// 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,
|
WebRtc_Word32 SendData(const webrtc::FrameType frameType,
|
||||||
const WebRtc_UWord8 payloadType, const WebRtc_UWord32 timeStamp,
|
const WebRtc_UWord8 payloadType, const WebRtc_UWord32 timeStamp,
|
||||||
const WebRtc_UWord8* payloadData, const WebRtc_UWord32 payloadSize,
|
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
|
// Return size of last encoded frame. Value good for one call
|
||||||
// (resets to zero after call to inform test of frame drop)
|
// (resets to zero after call to inform test of frame drop)
|
||||||
float EncodedBytes();
|
float EncodedBytes();
|
||||||
|
Loading…
Reference in New Issue
Block a user