RtcpSdes extends RtcpHeader { protected int decode(byte[] rawData, int offSet) { int tmp = offSet; offSet = super.decode(rawData, offSet); while ((offSet - tmp) < this.length) { RtcpSdesChunk rtcpSdesChunk = new RtcpSdesChunk(); offSet = rtcpSdesChunk.decode(rawData, offSet); this.sdesChunks.add(rtcpSdesChunk); } return offSet; } protected  RtcpSdes();  RtcpSdes(boolean padding); void addRtcpSdesChunk(RtcpSdesChunk rtcpSdesChunk); RtcpSdesChunk[] getSdesChunks(); String getCname(); @Override String toString();  }
@Test public void testDecode() { RtcpSdes rtcpSdes = new RtcpSdes(); rtcpSdes.decode(p, 0); assertEquals(2, rtcpSdes.getVersion()); assertFalse(rtcpSdes.isPadding()); assertEquals(1, rtcpSdes.getCount()); assertEquals(RtcpHeader.RTCP_SDES, rtcpSdes.getPacketType()); assertEquals(28, rtcpSdes.getLength()); RtcpSdesChunk rtcpSdesChunk = rtcpSdes.getSdesChunks()[0]; assertNotNull(rtcpSdesChunk); assertEquals(1448293446, rtcpSdesChunk.getSsrc()); assertEquals(2, rtcpSdesChunk.getItemCount()); RtcpSdesItem rtcpSdesItem = rtcpSdesChunk.getRtcpSdesItems()[0]; assertNotNull(rtcpSdesItem); assertEquals(RtcpSdesItem.RTCP_SDES_CNAME, rtcpSdesItem.getType()); assertEquals(14, rtcpSdesItem.getLength()); assertEquals("QTSS1262189851", rtcpSdesItem.getText()); rtcpSdesItem = rtcpSdesChunk.getRtcpSdesItems()[1]; assertNotNull(rtcpSdesItem); assertEquals(RtcpSdesItem.RTCP_SDES_END, rtcpSdesItem.getType()); }