diff options
author | irungentoo <irungentoo@gmail.com> | 2014-02-16 19:13:34 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-02-16 19:13:34 -0500 |
commit | 9d1eb27717472f5655242fac7b8123a44f1ff33c (patch) | |
tree | fd205f1ea53749717d9930d93ddb153fc8a16929 /toxmsi/phone.h | |
parent | fd3dc22ef3bd77beb78faf24cd43e9d2b9706f5d (diff) | |
parent | f79b327fd639b2dcca9d4d2c137f93c1dce622fc (diff) |
Merge branch 'av-fix' into av-good
Diffstat (limited to 'toxmsi/phone.h')
-rw-r--r-- | toxmsi/phone.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/toxmsi/phone.h b/toxmsi/phone.h deleted file mode 100644 index f96aac73..00000000 --- a/toxmsi/phone.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | #ifndef _PHONE_H_ | ||
2 | #define _PHONE_H_ | ||
3 | |||
4 | #include "toxmsi.h" | ||
5 | #include "../toxrtp/toxrtp.h" | ||
6 | #include "toxmsi_message.h" | ||
7 | #include "../toxrtp/toxrtp_message.h" | ||
8 | #include "../toxrtp/tests/test_helper.h" | ||
9 | #include <assert.h> | ||
10 | #include <pthread.h> | ||
11 | #include "toxmedia.h" | ||
12 | |||
13 | /* Define client version */ | ||
14 | #define _USERAGENT "tox_phone-v.0.2.1" | ||
15 | |||
16 | static pthread_mutex_t _mutex; | ||
17 | |||
18 | #define THREADLOCK() \ | ||
19 | pthread_mutex_lock ( &_mutex ); | ||
20 | |||
21 | #define THREADUNLOCK() \ | ||
22 | pthread_mutex_unlock ( &_mutex ); | ||
23 | |||
24 | typedef struct phone_s { | ||
25 | msi_session_t* _msi; | ||
26 | |||
27 | rtp_session_t* _rtp_audio; | ||
28 | rtp_session_t* _rtp_video; | ||
29 | |||
30 | uint32_t _frame_rate; | ||
31 | |||
32 | uint16_t _send_port, _recv_port; | ||
33 | |||
34 | int _tox_sock; | ||
35 | |||
36 | pthread_t _medialoop_id; | ||
37 | codec_state *cs; | ||
38 | |||
39 | Networking_Core* _networking; | ||
40 | } phone_t; | ||
41 | |||
42 | phone_t* initPhone(uint16_t _listen_port, uint16_t _send_port); | ||
43 | int quitPhone(phone_t* _phone); | ||
44 | |||
45 | /* My recv functions */ | ||
46 | int rtp_handlepacket ( void* _object, tox_IP_Port ip_port, uint8_t* data, uint32_t length ); | ||
47 | int msi_handlepacket ( void* _object, tox_IP_Port ip_port, uint8_t* data, uint32_t length ); | ||
48 | |||
49 | /* This is basically representation of networking_poll of toxcore */ | ||
50 | void* phone_receivepacket ( void* _phone ); | ||
51 | |||
52 | /* Phones main loop */ | ||
53 | void* phone_poll ( void* _phone ); | ||
54 | |||
55 | pthread_t phone_startmain_loop(phone_t* _phone); | ||
56 | pthread_t phone_startmedia_loop ( phone_t* _phone ); | ||
57 | |||
58 | /* Thread handlers */ | ||
59 | void* phone_handle_receive_callback ( void* _p ); | ||
60 | void* phone_handle_media_transport_poll ( void* _hmtc_args_p ); | ||
61 | |||
62 | #endif /* _PHONE_H_ */ | ||