summaryrefslogtreecommitdiff
path: root/toxav/msi.h
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-07-26 21:26:32 -0400
committerirungentoo <irungentoo@gmail.com>2014-07-26 21:26:32 -0400
commitab4673e87340b24c58ceaf82e2d41b5a3bee695f (patch)
tree57a628ee871992cb789b310d95cf0cc12f72aabf /toxav/msi.h
parentd052bbc3ebb378c9a69bbd7e35f001da2e2782aa (diff)
parentee3822f24b14a76e6e1d833f521618f38bdc26b9 (diff)
Merge branch 'mannol1-master'
Diffstat (limited to 'toxav/msi.h')
-rw-r--r--toxav/msi.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/toxav/msi.h b/toxav/msi.h
index b99b2de8..64fa0881 100644
--- a/toxav/msi.h
+++ b/toxav/msi.h
@@ -54,6 +54,22 @@ typedef enum {
54} MSICallState; 54} MSICallState;
55 55
56 56
57/**
58 * @brief Encoding settings.
59 */
60typedef struct _MSICodecSettings {
61 MSICallType call_type;
62
63 uint32_t video_bitrate; /* In kbits/s */
64 uint16_t max_video_width; /* In px */
65 uint16_t max_video_height; /* In px */
66
67 uint32_t audio_bitrate; /* In bits/s */
68 uint16_t audio_frame_duration; /* In ms */
69 uint32_t audio_sample_rate; /* In Hz */
70 uint32_t audio_channels;
71} MSICSettings;
72
57 73
58/** 74/**
59 * @brief Callbacks ids that handle the states 75 * @brief Callbacks ids that handle the states
@@ -94,8 +110,8 @@ typedef struct _MSICall { /* Call info structure */
94 110
95 MSICallState state; 111 MSICallState state;
96 112
97 MSICallType type_local; /* Type of payload user is ending */ 113 MSICSettings csettings_local; /* Local call settings */
98 MSICallType *type_peer; /* Type of payload others are sending */ 114 MSICSettings *csettings_peer; /* Peers call settings */
99 115
100 MSICallIDType id; /* Random value identifying the call */ 116 MSICallIDType id; /* Random value identifying the call */
101 117
@@ -176,7 +192,8 @@ int msi_terminate_session ( MSISession *session );
176 * @param friend_id The friend. 192 * @param friend_id The friend.
177 * @return int 193 * @return int
178 */ 194 */
179int msi_invite ( MSISession *session, int32_t *call_index, MSICallType call_type, uint32_t rngsec, uint32_t friend_id ); 195int msi_invite ( MSISession *session, int32_t *call_index, MSICSettings csettings, uint32_t rngsec,
196 uint32_t friend_id );
180 197
181 198
182/** 199/**
@@ -199,7 +216,7 @@ int msi_hangup ( MSISession *session, int32_t call_index );
199 * @param call_type Answer with Audio or Video(both). 216 * @param call_type Answer with Audio or Video(both).
200 * @return int 217 * @return int
201 */ 218 */
202int msi_answer ( MSISession *session, int32_t call_index, MSICallType call_type ); 219int msi_answer ( MSISession *session, int32_t call_index, MSICSettings csettings );
203 220
204 221
205/** 222/**
@@ -235,7 +252,7 @@ int msi_reject ( MSISession *session, int32_t call_index, const char *reason );
235 * @param friend_id The friend. 252 * @param friend_id The friend.
236 * @return int 253 * @return int
237 */ 254 */
238int msi_change_type ( MSISession *session, int32_t call_index, MSICallType call_type ); 255int msi_change_csettings ( MSISession *session, int32_t call_index, MSICSettings csettings );
239 256
240 257
241/** 258/**