mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:53:05 +01:00
Merge branch 'TokTok-master'
This commit is contained in:
commit
32bd9dc1a7
26
BUILD.bazel
Normal file
26
BUILD.bazel
Normal file
@ -0,0 +1,26 @@
|
||||
cc_binary(
|
||||
name = "toxic",
|
||||
srcs = glob([
|
||||
"src/*.c",
|
||||
"src/*.h",
|
||||
]),
|
||||
copts = [
|
||||
"-DAUDIO",
|
||||
"-DPACKAGE_DATADIR='\"data\"'",
|
||||
"-DPYTHON",
|
||||
"-DVIDEO",
|
||||
],
|
||||
linkopts = [
|
||||
"-lconfig",
|
||||
"-lncurses",
|
||||
"-lopenal",
|
||||
"-lX11",
|
||||
],
|
||||
deps = [
|
||||
"//c-toxcore",
|
||||
"@curl",
|
||||
"@libqrencode",
|
||||
"@libvpx",
|
||||
"@python3//:python",
|
||||
],
|
||||
)
|
2
Makefile
2
Makefile
@ -3,7 +3,7 @@ CFG_DIR = $(BASE_DIR)/cfg
|
||||
|
||||
-include $(CFG_DIR)/global_vars.mk
|
||||
|
||||
LIBS = toxcore ncursesw libconfig
|
||||
LIBS = toxcore ncursesw libconfig libqrencode
|
||||
|
||||
CFLAGS = -std=gnu99 -pthread -Wall -g -fstack-protector-all
|
||||
CFLAGS += '-DTOXICVER="$(VERSION)"' -DHAVE_WIDECHAR -D_XOPEN_SOURCE_EXTENDED -D_FILE_OFFSET_BITS=64
|
||||
|
@ -31,6 +31,8 @@
|
||||
#include "friendlist.h"
|
||||
#include "chat.h"
|
||||
|
||||
#ifdef AUDIO
|
||||
|
||||
#ifdef VIDEO
|
||||
#include "video_call.h"
|
||||
#endif /* VIDEO */
|
||||
@ -862,7 +864,7 @@ void cmd_bitrate(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)
|
||||
break;
|
||||
|
||||
case TOXAV_ERR_BIT_RATE_SET_INVALID_BIT_RATE:
|
||||
error_str = "Invalid AV bit rate value (valid is 6-510)";
|
||||
error_str = "Invalid audio bit rate value (valid is 6-510)";
|
||||
break;
|
||||
|
||||
case TOXAV_ERR_BIT_RATE_SET_FRIEND_NOT_FOUND:
|
||||
@ -942,3 +944,5 @@ void del_friend_AV(uint32_t index)
|
||||
realloc_calls(index);
|
||||
CallControl.max_calls = index;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef VIDEO
|
||||
|
||||
#define default_video_bit_rate 5000
|
||||
|
||||
void receive_video_frame_cb( ToxAV *av, uint32_t friend_number,
|
||||
@ -422,3 +424,5 @@ void stop_video_stream(ToxWindow *self)
|
||||
if (this_call && this_call->vin_idx != -1)
|
||||
stop_video_transmission(this_call, self->num);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -55,6 +55,8 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef VIDEO
|
||||
|
||||
#define inline__ inline __attribute__((always_inline))
|
||||
|
||||
extern struct user_settings *user_settings;
|
||||
@ -96,9 +98,7 @@ static int size[2]; /* Size of above containers */
|
||||
VideoDevice *video_devices_running[2][MAX_DEVICES] = {{NULL}}; /* Running devices */
|
||||
uint32_t primary_video_device[2]; /* Primary device */
|
||||
|
||||
#ifdef VIDEO
|
||||
static ToxAV *av = NULL;
|
||||
#endif /* VIDEO */
|
||||
|
||||
/* q_mutex */
|
||||
#define lock pthread_mutex_lock(&video_mutex);
|
||||
@ -827,3 +827,5 @@ VideoDeviceError video_selection_valid(VideoDeviceType type, int32_t selection)
|
||||
{
|
||||
return (size[type] <= selection || selection < 0) ? vde_InvalidSelection : vde_None;
|
||||
}
|
||||
|
||||
#endif /* VIDEO */
|
||||
|
Loading…
Reference in New Issue
Block a user