summaryrefslogtreecommitdiff
path: root/toxav/toxav.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/toxav.h')
-rw-r--r--toxav/toxav.h43
1 files changed, 17 insertions, 26 deletions
diff --git a/toxav/toxav.h b/toxav/toxav.h
index b7659441..0ded42bd 100644
--- a/toxav/toxav.h
+++ b/toxav/toxav.h
@@ -165,6 +165,22 @@ void toxav_kill(ToxAv *av);
165void toxav_register_callstate_callback (ToxAVCallback callback, ToxAvCallbackID id, void *userdata); 165void toxav_register_callstate_callback (ToxAVCallback callback, ToxAvCallbackID id, void *userdata);
166 166
167/** 167/**
168 * @brief Register callback for recieving audio data
169 *
170 * @param callback The callback
171 * @return void
172 */
173void toxav_register_audio_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, int16_t *, int));
174
175/**
176 * @brief Register callback for recieving video data
177 *
178 * @param callback The callback
179 * @return void
180 */
181void toxav_register_video_recv_callback (ToxAv *av, void (*callback)(ToxAv *, int32_t, vpx_image_t *));
182
183/**
168 * @brief Call user. Use its friend_id. 184 * @brief Call user. Use its friend_id.
169 * 185 *
170 * @param av Handler. 186 * @param av Handler.
@@ -253,31 +269,6 @@ int toxav_prepare_transmission(ToxAv *av, int32_t call_index, ToxAvCodecSettings
253int toxav_kill_transmission(ToxAv *av, int32_t call_index); 269int toxav_kill_transmission(ToxAv *av, int32_t call_index);
254 270
255/** 271/**
256 * @brief Receive decoded video packet.
257 *
258 * @param av Handler.
259 * @param output Storage.
260 * @return int
261 * @retval 0 Success.
262 * @retval ToxAvError On Error.
263 */
264int toxav_recv_video ( ToxAv *av, int32_t call_index, vpx_image_t **output);
265
266/**
267 * @brief Receive decoded audio frame.
268 *
269 * @param av Handler.
270 * @param frame_size The size of dest in frames/samples (one frame/sample is 16 bits or 2 bytes
271 * and corresponds to one sample of audio.)
272 * @param dest Destination of the raw audio (16 bit signed pcm with AUDIO_CHANNELS channels).
273 * Make sure it has enough space for frame_size frames/samples.
274 * @return int
275 * @retval >=0 Size of received data in frames/samples.
276 * @retval ToxAvError On error.
277 */
278int toxav_recv_audio( ToxAv *av, int32_t call_index, int frame_size, int16_t *dest );
279
280/**
281 * @brief Encode and send video packet. 272 * @brief Encode and send video packet.
282 * 273 *
283 * @param av Handler. 274 * @param av Handler.
@@ -399,4 +390,4 @@ int toxav_has_activity ( ToxAv *av, int32_t call_index, int16_t *PCM, uint16_t f
399} 390}
400#endif 391#endif
401 392
402#endif /* __TOXAV */ \ No newline at end of file 393#endif /* __TOXAV */