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_SDES_PACKET_H__ 22 #define __RTCP_SDES_PACKET_H__ 23 24 #include <RtpGlobal.h> 25 #include <RtcpHeader.h> 26 #include <RtpBuffer.h> 27 #include <RtcpConfigInfo.h> 28 #include <RtcpChunk.h> 29 30 /** 31 * @class RtcpSdesPacket 32 * @brief It holds sdes packet information 33 */ 34 class RtcpSdesPacket 35 { 36 private: 37 // Rtcp header. m_uiSsrc member of m_objRtcpHdr is not applicable to SDES packet. 38 RtcpHeader m_objRtcpHdr; 39 40 // List of SDES chunks (RtcpChunk) 41 std::list<RtcpChunk*> m_objSdesChunkList; 42 43 public: 44 RtcpSdesPacket(); 45 46 ~RtcpSdesPacket(); 47 48 /** 49 * get method for m_objRtcpHdr 50 */ 51 RtcpHeader* getRtcpHdrInfo(); 52 53 /** 54 * Set RTCP header Information. 55 */ 56 RtpDt_Void setRtcpHdrInfo(RtcpHeader& rtcpHeader); 57 58 /** 59 * get method for m_objSdesChunkList 60 */ 61 std::list<RtcpChunk*>& getSdesChunkList(); 62 63 /** 64 * Decodes and stores the information of the RTCP SDES packet 65 * This function does not allocate memory required for decoding. 66 * 67 * @param[in] pucSdesBuf RTCP SDES packet buffer 68 * @param[in] usSdesLen length of the SDES RTCP packet 69 * @return RTP_SUCCESS on successful decoding 70 */ 71 eRTP_STATUS_CODE decodeSdesPacket(IN RtpDt_UChar* pucSdesBuf, IN RtpDt_UInt16 usSdesLen, 72 IN RtcpConfigInfo* pobjRtcpCfgInfo); 73 74 /** 75 * Performs the encoding of the RTCP SDES packet. 76 * This function does not allocate memory required for encoding. 77 * 78 * @param[out] pobjRtcpPktBuf Memory for the buffer is pre-allocated by caller 79 * 80 * @return RTP_SUCCESS on successful encoding 81 */ 82 eRTP_STATUS_CODE formSdesPacket(OUT RtpBuffer* pobjRtcpPktBuf); 83 84 }; // end of RtcpSdesPacket 85 86 #endif //__RTCP_SDES_PACKET_H__ 87 88 /** @}*/ 89