Set correct codec info before sending frame to VCM.

Review URL: http://webrtc-codereview.appspot.com/240003

git-svn-id: http://webrtc.googlecode.com/svn/trunk@780 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org 2011-10-20 05:55:46 +00:00
parent 81f25f9ff8
commit ae499a2ac8

View File

@ -549,23 +549,22 @@ void ViEEncoder::DeliverFrame(int id, webrtc::VideoFrame& videoFrame,
if (_vcm.SendCodec() == webrtc::kVideoCodecVP8) if (_vcm.SendCodec() == webrtc::kVideoCodecVP8)
{ {
webrtc::CodecSpecificInfo codecSpecificInfo; webrtc::CodecSpecificInfo codecSpecificInfo;
codecSpecificInfo.codecType = webrtc::kVideoCodecUnknown; codecSpecificInfo.codecType = webrtc::kVideoCodecVP8;
if (_hasReceivedSLI || _hasReceivedRPSI) if (_hasReceivedSLI || _hasReceivedRPSI)
{ {
webrtc::VideoCodec currentSendCodec;
_vcm.SendCodec(&currentSendCodec);
if (currentSendCodec.codecType == webrtc::kVideoCodecVP8)
{ {
codecSpecificInfo.codecType = webrtc::kVideoCodecVP8; codecSpecificInfo.codecSpecific.VP8.hasReceivedRPSI =
codecSpecificInfo.codecSpecific.VP8.hasReceivedRPSI = _hasReceivedRPSI; _hasReceivedRPSI;
codecSpecificInfo.codecSpecific.VP8.hasReceivedSLI = _hasReceivedSLI; codecSpecificInfo.codecSpecific.VP8.hasReceivedSLI =
codecSpecificInfo.codecSpecific.VP8.pictureIdRPSI = _pictureIdRPSI; _hasReceivedSLI;
codecSpecificInfo.codecSpecific.VP8.pictureIdSLI = _pictureIdSLI; codecSpecificInfo.codecSpecific.VP8.pictureIdRPSI =
_pictureIdRPSI;
codecSpecificInfo.codecSpecific.VP8.pictureIdSLI =
_pictureIdSLI;
} }
_hasReceivedSLI = false; _hasReceivedSLI = false;
_hasReceivedRPSI = false; _hasReceivedRPSI = false;
} }
// Pass frame via preprocessor
VideoFrame *decimatedFrame = NULL; VideoFrame *decimatedFrame = NULL;
const int ret = _vpm.PreprocessFrame(&videoFrame, &decimatedFrame); const int ret = _vpm.PreprocessFrame(&videoFrame, &decimatedFrame);
if (ret == 1) if (ret == 1)