Change to make the VP8-RTP Fragmentation (FI bits) setting (in the payload header)
agree with "draft-westin-payload-vp8-02" document. This issue was raised in: http://code.google.com/p/webrtc/issues/detail?id=31 Review URL: http://webrtc-codereview.appspot.com/92005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@285 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
191b780741
commit
5fc2dcd64a
@ -180,9 +180,8 @@ int RtpFormatVp8::WriteHeaderAndPayload(int payload_bytes,
|
||||
|
||||
buffer[0] = 0;
|
||||
if (hdr_info_.nonReference) buffer[0] |= (0x01 << 3); // N
|
||||
if (!first_fragment_) buffer[0] |= (0x01 << 2); // FI
|
||||
if (!end_of_fragment) buffer[0] |= (0x01 << 1); // FI
|
||||
if (beginning_) buffer[0] |= 0x01; // B
|
||||
buffer[0] |= (GetFIFlag(end_of_fragment) << 1); // FI
|
||||
if (beginning_) buffer[0] |= 0x01; // B
|
||||
|
||||
int pic_id_len = WritePictureID(&buffer[vp8_header_bytes_],
|
||||
buffer_length - vp8_header_bytes_);
|
||||
@ -252,4 +251,20 @@ int RtpFormatVp8::PictureIdLength() const
|
||||
}
|
||||
}
|
||||
|
||||
int RtpFormatVp8::GetFIFlag(bool end_of_fragment) const
|
||||
{
|
||||
if (first_fragment_ && end_of_fragment) {
|
||||
return 0x0;
|
||||
}
|
||||
else if (first_fragment_ && !end_of_fragment) {
|
||||
return 0x1;
|
||||
}
|
||||
else if (!first_fragment_ && !end_of_fragment) {
|
||||
return 0x2;
|
||||
}
|
||||
else if (!first_fragment_ && end_of_fragment) {
|
||||
return 0x3;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -105,6 +105,8 @@ private:
|
||||
// header. Can be 0, 1, or 2.
|
||||
int PictureIdLength() const;
|
||||
|
||||
int GetFIFlag(bool end_of_fragment) const;
|
||||
|
||||
const WebRtc_UWord8* payload_data_;
|
||||
const int payload_size_;
|
||||
RTPFragmentationHeader part_info_;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user