From 3312a0b55901a2c54049f7770bd94ffcda1b88b7 Mon Sep 17 00:00:00 2001 From: Aaro Altonen Date: Sun, 2 Aug 2020 10:50:12 +0300 Subject: [PATCH] Add getter for RTP payload format --- include/rtp.hh | 9 +++++---- src/rtp.cc | 5 +++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/rtp.hh b/include/rtp.hh index cfee988..a5ba497 100644 --- a/include/rtp.hh +++ b/include/rtp.hh @@ -11,10 +11,11 @@ namespace uvg_rtp { rtp(rtp_format_t fmt); ~rtp(); - uint32_t get_ssrc(); - uint16_t get_sequence(); - uint32_t get_clock_rate(); - size_t get_payload_size(); + uint32_t get_ssrc(); + uint16_t get_sequence(); + uint32_t get_clock_rate(); + size_t get_payload_size(); + rtp_format_t get_payload(); void inc_sent_pkts(); void inc_sequence(); diff --git a/src/rtp.cc b/src/rtp.cc index bcd8369..b0847da 100644 --- a/src/rtp.cc +++ b/src/rtp.cc @@ -132,3 +132,8 @@ size_t uvg_rtp::rtp::get_payload_size() { return payload_size_; } + +rtp_format_t uvg_rtp::rtp::get_payload() +{ + return (rtp_format_t)fmt_; +}