summaryrefslogtreecommitdiff
path: root/toxav
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-05-21 15:28:14 -0400
committerirungentoo <irungentoo@gmail.com>2014-05-21 15:28:14 -0400
commitf818c1a197cdd40145868be97c0472e150c563bb (patch)
tree4e1b0082d2638763bb83e344d5069615b1c9d1fa /toxav
parent248fd212baa93f06db9845f588003e0ada75c402 (diff)
Added functions to send and receive lossy encrypted packets over
the Tox connection. A/V should now work over TCP.
Diffstat (limited to 'toxav')
-rwxr-xr-xtoxav/msi.h2
-rwxr-xr-xtoxav/rtp.c7
-rwxr-xr-xtoxav/rtp.h1
3 files changed, 2 insertions, 8 deletions
diff --git a/toxav/msi.h b/toxav/msi.h
index 39a9c792..052126d2 100755
--- a/toxav/msi.h
+++ b/toxav/msi.h
@@ -40,7 +40,7 @@ typedef void ( *MSICallback ) ( void *arg );
40 * @brief Call type identifier. Also used as rtp callback prefix. 40 * @brief Call type identifier. Also used as rtp callback prefix.
41 */ 41 */
42typedef enum { 42typedef enum {
43 type_audio = 70, 43 type_audio = 192,
44 type_video 44 type_video
45} MSICallType; 45} MSICallType;
46 46
diff --git a/toxav/rtp.c b/toxav/rtp.c
index 9462a467..d4aa5476 100755
--- a/toxav/rtp.c
+++ b/toxav/rtp.c
@@ -491,7 +491,7 @@ RTPMessage *msg_parse ( uint16_t sequnum, const uint8_t *data, int length )
491 * @retval -1 Error occurred. 491 * @retval -1 Error occurred.
492 * @retval 0 Success. 492 * @retval 0 Success.
493 */ 493 */
494int rtp_handle_packet ( void *object, IP_Port ip_port, uint8_t *data, uint32_t length ) 494int rtp_handle_packet ( void *object, uint8_t *data, uint32_t length )
495{ 495{
496 RTPSession *_session = object; 496 RTPSession *_session = object;
497 RTPMessage *_msg; 497 RTPMessage *_msg;
@@ -545,11 +545,6 @@ int rtp_handle_packet ( void *object, IP_Port ip_port, uint8_t *data, uint32_t l
545 545
546 if ( !_msg ) return -1; 546 if ( !_msg ) return -1;
547 547
548 /* Hopefully this goes well
549 * NOTE: Is this even used?
550 */
551 memcpy(&_msg->from, &ip_port, sizeof(IP_Port));
552
553 /* Check if message came in late */ 548 /* Check if message came in late */
554 if ( check_late_message(_session, _msg) < 0 ) { /* Not late */ 549 if ( check_late_message(_session, _msg) < 0 ) { /* Not late */
555 _session->rsequnum = _msg->header->sequnum; 550 _session->rsequnum = _msg->header->sequnum;
diff --git a/toxav/rtp.h b/toxav/rtp.h
index 58b16ab1..40532391 100755
--- a/toxav/rtp.h
+++ b/toxav/rtp.h
@@ -75,7 +75,6 @@ typedef struct _RTPMessage {
75 75
76 uint8_t data[MAX_RTP_SIZE]; 76 uint8_t data[MAX_RTP_SIZE];
77 uint32_t length; 77 uint32_t length;
78 IP_Port from;
79 78
80 struct _RTPMessage *next; 79 struct _RTPMessage *next;
81} RTPMessage; 80} RTPMessage;