Rename alloc_frame() to alloc_rtp_frame()
Unfortunately, overloading by return type is not possible so we give new names for frame allocation functions
This commit is contained in:
parent
ed4b01a61d
commit
5eccaf6675
|
|
@ -3,7 +3,7 @@
|
|||
#include "send.hh"
|
||||
#include "util.hh"
|
||||
|
||||
kvz_rtp::frame::rtp_frame *kvz_rtp::frame::alloc_frame(size_t payload_len, frame_type_t type)
|
||||
kvz_rtp::frame::rtp_frame *kvz_rtp::frame::alloc_rtp_frame(size_t payload_len, rtp_type_t type)
|
||||
{
|
||||
if (payload_len == 0 || INVALID_FRAME_TYPE(type)) {
|
||||
LOG_ERROR("Invalid parameter!");
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ namespace kvz_rtp {
|
|||
rtp_frame *alloc_frame(size_t payload_len, frame_type_t type);
|
||||
|
||||
/* TODO: */
|
||||
kvz_rtp::rtp_frame *alloc_rtp_frame(size_t payload_len, rtp_type_t type);
|
||||
rtp_error_t dealloc_frame(kvz_rtp::frame::rtp_frame *frame);
|
||||
|
||||
/* get pointer to rtp header start or nullptr if frame is invalid */
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ void kvz_rtp::reader::frame_receiver(kvz_rtp::reader *reader)
|
|||
}
|
||||
|
||||
uint8_t *inbuf = reader->get_recv_buffer();
|
||||
auto *frame = kvz_rtp::frame::alloc_frame(nread, kvz_rtp::frame::FRAME_TYPE_GENERIC);
|
||||
auto *frame = kvz_rtp::frame::alloc_rtp_frame(nread, kvz_rtp::frame::FRAME_TYPE_GENERIC);
|
||||
|
||||
if (!frame) {
|
||||
LOG_ERROR("Failed to allocate RTP Frame!");
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ kvz_rtp::frame::rtp_frame *kvz_rtp::hevc::process_hevc_frame(
|
|||
goto error;
|
||||
}
|
||||
|
||||
ret = kvz_rtp::frame::alloc_frame(fu.first + 2, kvz_rtp::frame::FRAME_TYPE_GENERIC);
|
||||
ret = kvz_rtp::frame::alloc_rtp_frame(fu.first + 2, kvz_rtp::frame::FRAME_TYPE_GENERIC);
|
||||
|
||||
/* copy the RTP header of the first fragmentation unit and use it for the full frame */
|
||||
memcpy(frame->data, fu.second.at(0)->data, kvz_rtp::frame::HEADER_SIZE_RTP);
|
||||
|
|
|
|||
Loading…
Reference in New Issue