multiplex: Remove function call_aux_handlers from reception_flow

This commit is contained in:
Heikki Tampio 2023-06-15 11:11:17 +03:00
parent 48d6537d8a
commit e503eab693
2 changed files with 0 additions and 104 deletions

View File

@ -444,107 +444,6 @@ void uvgrtp::reception_flow::return_user_pkt(uint8_t* pkt)
}
}*/
void uvgrtp::reception_flow::call_aux_handlers(uint32_t key, int rce_flags, uvgrtp::frame::rtp_frame **frame)
{
rtp_error_t ret;
for (auto& aux : packet_handlers_[key].auxiliary) {
auto fr = *frame;
uint32_t pkt_ssrc = fr->header.ssrc;
uint32_t current_ssrc = handler_mapping_[key].get()->load();
bool found = false;
if (current_ssrc == pkt_ssrc) {
found = true;
}
else if (current_ssrc == 0) {
found = true;
}
if (!found) {
// No SSRC match found, skip this handler
continue;
}
switch ((ret = (*aux.handler)(aux.arg, rce_flags, frame))) {
/* packet was handled successfully */
case RTP_OK:
break;
case RTP_MULTIPLE_PKTS_READY:
{
while ((*aux.getter)(aux.arg, frame) == RTP_PKT_READY)
return_frame(*frame);
}
break;
case RTP_PKT_READY:
return_frame(*frame);
break;
/* packet was not handled or only partially handled by the handler
* proceed to the next handler */
case RTP_PKT_NOT_HANDLED:
case RTP_PKT_MODIFIED:
continue;
case RTP_GENERIC_ERROR:
// too many prints with this in case of minor errors
//UVG_LOG_DEBUG("Error in auxiliary handling of received packet!");
break;
default:
UVG_LOG_ERROR("Unknown error code from packet handler: %d", ret);
break;
}
}
for (auto& aux : packet_handlers_[key].auxiliary_cpp) {
switch ((ret = aux.handler(rce_flags, frame))) {
case RTP_OK: /* packet was handled successfully */
{
break;
}
case RTP_MULTIPLE_PKTS_READY:
{
while (aux.getter(frame) == RTP_PKT_READY)
return_frame(*frame);
break;
}
case RTP_PKT_READY:
{
return_frame(*frame);
break;
}
/* packet was not handled or only partially handled by the handler
* proceed to the next handler */
case RTP_PKT_NOT_HANDLED:
{
continue;
}
case RTP_PKT_MODIFIED:
{
continue;
}
case RTP_GENERIC_ERROR:
{
// too many prints with this in case of minor errors
//UVG_LOG_DEBUG("Error in auxiliary handling of received packet (cpp)!");
break;
}
default:
{
UVG_LOG_ERROR("Unknown error code from packet handler: %d", ret);
break;
}
}
}
}
void uvgrtp::reception_flow::receiver(std::shared_ptr<uvgrtp::socket> socket)
{
int read_packets = 0;

View File

@ -244,9 +244,6 @@ namespace uvgrtp {
// Not yet supported
//void return_user_pkt(uint8_t* pkt);
/* Call auxiliary handlers of a primary handler */
void call_aux_handlers(uint32_t key, int rce_flags, uvgrtp::frame::rtp_frame **frame);
inline void increase_buffer_size(ssize_t next_write_index);
/* Primary handlers for the socket */