trtp_rtcp_sdes_chunck.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) 2012 Doubango Telecom <http://www.doubango.org>
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango.org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. #ifndef TINYRTP_RTCP_SDES_CHUNCK_H
  23. #define TINYRTP_RTCP_SDES_CHUNCK_H
  24. #include "tinyrtp_config.h"
  25. #include "tinyrtp/rtcp/trtp_rtcp_sdes_item.h"
  26. #define TRTP_RTCP_SDES_CHUNCK_MIN_SIZE 4
  27. #define TRTP_RTCP_SDES_CHUNCK_SSRC_OR_CSRC_SIZE 4
  28. #define TRTP_RTCP_SDES_CHUNCK(self) ((trtp_rtcp_sdes_chunck_t*)(self))
  29. TRTP_BEGIN_DECLS
  30. typedef struct trtp_rtcp_sdes_chunck_s {
  31. TSK_DECLARE_OBJECT;
  32. uint32_t ssrc;
  33. trtp_rtcp_sdes_items_L_t* items;
  34. }
  35. trtp_rtcp_sdes_chunck_t;
  36. typedef tsk_list_t trtp_rtcp_sdes_chuncks_L_t; /**< List of @ref trtp_rtcp_sdes_item_t elements */
  37. trtp_rtcp_sdes_chunck_t* trtp_rtcp_sdes_chunck_create_null();
  38. trtp_rtcp_sdes_chunck_t* trtp_rtcp_sdes_chunck_create(uint32_t ssrc);
  39. trtp_rtcp_sdes_chunck_t* trtp_rtcp_sdes_chunck_deserialize(const void* data, tsk_size_t size);
  40. int trtp_rtcp_sdes_chunck_serialize_to(const trtp_rtcp_sdes_chunck_t* self, void* data, tsk_size_t size);
  41. int trtp_rtcp_sdes_chunck_add_item(trtp_rtcp_sdes_chunck_t* self, trtp_rtcp_sdes_item_type_t type, const void* data, uint8_t length);
  42. tsk_size_t trtp_rtcp_sdes_chunck_get_size(const trtp_rtcp_sdes_chunck_t* self);
  43. TRTP_END_DECLS
  44. #endif /*TINYRTP_RTCP_SDES_CHUNCK_H*/