diff options
Diffstat (limited to 'toxav/msi.h')
-rw-r--r-- | toxav/msi.h | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/toxav/msi.h b/toxav/msi.h index 59f32c1d..e69581d1 100644 --- a/toxav/msi.h +++ b/toxav/msi.h | |||
@@ -29,9 +29,6 @@ | |||
29 | #include "video.h" | 29 | #include "video.h" |
30 | #include "../toxcore/Messenger.h" | 30 | #include "../toxcore/Messenger.h" |
31 | 31 | ||
32 | /** Preconfigured value for video splitting */ | ||
33 | #define VIDEOFRAME_PIECE_SIZE 500 | ||
34 | |||
35 | /** | 32 | /** |
36 | * Error codes. | 33 | * Error codes. |
37 | */ | 34 | */ |
@@ -89,13 +86,13 @@ typedef struct MSICall_s { | |||
89 | uint8_t peer_capabilities; /* Peer capabilities */ | 86 | uint8_t peer_capabilities; /* Peer capabilities */ |
90 | uint8_t self_capabilities; /* Self capabilities */ | 87 | uint8_t self_capabilities; /* Self capabilities */ |
91 | uint16_t peer_vfpsz; /* Video frame piece size */ | 88 | uint16_t peer_vfpsz; /* Video frame piece size */ |
92 | uint32_t friend_number; /* Index of this call in MSISession */ | 89 | uint32_t friend_number; /* Index of this call in MSISession */ |
93 | MSIError error; /* Last error */ | 90 | MSIError error; /* Last error */ |
94 | 91 | ||
95 | void* av_call; /* Pointer to av call handler */ | 92 | void *av_call; /* Pointer to av call handler */ |
96 | 93 | ||
97 | struct MSICall_s* next; | 94 | struct MSICall_s *next; |
98 | struct MSICall_s* prev; | 95 | struct MSICall_s *prev; |
99 | } MSICall; | 96 | } MSICall; |
100 | 97 | ||
101 | 98 | ||
@@ -104,7 +101,7 @@ typedef struct MSICall_s { | |||
104 | * returned the call is considered errored and will be handled | 101 | * returned the call is considered errored and will be handled |
105 | * as such which means it will be terminated without any notice. | 102 | * as such which means it will be terminated without any notice. |
106 | */ | 103 | */ |
107 | typedef int msi_action_cb ( void *av, MSICall* call); | 104 | typedef int msi_action_cb (void *av, MSICall *call); |
108 | 105 | ||
109 | /** | 106 | /** |
110 | * Control session struct. Please do not modify outside msi.c | 107 | * Control session struct. Please do not modify outside msi.c |
@@ -114,41 +111,41 @@ typedef struct MSISession_s { | |||
114 | MSICall **calls; | 111 | MSICall **calls; |
115 | uint32_t calls_tail; | 112 | uint32_t calls_tail; |
116 | uint32_t calls_head; | 113 | uint32_t calls_head; |
117 | 114 | ||
118 | void *av; | 115 | void *av; |
119 | Messenger *messenger; | 116 | Messenger *messenger; |
120 | 117 | ||
121 | pthread_mutex_t mutex[1]; | 118 | pthread_mutex_t mutex[1]; |
122 | msi_action_cb* callbacks[7]; | 119 | msi_action_cb *callbacks[7]; |
123 | } MSISession; | 120 | } MSISession; |
124 | 121 | ||
125 | /** | 122 | /** |
126 | * Start the control session. | 123 | * Start the control session. |
127 | */ | 124 | */ |
128 | MSISession *msi_new ( Messenger *m ); | 125 | MSISession *msi_new(Messenger *m); |
129 | /** | 126 | /** |
130 | * Terminate control session. NOTE: all calls will be freed | 127 | * Terminate control session. NOTE: all calls will be freed |
131 | */ | 128 | */ |
132 | int msi_kill ( MSISession *session ); | 129 | int msi_kill(MSISession *session); |
133 | /** | 130 | /** |
134 | * Callback setter. | 131 | * Callback setter. |
135 | */ | 132 | */ |
136 | void msi_register_callback(MSISession *session, msi_action_cb* callback, MSICallbackID id); | 133 | void msi_register_callback(MSISession *session, msi_action_cb *callback, MSICallbackID id); |
137 | /** | 134 | /** |
138 | * Send invite request to friend_number. | 135 | * Send invite request to friend_number. |
139 | */ | 136 | */ |
140 | int msi_invite ( MSISession* session, MSICall** call, uint32_t friend_number, uint8_t capabilities ); | 137 | int msi_invite(MSISession *session, MSICall **call, uint32_t friend_number, uint8_t capabilities); |
141 | /** | 138 | /** |
142 | * Hangup call. NOTE: 'call' will be freed | 139 | * Hangup call. NOTE: 'call' will be freed |
143 | */ | 140 | */ |
144 | int msi_hangup ( MSICall* call ); | 141 | int msi_hangup(MSICall *call); |
145 | /** | 142 | /** |
146 | * Answer call request. | 143 | * Answer call request. |
147 | */ | 144 | */ |
148 | int msi_answer ( MSICall* call, uint8_t capabilities ); | 145 | int msi_answer(MSICall *call, uint8_t capabilities); |
149 | /** | 146 | /** |
150 | * Change capabilities of the call. | 147 | * Change capabilities of the call. |
151 | */ | 148 | */ |
152 | int msi_change_capabilities ( MSICall* call, uint8_t capabilities ); | 149 | int msi_change_capabilities(MSICall *call, uint8_t capabilities); |
153 | 150 | ||
154 | #endif /* MSI_H */ | 151 | #endif /* MSI_H */ |