Don't bind in the uvgRTP sending end
This commit is contained in:
parent
f2ca8478f1
commit
9392e876aa
|
@ -111,7 +111,7 @@ void receiver_thread(char* addr, int thread_num, std::string local_address, int
|
|||
uint16_t thread_local_port = local_port + thread_num * 2;
|
||||
uint16_t thread_remote_port = remote_port + thread_num * 2;
|
||||
|
||||
intialize_uvgrtp(rtp_ctx, &session, &receive, local_address, remote_address, thread_local_port, thread_remote_port, vvc, srtp);
|
||||
intialize_uvgrtp(rtp_ctx, &session, &receive, local_address, remote_address, thread_local_port, thread_remote_port, vvc, srtp, true);
|
||||
|
||||
int tid = thread_num / 2;
|
||||
receive->install_receive_hook(&tid, hook);
|
||||
|
|
|
@ -78,7 +78,7 @@ void sender_thread(void* mem, size_t len, std::string local_address, uint16_t lo
|
|||
uint16_t thread_local_port = local_port + thread_num * 2;
|
||||
uint16_t thread_remote_port = remote_port + thread_num * 2;
|
||||
|
||||
intialize_uvgrtp(rtp_ctx, &session, &send, local_address, remote_address, thread_local_port, thread_remote_port, vvc, srtp);
|
||||
intialize_uvgrtp(rtp_ctx, &session, &send, local_address, remote_address, thread_local_port, thread_remote_port, vvc, srtp, false);
|
||||
|
||||
size_t bytes_sent = 0;
|
||||
uint64_t chunk_size = 0;
|
||||
|
|
|
@ -8,9 +8,14 @@
|
|||
constexpr int EXPECTED_FRAMES = 602;
|
||||
|
||||
void intialize_uvgrtp(uvgrtp::context& rtp_ctx, uvgrtp::session** session, uvgrtp::media_stream** mStream,
|
||||
std::string remote_address, std::string local_address, uint16_t local_port, uint16_t remote_port, bool srtp, bool vvc)
|
||||
std::string remote_address, std::string local_address, uint16_t local_port, uint16_t remote_port, bool srtp, bool vvc, bool bind)
|
||||
{
|
||||
int flags = 0;
|
||||
|
||||
if (!bind)
|
||||
{
|
||||
flags = flags | RCE_ONLY_SEND;
|
||||
}
|
||||
if (srtp)
|
||||
{
|
||||
flags = flags | RCE_SRTP | RCE_SRTP_KMNGMNT_USER;
|
||||
|
|
Loading…
Reference in New Issue