diff --git a/RTP_CNL113392.tpd b/RTP_CNL113392.tpd index 8f833f21cf1b88152e914d44a24b20ad4c523b83..cb6af74d3e8526c935bc9d40a9bec413356f39c8 100644 --- a/RTP_CNL113392.tpd +++ b/RTP_CNL113392.tpd @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2014 Ericsson + Copyright (c) 2015 Ericsson All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 @@ -10,7 +10,7 @@ File: RTP_CNL113392.tpd Description: tpd project file - Rev: R4A + Rev: R5A Prodnr: CNL 113 392 --> diff --git a/doc/1551-CNL113392.doc b/doc/1551-CNL113392.doc index 068108d50e56799b58102d4478c6c159688317e0..a6f5b93d6046ef88cda7c12662d3e1246c6ea496 100644 Binary files a/doc/1551-CNL113392.doc and b/doc/1551-CNL113392.doc differ diff --git a/doc/RTP_CNL113392_PRI.doc b/doc/RTP_CNL113392_PRI.doc index d7d96de0b63b5e3494d1465cc3723a5d69d7cd85..26efcdd8becc3565b9c4bb54b79af431dfcbcced 100644 Binary files a/doc/RTP_CNL113392_PRI.doc and b/doc/RTP_CNL113392_PRI.doc differ diff --git a/src/RTP_CNL113392.grp b/src/RTP_CNL113392.grp index 335027897cfd9288c8b37738fb2c047506a83cb5..40f31d2ef726dc80a78fa974d8220ab09879a884 100644 --- a/src/RTP_CNL113392.grp +++ b/src/RTP_CNL113392.grp @@ -15,7 +15,7 @@ // // File: RTP_CNL113392.grp // Description: RTP group file -// Rev: R4A +// Rev: R5A // Prodnr: CNL 113 392 // Reference: // diff --git a/src/RTP_EncDec.cc b/src/RTP_EncDec.cc index bb085f92ac4636c5083888616e293fad909d3ee2..864c798ac490738badc4cc410f13ac39c4816f9a 100644 --- a/src/RTP_EncDec.cc +++ b/src/RTP_EncDec.cc @@ -14,7 +14,7 @@ // // File: RTP_EncDec.cc // Description: RTP -// Rev: R4A +// Rev: R5A // Prodnr: CNL 113 392 // #include "RTP_Types.hh" @@ -42,6 +42,7 @@ RTP__messages__union f__RTP__dec(OCTETSTRING const &data){ bb.clear(); bb.put_s(data_length,raw_data); if(pt>71 && pt<77){ + // Magic numbers. See rfc3550 12. Summary of Protocol Constants PDU__RTCP pdu; pdu.decode(PDU__RTCP_descr_,bb,TTCN_EncDec::CT_RAW); ret_val.rtcp()=pdu; diff --git a/src/RTP_File.cc b/src/RTP_File.cc index f60ce330aaa78f3b79556f4675726bda7e597634..bc4ee606edcbdc608ef8a372832a54e04b0eaeb2 100644 --- a/src/RTP_File.cc +++ b/src/RTP_File.cc @@ -14,7 +14,7 @@ // // File: RTP_File.cc // Description: Media files operation for RTP -// Rev: R4A +// Rev: R5A // Prodnr: CNL 113 392 // diff --git a/src/RTP_File_Types.ttcn b/src/RTP_File_Types.ttcn index fedc62134c0aef7b3509461dff6223e3d2b9802c..bb28bca0162351fb0cd793c8b8c49ea3679ce683 100644 --- a/src/RTP_File_Types.ttcn +++ b/src/RTP_File_Types.ttcn @@ -14,7 +14,7 @@ // // File: RTP_File_Types.ttcn // Description: Types for the media file operation -// Rev: R4B +// Rev: R5A // Prodnr: CNL 113 392 // diff --git a/src/RTP_Media.ttcn b/src/RTP_Media.ttcn index fcc13f4315543459547490d2cc59a5489cd50889..377016503a864576730cca46ea77c0804c420eb2 100644 --- a/src/RTP_Media.ttcn +++ b/src/RTP_Media.ttcn @@ -14,7 +14,7 @@ // // File: RTP_Media.ttcn // Description: Functions of the media file operations for RTP. -// Rev: R4A +// Rev: R5A // Prodnr: CNL 113 392 module RTP_Media diff --git a/src/RTP_Media_EncDec.cc b/src/RTP_Media_EncDec.cc index 8ba4078ae0f81b129d4eec6a87bcc1c24a630ee0..cfe30f40200cb5bb9e09d0ef1b3991cc3b660d4c 100644 --- a/src/RTP_Media_EncDec.cc +++ b/src/RTP_Media_EncDec.cc @@ -14,7 +14,7 @@ // // File: RTP_Media_EncDec.cc // Description: Encode/decode functions for the media file operations -// Rev: R4A +// Rev: R5A // Prodnr: CNL 113 392 #include "RTP_File_Types.hh" diff --git a/src/RTP_Types.ttcn b/src/RTP_Types.ttcn index e5b2a8671975141c8f0e02560cd5b322b66db0e4..6b91794b7e48e9de94c92113a510c85cbf562f37 100644 --- a/src/RTP_Types.ttcn +++ b/src/RTP_Types.ttcn @@ -14,7 +14,7 @@ // // File: RTP_Types.ttcn // Description: RTP -// Rev: R4B +// Rev: R5A // Prodnr: CNL 113 392 // module RTP_Types{ @@ -25,6 +25,11 @@ external function f_RTP_enc ( in RTP_messages_union pdu ) return octetstring; external function f_RTP_dec ( in octetstring data ) return RTP_messages_union; external function f_RTP_packet_enc ( in RTP_packet pdu ) return octetstring; external function f_RTP_packet_dec ( in octetstring data ) return RTP_packet; +external function f_RTCP_PDU_enc ( in PDU_RTCP pdu ) return octetstring +with { extension "prototype(convert) encode(RAW)" }; + +external function f_RTCP_PDU_dec ( in octetstring data ) return PDU_RTCP +with { extension "prototype(convert) decode(RAW)" } type set of BIT32_BO_LAST RTP_CSRC_list; @@ -243,18 +248,179 @@ type record RTCP_IE_APP{ variant "FIELDORDER(msb)" }; +type record RTCP_IE_RTPFB { + INT2b version, + BIT1 padding_ind, + INT5b fmt, + LIN1 payload_type, + LIN2_BO_LAST packet_length, + BIT32_BO_LAST SSRC_packet_sender, + BIT32_BO_LAST SSRC_media_sender, + RTCP_RTPFB_union fci optional, + octetstring padding optional +} with { + variant (padding) "PRESENCE(padding_ind = '1'B)"; + variant (packet_length) "LENGTHTO(SSRC_packet_sender,SSRC_media_sender,fci,padding)"; + variant (packet_length) "UNIT(dword32)"; + variant "FIELDORDER(msb)" + variant (fci) "CROSSTAG( + gen_naks, fmt=1; + tmmbr, fmt=3; + tmmbn, fmt=4; + unknown_fci, OTHERWISE + )"; +}; + +type union RTCP_RTPFB_union { + RTCP_generic_NAKs gen_naks, + RTCP_RTPFB_TMMBRs tmmbr, + RTCP_RTPFB_TMMBNs tmmbn, + octetstring unknown_fci +} + +type record of RTCP_RTPFB_TMMB RTCP_RTPFB_TMMBRs + +type record of RTCP_RTPFB_TMMB RTCP_RTPFB_TMMBNs + + type integer INT14b_BO_LAST ( 0 .. 16383 ) with { variant "FIELDLENGTH(14), COMP(nosign), BYTEORDER(last)" }; + +type record RTCP_RTPFB_TMMB { + BIT32_BO_LAST SSRC, + INT6b exp, + integer mantissa ( 0 .. 131072 ), + integer measured_overhead( 0 .. 511 ) +} with { + variant "FIELDORDER(msb)" + variant (mantissa) "FIELDLENGTH(17), COMP(nosign), BYTEORDER(last)" + variant (measured_overhead) "FIELDLENGTH(9), COMP(nosign), BYTEORDER(last)" +} + +type record of RTCP_generic_NAK RTCP_generic_NAKs + +type record RTCP_generic_NAK { + LIN2_BO_LAST pid, + BIT16 blb +} + +type record RTCP_IE_PSFB { + INT2b version, + BIT1 padding_ind, + INT5b fmt, + LIN1 payload_type, + LIN2_BO_LAST packet_length, + BIT32_BO_LAST SSRC_packet_sender, + BIT32_BO_LAST SSRC_media_sender, + RTCP_PSFB_union fci, + octetstring padding optional +} with { + variant (padding) "PRESENCE(padding_ind = '1'B)"; + variant (packet_length) "LENGTHTO(SSRC_packet_sender,SSRC_media_sender,fci,padding)"; + variant (packet_length) "UNIT(dword32)"; + variant "FIELDORDER(msb)" + variant (fci) "CROSSTAG( + pli, fmt=1; + sli, fmt=2; + rpsi, fmt=3; + fir, fmt=4; + tstr, fmt=5; + tstn, fmt=6; + vbcm, fmt=7; + afb, fmt=15; + unknown_fci, OTHERWISE + )"; +}; + +type union RTCP_PSFB_union { + + RTCP_PSFB_PLI pli, + RTCP_PSFB_SLIs sli, + RTCP_PSFB_RPSI rpsi, + RTCP_PSFB_FIRs fir, + RTCP_PSFB_TSTRs tstr, + RTCP_PSFB_TSTNs tstn, + RTCP_PSFB_VBCMs vbcm, + + octetstring afb, + + octetstring unknown_fci +} + +type record of RTCP_PSFB_FIR RTCP_PSFB_FIRs + +type record RTCP_PSFB_FIR{ + BIT32_BO_LAST SSRC, + INT1 seq_no, + OCT3 reserved +} + +type record of RTCP_PSFB_TST RTCP_PSFB_TSTRs +type record of RTCP_PSFB_TST RTCP_PSFB_TSTNs + +type record RTCP_PSFB_TST{ + BIT32_BO_LAST SSRC, + INT1 seq_no, + OCT2 reserved, + integer index ( 0 .. 31) // the encoding includes the 3 reserved + // bit encoded as zero + +} with { + variant (seq_no) "FIELDLENGTH(8)" +} + +type record of RTCP_PSFB_VBCM RTCP_PSFB_VBCMs + +type record RTCP_PSFB_VBCM { + BIT32_BO_LAST SSRC, + INT1 seq_no, + BIT1 marker_bit, + INT7b payload_type, + LIN2_BO_LAST vbcm_length, + octetstring vbcm +} with { + variant "FIELDORDER(msb)" + variant "PADDING(dword32)" + variant (vbcm_length) "LENGTHTO(vbcm)" +} + + +type record RTCP_PSFB_PLI { + // empty +} + +type record of RTCP_PSFB_SLI RTCP_PSFB_SLIs + +type record RTCP_PSFB_SLI{ + INT13b_BO_LAST first, + INT13b_BO_LAST number, + INT6b picture_id +} with { + variant "FIELDORDER(msb)" +} + + +type record RTCP_PSFB_RPSI { + INT1 pb, // must be filled correctly, not handled by the encoder + INT1 payload_type, // includes the first bit + octetstring rpsi_string // includes the padding bits +} + type union RTCP_message{ RTCP_IE_SR sr, RTCP_IE_RR rr, RTCP_IE_SDES sdes, RTCP_IE_BYE bye, - RTCP_IE_APP app + RTCP_IE_APP app, + RTCP_IE_RTPFB rtpfb, + RTCP_IE_PSFB psfb } with { variant "TAG(sr, payload_type=200; rr, payload_type=201; sdes, payload_type=202; bye, payload_type=203; - app, payload_type=204)" + app, payload_type=204; + rtpfb, payload_type=205; + psfb, payload_type=206 + )" }; type record of RTCP_message PDU_RTCP with {variant ""};