mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 01:23:03 +01:00
Don't compile A/V code if AUDIO/VIDEO are not #defined.
This commit is contained in:
parent
43ca840658
commit
3cd2bc7e3c
@ -31,6 +31,8 @@
|
|||||||
#include "friendlist.h"
|
#include "friendlist.h"
|
||||||
#include "chat.h"
|
#include "chat.h"
|
||||||
|
|
||||||
|
#ifdef AUDIO
|
||||||
|
|
||||||
#ifdef VIDEO
|
#ifdef VIDEO
|
||||||
#include "video_call.h"
|
#include "video_call.h"
|
||||||
#endif /* VIDEO */
|
#endif /* VIDEO */
|
||||||
@ -942,3 +944,5 @@ void del_friend_AV(uint32_t index)
|
|||||||
realloc_calls(index);
|
realloc_calls(index);
|
||||||
CallControl.max_calls = index;
|
CallControl.max_calls = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -37,6 +37,8 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
#ifdef VIDEO
|
||||||
|
|
||||||
#define default_video_bit_rate 5000
|
#define default_video_bit_rate 5000
|
||||||
|
|
||||||
void receive_video_frame_cb( ToxAV *av, uint32_t friend_number,
|
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)
|
if (this_call && this_call->vin_idx != -1)
|
||||||
stop_video_transmission(this_call, self->num);
|
stop_video_transmission(this_call, self->num);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -55,6 +55,8 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#ifdef VIDEO
|
||||||
|
|
||||||
#define inline__ inline __attribute__((always_inline))
|
#define inline__ inline __attribute__((always_inline))
|
||||||
|
|
||||||
extern struct user_settings *user_settings;
|
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 */
|
VideoDevice *video_devices_running[2][MAX_DEVICES] = {{NULL}}; /* Running devices */
|
||||||
uint32_t primary_video_device[2]; /* Primary device */
|
uint32_t primary_video_device[2]; /* Primary device */
|
||||||
|
|
||||||
#ifdef VIDEO
|
|
||||||
static ToxAV *av = NULL;
|
static ToxAV *av = NULL;
|
||||||
#endif /* VIDEO */
|
|
||||||
|
|
||||||
/* q_mutex */
|
/* q_mutex */
|
||||||
#define lock pthread_mutex_lock(&video_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;
|
return (size[type] <= selection || selection < 0) ? vde_InvalidSelection : vde_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* VIDEO */
|
||||||
|
Loading…
Reference in New Issue
Block a user