1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-22 20:33:02 +01:00

Don't compile A/V code if AUDIO/VIDEO are not #defined.

This commit is contained in:
iphydf 2018-07-06 15:45:35 +00:00
parent 43ca840658
commit 3cd2bc7e3c
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
3 changed files with 12 additions and 2 deletions

View File

@ -31,6 +31,8 @@
#include "friendlist.h"
#include "chat.h"
#ifdef AUDIO
#ifdef VIDEO
#include "video_call.h"
#endif /* VIDEO */
@ -942,3 +944,5 @@ void del_friend_AV(uint32_t index)
realloc_calls(index);
CallControl.max_calls = index;
}
#endif

View File

@ -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

View File

@ -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 */