diff options
Diffstat (limited to 'toxav/toxav.api.h')
-rw-r--r-- | toxav/toxav.api.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/toxav/toxav.api.h b/toxav/toxav.api.h index 9e6cea68..29a61f16 100644 --- a/toxav/toxav.api.h +++ b/toxav/toxav.api.h | |||
@@ -605,6 +605,10 @@ namespace video { | |||
605 | %{ | 605 | %{ |
606 | /** | 606 | /** |
607 | * NOTE Compatibility with old toxav group calls. TODO(iphydf): remove | 607 | * NOTE Compatibility with old toxav group calls. TODO(iphydf): remove |
608 | * | ||
609 | * TODO(iphydf): Use proper new API guidelines for these. E.g. don't use inline | ||
610 | * function types, don't have per-callback userdata, especially don't have one | ||
611 | * userdata per group. | ||
608 | */ | 612 | */ |
609 | /* Create a new toxav group. | 613 | /* Create a new toxav group. |
610 | * | 614 | * |
@@ -616,8 +620,9 @@ namespace video { | |||
616 | * | 620 | * |
617 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | 621 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). |
618 | */ | 622 | */ |
619 | int toxav_add_av_groupchat(Tox *tox, void (*audio_callback)(void *, uint32_t, uint32_t, const int16_t *, unsigned int, uint8_t, | 623 | int toxav_add_av_groupchat(Tox *tox, |
620 | uint32_t, void *), void *userdata); | 624 | void (*audio_callback)(void *, uint32_t, uint32_t, const int16_t *, unsigned int, uint8_t, uint32_t, void *), |
625 | void *userdata); | ||
621 | 626 | ||
622 | /* Join a AV group (you need to have been invited first.) | 627 | /* Join a AV group (you need to have been invited first.) |
623 | * | 628 | * |
@@ -630,7 +635,8 @@ int toxav_add_av_groupchat(Tox *tox, void (*audio_callback)(void *, uint32_t, ui | |||
630 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). | 635 | * Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)). |
631 | */ | 636 | */ |
632 | int toxav_join_av_groupchat(Tox *tox, uint32_t friendnumber, const uint8_t *data, uint16_t length, | 637 | int toxav_join_av_groupchat(Tox *tox, uint32_t friendnumber, const uint8_t *data, uint16_t length, |
633 | void (*audio_callback)(void *, uint32_t, uint32_t, const int16_t *, unsigned int, uint8_t, uint32_t, void *), void *userdata); | 638 | void (*audio_callback)(void *, uint32_t, uint32_t, const int16_t *, unsigned int, uint8_t, uint32_t, void *), |
639 | void *userdata); | ||
634 | 640 | ||
635 | /* Send audio to the group chat. | 641 | /* Send audio to the group chat. |
636 | * | 642 | * |
@@ -651,5 +657,16 @@ int toxav_group_send_audio(Tox *tox, uint32_t groupnumber, const int16_t *pcm, u | |||
651 | #ifdef __cplusplus | 657 | #ifdef __cplusplus |
652 | } | 658 | } |
653 | #endif | 659 | #endif |
660 | |||
661 | typedef void toxav_group_audio_cb(Tox *tox, uint32_t groupnumber, uint32_t peernumber, const int16_t *pcm, uint32_t samples, uint8_t channels, uint32_t sample_rate, void *user_data); | ||
662 | |||
663 | typedef TOXAV_ERR_CALL Toxav_Err_Call; | ||
664 | typedef TOXAV_ERR_NEW Toxav_Err_New; | ||
665 | typedef TOXAV_ERR_ANSWER Toxav_Err_Answer; | ||
666 | typedef TOXAV_ERR_CALL_CONTROL Toxav_Err_Call_Control; | ||
667 | typedef TOXAV_ERR_BIT_RATE_SET Toxav_Err_Bit_Rate_Set; | ||
668 | typedef TOXAV_ERR_SEND_FRAME Toxav_Err_Send_Frame; | ||
669 | typedef TOXAV_CALL_CONTROL Toxav_Call_Control; | ||
670 | |||
654 | #endif /* TOXAV_H */ | 671 | #endif /* TOXAV_H */ |
655 | %} | 672 | %} |