diff options
author | Dmytro Vorobiov <d@dvor.me> | 2016-10-28 22:11:48 +0200 |
---|---|---|
committer | Dmytro Vorobiov <d@dvor.me> | 2016-10-28 22:11:48 +0200 |
commit | 59d27e6d941e429cf180ce66a5154e655fc5b77a (patch) | |
tree | b3f0b398765a668f8511432efe89e62bd65169ea /toxav/groupav.h | |
parent | de966cdf90843819e2f7287e22ddcb5f95491b18 (diff) |
toxav renaming: group.{h,c} -> groupav.{h,c}
toxav file for "group" conflicts with toxcore "group" file. While this
works fine in almost all cases, Xcode on macOS is confused with that.
Diffstat (limited to 'toxav/groupav.h')
-rw-r--r-- | toxav/groupav.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/toxav/groupav.h b/toxav/groupav.h new file mode 100644 index 00000000..1929b17c --- /dev/null +++ b/toxav/groupav.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /** groupav.c | ||
2 | * | ||
3 | * Copyright (C) 2014 Tox project All Rights Reserved. | ||
4 | * | ||
5 | * This file is part of Tox. | ||
6 | * | ||
7 | * Tox is free software: you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation, either version 3 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * Tox is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with Tox. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #include "../toxcore/group.h" | ||
22 | |||
23 | /* Audio encoding/decoding */ | ||
24 | #include <opus.h> | ||
25 | |||
26 | #define GROUP_AUDIO_PACKET_ID 192 | ||
27 | |||
28 | /* Create a new toxav group. | ||
29 | * | ||
30 | * return group number on success. | ||
31 | * return -1 on failure. | ||
32 | */ | ||
33 | int add_av_groupchat(Logger *log, Group_Chats *g_c, void (*audio_callback)(Messenger *, int, int, const int16_t *, | ||
34 | unsigned int, | ||
35 | uint8_t, unsigned int, void *), void *userdata); | ||
36 | |||
37 | /* Join a AV group (you need to have been invited first.) | ||
38 | * | ||
39 | * returns group number on success | ||
40 | * returns -1 on failure. | ||
41 | */ | ||
42 | int join_av_groupchat(Logger *log, Group_Chats *g_c, int32_t friendnumber, const uint8_t *data, uint16_t length, | ||
43 | void (*audio_callback)(Messenger *, int, int, const int16_t *, unsigned int, uint8_t, unsigned int, void *), | ||
44 | void *userdata); | ||
45 | |||
46 | |||
47 | /* Send audio to the group chat. | ||
48 | * | ||
49 | * return 0 on success. | ||
50 | * return -1 on failure. | ||
51 | */ | ||
52 | int group_send_audio(Group_Chats *g_c, int groupnumber, const int16_t *pcm, unsigned int samples, uint8_t channels, | ||
53 | unsigned int sample_rate); | ||
54 | |||