Remove default arguments in EncodedImageCallback.

BUG=
R=mflodman@webrtc.org, pbos@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39719004

Cr-Commit-Position: refs/heads/master@{#8289}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8289 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
changbin.shao@webrtc.org
2015-02-09 09:14:03 +00:00
parent 6c930c7183
commit f31f56d8d4
5 changed files with 33 additions and 43 deletions

View File

@ -208,47 +208,39 @@ VCMEncodedFrameCallback::SetTransportCallback(VCMPacketizationCallback* transpor
return VCM_OK;
}
int32_t
VCMEncodedFrameCallback::Encoded(
const EncodedImage &encodedImage,
int32_t VCMEncodedFrameCallback::Encoded(
const EncodedImage& encodedImage,
const CodecSpecificInfo* codecSpecificInfo,
const RTPFragmentationHeader* fragmentationHeader)
{
post_encode_callback_->Encoded(encodedImage);
const RTPFragmentationHeader* fragmentationHeader) {
post_encode_callback_->Encoded(encodedImage, NULL, NULL);
if (_sendCallback == NULL) {
return VCM_UNINITIALIZED;
}
if (_sendCallback != NULL)
{
#ifdef DEBUG_ENCODER_BIT_STREAM
if (_bitStreamAfterEncoder != NULL)
{
fwrite(encodedImage._buffer, 1, encodedImage._length, _bitStreamAfterEncoder);
}
if (_bitStreamAfterEncoder != NULL) {
fwrite(encodedImage._buffer, 1, encodedImage._length,
_bitStreamAfterEncoder);
}
#endif
RTPVideoHeader rtpVideoHeader;
RTPVideoHeader* rtpVideoHeaderPtr = &rtpVideoHeader;
CopyCodecSpecific(codecSpecificInfo, &rtpVideoHeaderPtr);
RTPVideoHeader rtpVideoHeader;
RTPVideoHeader* rtpVideoHeaderPtr = &rtpVideoHeader;
CopyCodecSpecific(codecSpecificInfo, &rtpVideoHeaderPtr);
int32_t callbackReturn = _sendCallback->SendData(
_payloadType,
encodedImage,
*fragmentationHeader,
rtpVideoHeaderPtr);
if (callbackReturn < 0)
{
return callbackReturn;
}
}
else
{
return VCM_UNINITIALIZED;
}
if (_mediaOpt != NULL) {
_mediaOpt->UpdateWithEncodedData(encodedImage);
if (_internalSource)
return _mediaOpt->DropFrame(); // Signal to encoder to drop next frame.
}
return VCM_OK;
int32_t callbackReturn = _sendCallback->SendData(
_payloadType, encodedImage, *fragmentationHeader, rtpVideoHeaderPtr);
if (callbackReturn < 0) {
return callbackReturn;
}
if (_mediaOpt != NULL) {
_mediaOpt->UpdateWithEncodedData(encodedImage);
if (_internalSource)
return _mediaOpt->DropFrame(); // Signal to encoder to drop next frame.
}
return VCM_OK;
}
void

View File

@ -365,7 +365,7 @@ int32_t VideoReceiver::Decode(uint16_t maxWaitTimeMs) {
if (pre_decode_image_callback_) {
EncodedImage encoded_image(frame->EncodedImage());
pre_decode_image_callback_->Encoded(encoded_image);
pre_decode_image_callback_->Encoded(encoded_image, NULL, NULL);
}
#ifdef DEBUG_DECODER_BIT_STREAM