summaryrefslogtreecommitdiff
path: root/toxav/rtp.c
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2015-02-21 01:07:22 +0100
committermannol <eniz_vukovic@hotmail.com>2015-02-21 01:07:22 +0100
commit29601feb7656d1a75b4ab7cdb161f232f0ec92dc (patch)
tree9f09494355e792a62f9c5b52a152214030d9dfb9 /toxav/rtp.c
parentefe31ec92f476faffd6502714d05cce0a7dfadc7 (diff)
New msi protocol
Diffstat (limited to 'toxav/rtp.c')
-rw-r--r--toxav/rtp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/toxav/rtp.c b/toxav/rtp.c
index 396e0202..8319c7dc 100644
--- a/toxav/rtp.c
+++ b/toxav/rtp.c
@@ -478,12 +478,24 @@ void rtp_kill ( RTPSession *session )
478 free ( session ); 478 free ( session );
479} 479}
480 480
481int rtp_register_for_receiving(RTPSession* session) 481int rtp_start_receiving(RTPSession* session)
482{ 482{
483 if (session == NULL)
484 return 0;
485
483 return custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix, 486 return custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix,
484 rtp_handle_packet, session); 487 rtp_handle_packet, session);
485} 488}
486 489
490int rtp_stop_receiving(RTPSession* session)
491{
492 if (session == NULL)
493 return 0;
494
495 return custom_lossy_packet_registerhandler(session->m, session->dest, session->prefix,
496 NULL, NULL);
497}
498
487int rtp_send_msg ( RTPSession *session, const uint8_t *data, uint16_t length ) 499int rtp_send_msg ( RTPSession *session, const uint8_t *data, uint16_t length )
488{ 500{
489 RTPMessage *msg = rtp_new_message (session, data, length); 501 RTPMessage *msg = rtp_new_message (session, data, length);