VP8 RTP work
Fixing the plumbing to get the KEYIDX between VP8 wrapper and rtp_rtcp module. Also fixing a missing pipe for temporalIdx Review URL: http://webrtc-codereview.appspot.com/295004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1024 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
5483210c82
commit
859626570a
@ -647,6 +647,7 @@ RTPReceiverVideo::ReceiveVp8Codec(WebRtcRTPHeader* rtpHeader,
|
||||
kNoTl0PicIdx;
|
||||
toHeader->temporalIdx = fromHeader->hasTID ? fromHeader->tID :
|
||||
kNoTemporalIdx;
|
||||
toHeader->keyIdx = fromHeader->hasKeyIdx ? fromHeader->keyIdx : kNoKeyIdx;
|
||||
|
||||
toHeader->frameWidth = fromHeader->frameWidth;
|
||||
toHeader->frameHeight = fromHeader->frameHeight;
|
||||
|
@ -33,6 +33,7 @@ struct CodecSpecificInfoVP8
|
||||
bool nonReference;
|
||||
WebRtc_UWord8 simulcastIdx;
|
||||
WebRtc_UWord8 temporalIdx;
|
||||
WebRtc_Word8 keyIdx; // negative value to skip keyIdx
|
||||
};
|
||||
|
||||
union CodecSpecificInfoUnion
|
||||
|
@ -602,6 +602,7 @@ void VP8Encoder::PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
|
||||
vp8Info->pictureId = _pictureID;
|
||||
vp8Info->simulcastIdx = _simulcastIdx;;
|
||||
vp8Info->temporalIdx = kNoTemporalIdx; // TODO(pwestin) need to populate this
|
||||
vp8Info->keyIdx = kNoKeyIdx; // TODO(hlundin) populate this
|
||||
vp8Info->nonReference = (pkt.data.frame.flags & VPX_FRAME_IS_DROPPABLE);
|
||||
_pictureID = (_pictureID + 1) % 0x7FFF; // prepare next
|
||||
}
|
||||
|
@ -111,6 +111,8 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header)
|
||||
{
|
||||
// This is the first packet for this frame.
|
||||
_codecSpecificInfo.codecSpecific.VP8.pictureId = -1;
|
||||
_codecSpecificInfo.codecSpecific.VP8.temporalIdx = 0;
|
||||
_codecSpecificInfo.codecSpecific.VP8.keyIdx = -1;
|
||||
_codecSpecificInfo.codecType = kVideoCodecVP8;
|
||||
}
|
||||
_codecSpecificInfo.codecSpecific.VP8.nonReference =
|
||||
@ -120,6 +122,16 @@ void VCMEncodedFrame::CopyCodecSpecific(const RTPVideoHeader* header)
|
||||
_codecSpecificInfo.codecSpecific.VP8.pictureId =
|
||||
header->codecHeader.VP8.pictureId;
|
||||
}
|
||||
if (header->codecHeader.VP8.temporalIdx != kNoTemporalIdx)
|
||||
{
|
||||
_codecSpecificInfo.codecSpecific.VP8.temporalIdx =
|
||||
header->codecHeader.VP8.temporalIdx;
|
||||
}
|
||||
if (header->codecHeader.VP8.keyIdx != kNoKeyIdx)
|
||||
{
|
||||
_codecSpecificInfo.codecSpecific.VP8.keyIdx =
|
||||
header->codecHeader.VP8.keyIdx;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -267,6 +267,8 @@ void VCMEncodedFrameCallback::CopyCodecSpecific(const CodecSpecificInfo& info,
|
||||
info.codecSpecific.VP8.nonReference;
|
||||
(*rtp)->codecHeader.VP8.temporalIdx =
|
||||
info.codecSpecific.VP8.temporalIdx;
|
||||
(*rtp)->codecHeader.VP8.keyIdx =
|
||||
info.codecSpecific.VP8.keyIdx;
|
||||
(*rtp)->simulcastIdx = info.codecSpecific.VP8.simulcastIdx;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user