Skip to content

Commit

Permalink
Merge branch 'dvor/migrating-to-toktok-toxcore'
Browse files Browse the repository at this point in the history
  • Loading branch information
dvor committed Nov 5, 2016
2 parents c3bd97b + 509d536 commit 6496afc
Show file tree
Hide file tree
Showing 72 changed files with 9,708 additions and 4,601 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "toxcore"]
path = toxcore-git
url = https://github.com/irungentoo/toxcore.git
url = https://github.com/toktok/c-toxcore.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# toxcore

CocoaPods wrapper for [toxcore](https://github.com/irungentoo/toxcore).
CocoaPods wrapper for [toxcore](https://github.com/toktok/c-toxcore).

#### Note

Expand Down
73 changes: 17 additions & 56 deletions install-tox.patch
Original file line number Diff line number Diff line change
@@ -1,70 +1,31 @@
diff --git a/toxcore/toxav/Makefile.inc b/toxcore/toxav/Makefile.inc
index 377588d..2ebe6b9 100644
--- a/toxcore/toxav/Makefile.inc
+++ b/toxcore/toxav/Makefile.inc
@@ -8,7 +8,7 @@ libtoxav_la_SOURCES = ../toxav/rtp.h \
../toxav/rtp.c \
../toxav/msi.h \
../toxav/msi.c \
- ../toxav/group.h \
+ ../toxav/groupav.h \
../toxav/group.c \
../toxav/audio.h \
../toxav/audio.c \
diff --git a/toxcore/toxav/audio.h b/toxcore/toxav/audio.h
index b1db744..7b2af93 100644
index 5f9d7f7..e4b8f61 100644
--- a/toxcore/toxav/audio.h
+++ b/toxcore/toxav/audio.h
@@ -22,7 +22,7 @@
#ifndef AUDIO_H
#define AUDIO_H
@@ -27,7 +27,7 @@
#include "../toxcore/logger.h"
#include "../toxcore/util.h"

-#include <opus.h>
+#include "opus.h"
#include <pthread.h>

#include "toxav.h"
diff --git a/toxcore/toxav/group.h b/toxcore/toxav/group.h
index 3355a44..ea18a15 100644
--- a/toxcore/toxav/group.h
+++ b/toxcore/toxav/group.h
@@ -19,7 +19,7 @@
*/
struct RTPMessage;
diff --git a/toxcore/toxav/groupav.h b/toxcore/toxav/groupav.h
index 1929b17..b791111 100644
--- a/toxcore/toxav/groupav.h
+++ b/toxcore/toxav/groupav.h
@@ -21,7 +21,7 @@
#include "../toxcore/group.h"

/* Audio encoding/decoding */
-#include <opus.h>
+#include "opus.h"

#include "../toxcore/group.h"

diff --git a/toxcore/toxav/group.m b/toxcore/toxav/group.m
index 190c2c3..e22bd97 100644
--- a/toxcore/toxav/group.m
+++ b/toxcore/toxav/group.m
@@ -22,7 +22,7 @@
#include "config.h"
#endif /* HAVE_CONFIG_H */

-#include "group.h"
+#include "groupav.h"
#include "../toxcore/util.h"
#include "../toxcore/logger.h"

diff --git a/toxcore/toxav/toxav_old.m b/toxcore/toxav/toxav_old.m
index 7d7e5e7..bb9d811 100644
--- a/toxcore/toxav/toxav_old.m
+++ b/toxcore/toxav/toxav_old.m
@@ -23,7 +23,7 @@
*/

#include "toxav.h"
-#include "group.h"
+#include "groupav.h"
#define GROUP_AUDIO_PACKET_ID 192

/* Create a new toxav group.
*
diff --git a/toxcore/toxcore/crypto_core.h b/toxcore/toxcore/crypto_core.h
index eefb1d9..9147d00 100644
index 2e89896..5c4bb70 100644
--- a/toxcore/toxcore/crypto_core.h
+++ b/toxcore/toxcore/crypto_core.h
@@ -27,7 +27,7 @@
Expand All @@ -75,17 +36,17 @@ index eefb1d9..9147d00 100644
+#include "sodium.h"
#else
#include <crypto_box.h>
#include <randombytes.h>
#include <crypto_hash_sha256.h>
diff --git a/toxcore/toxcore/network.m b/toxcore/toxcore/network.m
index 965e65f..2a4e854 100644
index 386f8c1..b441273 100644
--- a/toxcore/toxcore/network.m
+++ b/toxcore/toxcore/network.m
@@ -437,7 +437,7 @@ void networking_poll(Networking_Core *net)
@@ -457,7 +457,7 @@ void networking_poll(Networking_Core *net, void *userdata)

#ifndef VANILLA_NACL
/* Used for sodium_init() */
-#include <sodium.h>
+#include "sodium.h"
#endif

uint8_t at_startup_ran = 0;
static uint8_t at_startup_ran = 0;
3 changes: 0 additions & 3 deletions install-tox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ done
echo "Applying install-tox.patch"
git apply install-tox.patch

echo "Renaming toxav/group.* files to toxav/groupav.*"
mv -v $OUTPUT/toxav/group.h $OUTPUT/toxav/groupav.h
mv -v $OUTPUT/toxav/group.m $OUTPUT/toxav/groupav.m
2 changes: 1 addition & 1 deletion toxcore-git
Submodule toxcore-git updated 160 files
6 changes: 4 additions & 2 deletions toxcore/toxav/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ libtoxav_la_SOURCES = ../toxav/rtp.h \
../toxav/msi.h \
../toxav/msi.c \
../toxav/groupav.h \
../toxav/group.c \
../toxav/groupav.c \
../toxav/audio.h \
../toxav/audio.c \
../toxav/video.h \
../toxav/video.c \
../toxav/bwcontroller.h \
../toxav/bwcontroller.c \
../toxav/ring_buffer.h \
../toxav/ring_buffer.c \
../toxav/toxav.h \
../toxav/toxav.c \
../toxav/toxav_old.c
Expand All @@ -39,4 +41,4 @@ libtoxav_la_LIBADD = libtoxcore.la \
$(PTHREAD_LIBS) \
$(AV_LIBS)

endif
endif
11 changes: 7 additions & 4 deletions toxcore/toxav/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@
#ifndef AUDIO_H
#define AUDIO_H

#include "opus.h"
#include <pthread.h>

#include "toxav.h"

#include "../toxcore/logger.h"
#include "../toxcore/util.h"

#include "opus.h"
#include <pthread.h>

struct RTPMessage;

typedef struct ACSession_s {
Logger *log;

/* encoding */
OpusEncoder *encoder;
int32_t le_sample_rate; /* Last encoder sample rate */
Expand All @@ -55,7 +58,7 @@ typedef struct ACSession_s {
PAIR(toxav_audio_receive_frame_cb *, void *) acb; /* Audio frame receive callback */
} ACSession;

ACSession *ac_new(ToxAV *av, uint32_t friend_number, toxav_audio_receive_frame_cb *cb, void *cb_data);
ACSession *ac_new(Logger *log, ToxAV *av, uint32_t friend_number, toxav_audio_receive_frame_cb *cb, void *cb_data);
void ac_kill(ACSession *ac);
void ac_iterate(ACSession *ac);
int ac_queue_message(void *acp, struct RTPMessage *msg);
Expand Down
Loading

0 comments on commit 6496afc

Please sign in to comment.