← Back to team overview

rohc team mailing list archive

Re: [Question #229419]: What protocol number should be for RTP header compression

 

Question #229419 on rohc changed:
https://answers.launchpad.net/rohc/+question/229419

Wei Wang gave more information on the question:
Here is code change and result:

/* before compression loop */
    /* calculate initial sequence number and timestamp */
    unsigned short sequence = ((unsigned short)rtp_header[2] << 8) | ((unsigned short)rtp_header[3] & 0xff);
    unsigned long timestamp = ((unsigned long)rtp_header[4] << 24) | 
                            ((unsigned long)rtp_header[5] << 16) | 
                            ((unsigned long)rtp_header[6] << 8) | 
                            (unsigned long)rtp_header[7];

/* inside compression loop */
    /* update sequence number and timestamp */
    sequence += 1;
    timestamp += 300;
    ip_packet[30] = (char)(sequence >> 8);
    ip_packet[31] = (char)(sequence & 0xff); // Sequence Number.
    ip_packet[32] = (char)(timestamp >> 24);
    ip_packet[33] = (char)((timestamp >> 16) & 0xff);
    ip_packet[34] = (char)((timestamp >> 8) & 0xff);
    ip_packet[35] = (char)(timestamp & 0xff); // RTP Timestamp

ip_packet before compression:
0x45 0x00 0x00 0x38 0x00 0x00 0x00 0x00
0x01 0x11 0xa9 0xa2 0x01 0x02 0x03 0x04
0x05 0x06 0x07 0x08 0x01 0x02 0x05 0x06
0x00 0x24 0xbe 0xef 0x80 0x01 0xb9 0x5e
0x4b 0x82 0xfc 0xdc 0x50 0x68 0xe5 0x2b
0x0c 0x3e 0x8e 0x4a 0x69 0x52 0x1b 0xfa
0x02 0xe0 0xb0 0x37 0x9f 0xd8 0x74 0x10

ROHC packet resulting from the ROHC compression:
0xfd 0x01 0x52 0x40 0x11 0x01 0x02 0x03
0x04 0x05 0x06 0x07 0x08 0x01 0x02 0x05
0x06 0x50 0x68 0xe5 0x2b 0x00 0x01 0x00
0x00 0x60 0x00 0xbe 0xef 0x80 0x01 0xb9
0x5e 0x4b 0x82 0xfc 0xdc 0x00 0x0c 0x3e
0x8e 0x4a 0x69 0x52 0x1b 0xfa 0x02 0xe0
0xb0 0x37 0x9f 0xd8 0x74 0x10

-- 
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.