1 /** 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** \addtogroup RTP_Stack 18 * @{ 19 */ 20 21 #ifndef __RTCP_XR_PACKET_H__ 22 #define __RTCP_XR_PACKET_H__ 23 24 #include <RtpGlobal.h> 25 #include <RtpBuffer.h> 26 #include <RtcpHeader.h> 27 28 /** 29 * @class RtcpXrPacket 30 * @brief It holds RTCP XR packet information 31 */ 32 class RtcpXrPacket 33 { 34 private: 35 // RTCP Xr header information 36 RtcpHeader m_objRtcpHdr; // making use of RTCP header 37 38 // Extended report block Information 39 RtpBuffer* m_reportBlk; 40 41 public: 42 RtcpXrPacket(); 43 44 ~RtcpXrPacket(); 45 46 /** 47 * get method for m_objRtcpHdr 48 */ 49 RtcpHeader* getRtcpHdrInfo(); 50 51 /** 52 * set method for m_objRtcpHdr 53 */ 54 RtpDt_Void setRtcpHdrInfo(RtcpHeader& header); 55 56 /** 57 * get method for report block for the RTCP XR packet 58 */ 59 RtpBuffer* getReportBlk(); 60 61 /** 62 * set method for report block for the RTCP XR packet 63 */ 64 RtpDt_Void setReportBlk(IN RtpBuffer* m_reportBlk); 65 66 /** 67 * Decodes and stores the information of the RTCP XR packet 68 * This function does not allocate memory required for decoding. 69 * @param[in] pucByeBuf received RTCP XR packet 70 * @param[in] usByeLen length of the RTCP XR packet 71 * @return RTP_SUCCESS on successful decoding 72 */ 73 eRTP_STATUS_CODE decodeRtcpXrPacket(IN RtpDt_UChar*, IN RtpDt_UInt16, IN RtpDt_UChar ucPktType); 74 75 /** 76 * Performs the encoding of the RTCP XR packet. 77 * This function does not allocate memory required for encoding. 78 * @param[out] pobjRtcpPktBuf Memory for the buffer is pre-allocated by caller 79 * @return RTP_SUCCESS on successful encoding 80 */ 81 eRTP_STATUS_CODE formRtcpXrPacket(OUT RtpBuffer* pobjRtcpPktBuf); 82 83 }; // end of RtcpXrPacket 84 85 #endif //__RTCP_XR_PACKET_H__ 86 87 /** @}*/ 88