// Now calculate the size of the first RTCP/I packet that we are going to send:
// this packet will contain a single SDES packet with the CNAME and NAME items!
avg_rtcpi_size=RtcpiPacket.HEADER_SIZE;
SourceDescriptionItem item;
try {
item = localParticipant.getStandardItem(SourceDescriptionItem.CNAME);
if (item!= null) {
avg_rtcpi_size+=item.getData().length+1; // +1 for length field!
}
} catch (Exception ex) {
System.err.println("Rtpi: could not calculate length of CNAME SDES item "+ex);
}
try {
item = localParticipant.getStandardItem(SourceDescriptionItem.NAME);
if (item!= null) {
avg_rtcpi_size+=item.getData().length+1; // +1 for length field!
}
} catch (Exception ex) {
System.err.println("Rtpi: could not calculate length of NAME SDES item "+ex);
}