summaryrefslogtreecommitdiff
path: root/toxav/rtp.h
diff options
context:
space:
mode:
authormannol <eniz_vukovic@hotmail.com>2014-02-15 20:44:33 +0100
committermannol <eniz_vukovic@hotmail.com>2014-02-16 19:11:55 -0500
commit393433ce9910c3dffed9090c7965654f23a8e7a8 (patch)
treeb96e08543fa3a647099cb6f3a9e55836453f51bc /toxav/rtp.h
parent292708c33634ee0b9a2243a2181018565558bc5c (diff)
Public header ready to go
Diffstat (limited to 'toxav/rtp.h')
-rw-r--r--toxav/rtp.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/toxav/rtp.h b/toxav/rtp.h
index 4b0d681f..03f6a873 100644
--- a/toxav/rtp.h
+++ b/toxav/rtp.h
@@ -28,10 +28,14 @@
28#define RTP_VERSION 2 28#define RTP_VERSION 2
29#include <inttypes.h> 29#include <inttypes.h>
30#include <pthread.h> 30#include <pthread.h>
31#include "../toxcore/tox.h" 31
32#include "../toxcore/util.h"
33#include "../toxcore/network.h"
34#include "../toxcore/net_crypto.h"
35#include "../toxcore/Messenger.h"
32 36
33#define MAX_SEQU_NUM 65535 37#define MAX_SEQU_NUM 65535
34#define MAX_RTP_SIZE 10400 38#define MAX_RTP_SIZE 65535
35 39
36/** 40/**
37 * @brief Standard rtp header 41 * @brief Standard rtp header
@@ -72,7 +76,7 @@ typedef struct _RTPMessage {
72 76
73 uint8_t data[MAX_RTP_SIZE]; 77 uint8_t data[MAX_RTP_SIZE];
74 uint32_t length; 78 uint32_t length;
75 tox_IP_Port from; 79 IP_Port from;
76 80
77 struct _RTPMessage* next; 81 struct _RTPMessage* next;
78} RTPMessage; 82} RTPMessage;
@@ -128,7 +132,7 @@ typedef struct _RTPSession {
128 uint8_t prefix; 132 uint8_t prefix;
129 133
130 pthread_mutex_t mutex; 134 pthread_mutex_t mutex;
131 tox_IP_Port dest; 135 int dest;
132 136
133} RTPSession; 137} RTPSession;
134 138
@@ -164,7 +168,7 @@ RTPMessage* rtp_recv_msg ( RTPSession* session );
164 * @retval -1 On error. 168 * @retval -1 On error.
165 * @retval 0 On success. 169 * @retval 0 On success.
166 */ 170 */
167int rtp_send_msg ( RTPSession* session, Tox* messenger, const uint8_t* data, uint16_t length ); 171int rtp_send_msg ( RTPSession* session, Messenger* messenger, const uint8_t* data, uint16_t length );
168 172
169 173
170/** 174/**
@@ -192,7 +196,7 @@ void rtp_free_msg ( RTPSession* session, RTPMessage* msg );
192 * @retval NULL Error occurred. 196 * @retval NULL Error occurred.
193 */ 197 */
194RTPSession* rtp_init_session ( int payload_type, 198RTPSession* rtp_init_session ( int payload_type,
195 Tox* messenger, 199 Messenger* messenger,
196 int friend_num, 200 int friend_num,
197 const uint8_t* encrypt_key, 201 const uint8_t* encrypt_key,
198 const uint8_t* decrypt_key, 202 const uint8_t* decrypt_key,
@@ -209,7 +213,7 @@ RTPSession* rtp_init_session ( int payload_type,
209 * @retval -1 Error occurred. 213 * @retval -1 Error occurred.
210 * @retval 0 Success. 214 * @retval 0 Success.
211 */ 215 */
212int rtp_terminate_session ( RTPSession* session, Tox* messenger ); 216int rtp_terminate_session ( RTPSession* session, Messenger* messenger );
213 217
214 218
215 219