common: Remove unused class multicast

This commit is contained in:
Joni Räsänen 2022-03-17 08:02:23 +02:00
parent 33f6260478
commit 4f16df1005
4 changed files with 3 additions and 86 deletions

View File

@ -33,7 +33,6 @@ target_sources(${PROJECT_NAME} PRIVATE
src/context.cc
src/media_stream.cc
src/mingw_inet.cc
src/multicast.cc
src/reception_flow.cc
src/poll.cc
src/frame_queue.cc
@ -76,7 +75,6 @@ target_sources(${PROJECT_NAME} PRIVATE
src/holepuncher.hh
src/hostname.hh
src/mingw_inet.hh
src/multicast.hh
src/reception_flow.hh
src/poll.hh
src/rtp.hh

View File

@ -1,43 +0,0 @@
#include "multicast.hh"
#include "uvgrtp/frame.hh"
uvgrtp::multicast::multicast()
{
}
uvgrtp::multicast::~multicast()
{
}
rtp_error_t uvgrtp::multicast::join_multicast(uvgrtp::connection *conn)
{
(void)conn;
return RTP_OK;
}
rtp_error_t uvgrtp::multicast::leave_multicast(uvgrtp::connection *conn)
{
(void)conn;
return RTP_OK;
}
rtp_error_t uvgrtp::multicast::push_frame_multicast(
uvgrtp::connection *sender,
uint8_t *data, uint32_t data_len,
rtp_format_t fmt, uint32_t timestamp
)
{
(void)sender, (void)data, (void)data_len, (void)fmt, (void)timestamp;
return RTP_OK;
}
rtp_error_t uvgrtp::multicast::push_frame_multicast(uvgrtp::connection *sender, uvgrtp::frame::rtp_frame *frame)
{
(void)sender, (void)frame;
return RTP_OK;
}

View File

@ -1,37 +0,0 @@
#pragma once
#include "uvgrtp/util.hh"
namespace uvgrtp {
class connection;
namespace frame {
struct rtp_frame;
}
const int MULTICAST_MAX_PEERS = 64;
class multicast {
public:
multicast();
~multicast();
/* Add RTP connection to multicast group */
rtp_error_t join_multicast(uvgrtp::connection *conn);
/* TODO: */
rtp_error_t leave_multicast(uvgrtp::connection *conn);
/* TODO: */
rtp_error_t push_frame_multicast(uvgrtp::connection *sender, uvgrtp::frame::rtp_frame *frame);
/* TODO: */
rtp_error_t push_frame_multicast(
uvgrtp::connection *sender,
uint8_t *data, uint32_t data_len,
rtp_format_t fmt, uint32_t timestamp
);
};
}
namespace uvg_rtp = uvgrtp;

View File

@ -1,6 +1,5 @@
#include "poll.hh"
#include "multicast.hh"
#include "uvgrtp/socket.hh"
#include "uvgrtp/debug.hh"
@ -13,7 +12,7 @@
#include <cstring>
const int MULTICAST_MAX_PEERS = 64;
rtp_error_t uvgrtp::poll::blocked_recv(std::shared_ptr<uvgrtp::socket> socket, uint8_t *buf, size_t buf_len, int timeout, int *bytes_read)
@ -58,13 +57,13 @@ rtp_error_t uvgrtp::poll::poll(std::vector<uvgrtp::socket>& sockets, uint8_t *bu
if (buf == nullptr || buf_len == 0)
return RTP_INVALID_VALUE;
if (sockets.size() >= uvgrtp::MULTICAST_MAX_PEERS) {
if (sockets.size() >= MULTICAST_MAX_PEERS) {
LOG_ERROR("Too many participants!");
return RTP_INVALID_VALUE;
}
#ifndef _WIN32
struct pollfd fds[uvgrtp::MULTICAST_MAX_PEERS];
struct pollfd fds[MULTICAST_MAX_PEERS];
int ret;
for (size_t i = 0; i < sockets.size(); ++i) {