mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-24 19:52:35 +00:00
switch_rtp windows tweaks and type changes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1026 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ab65eb3873
commit
7f03b92fe6
@ -38,13 +38,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <winsock2.h>
|
|
||||||
typedef SOCKET switch_raw_socket_t;
|
|
||||||
#else
|
|
||||||
typedef int switch_raw_socket_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __ICC
|
#ifdef __ICC
|
||||||
#pragma warning (disable:810 869 981 279 1469 188)
|
#pragma warning (disable:810 869 981 279 1469 188)
|
||||||
#endif
|
#endif
|
||||||
@ -67,8 +60,9 @@ typedef int switch_raw_socket_t;
|
|||||||
* C4204: nonstandard extension used : non-constant aggregate initializer
|
* C4204: nonstandard extension used : non-constant aggregate initializer
|
||||||
* C4706: assignment within conditional expression
|
* C4706: assignment within conditional expression
|
||||||
* C4055: type cast from data pointer to function pointer (apr carries function pointers as data pointers)
|
* C4055: type cast from data pointer to function pointer (apr carries function pointers as data pointers)
|
||||||
|
* C4214: nonstandard extension used : bit field types other than int
|
||||||
*/
|
*/
|
||||||
#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706 4055)
|
#pragma warning(disable:4152 4054 4100 4142 4200 4204 4706 4055 4214)
|
||||||
|
|
||||||
#if (_MSC_VER >= 1400) // VC8+
|
#if (_MSC_VER >= 1400) // VC8+
|
||||||
#ifndef _CRT_SECURE_NO_DEPRECATE
|
#ifndef _CRT_SECURE_NO_DEPRECATE
|
||||||
|
@ -55,31 +55,27 @@ typedef void (*switch_rtp_invalid_handler)(switch_rtp *rtp_session,
|
|||||||
switch_sockaddr_t *from_addr);
|
switch_sockaddr_t *from_addr);
|
||||||
|
|
||||||
|
|
||||||
switch_rtp *switch_rtp_new(char *rx_ip,
|
SWITCH_DECLARE(switch_rtp *)switch_rtp_new(char *rx_ip,
|
||||||
int rx_port,
|
switch_port_t rx_port,
|
||||||
char *tx_ip,
|
char *tx_ip,
|
||||||
int tx_port,
|
switch_port_t tx_port,
|
||||||
int payload,
|
int payload,
|
||||||
switch_rtp_flag_t flags,
|
switch_rtp_flag_t flags,
|
||||||
const char **err,
|
const char **err,
|
||||||
switch_memory_pool *pool);
|
switch_memory_pool *pool);
|
||||||
|
|
||||||
void switch_rtp_destroy(switch_rtp **rtp_session);
|
SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp **rtp_session);
|
||||||
switch_socket_t *switch_rtp_get_rtp_socket(switch_rtp *rtp_session);
|
SWITCH_DECLARE(switch_socket_t *)switch_rtp_get_rtp_socket(switch_rtp *rtp_session);
|
||||||
void switch_rtp_set_invald_handler(switch_rtp *rtp_session, switch_rtp_invalid_handler on_invalid);
|
SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp *rtp_session, switch_rtp_invalid_handler on_invalid);
|
||||||
int switch_rtp_read(switch_rtp *rtp_session, void *data, uint32_t datalen, int *payload_type);
|
SWITCH_DECLARE(int) switch_rtp_read(switch_rtp *rtp_session, void *data, uint32_t datalen, int *payload_type);
|
||||||
int switch_rtp_zerocopy_read(switch_rtp *rtp_session, void **data, int *payload_type);
|
SWITCH_DECLARE(int) switch_rtp_zerocopy_read(switch_rtp *rtp_session, void **data, int *payload_type);
|
||||||
int switch_rtp_write(switch_rtp *rtp_session, void *data, int datalen, uint32_t ts);
|
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, int datalen, uint32_t ts);
|
||||||
int switch_rtp_write_payload(switch_rtp *rtp_session, void *data, int datalen, int payload, uint32_t ts, uint32_t mseq);
|
SWITCH_DECLARE(int) switch_rtp_write_payload(switch_rtp *rtp_session, void *data, int datalen, uint8_t payload, uint32_t ts, uint16_t mseq);
|
||||||
uint32_t switch_rtp_start(switch_rtp *rtp_session);
|
SWITCH_DECLARE(uint32_t) switch_rtp_start(switch_rtp *rtp_session);
|
||||||
uint32_t switch_rtp_get_ssrc(switch_rtp *rtp_session);
|
SWITCH_DECLARE(uint32_t) switch_rtp_get_ssrc(switch_rtp *rtp_session);
|
||||||
void switch_rtp_killread(switch_rtp *rtp_session);
|
SWITCH_DECLARE(void) switch_rtp_killread(switch_rtp *rtp_session);
|
||||||
void switch_rtp_set_private(switch_rtp *rtp_session, void *private_data);
|
SWITCH_DECLARE(void) switch_rtp_set_private(switch_rtp *rtp_session, void *private_data);
|
||||||
void *switch_rtp_get_private(switch_rtp *rtp_session);
|
SWITCH_DECLARE(void *)switch_rtp_get_private(switch_rtp *rtp_session);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <switch.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ struct private_object {
|
|||||||
unsigned char out_digit_packet[4];
|
unsigned char out_digit_packet[4];
|
||||||
unsigned int out_digit_sofar;
|
unsigned int out_digit_sofar;
|
||||||
unsigned int out_digit_dur;
|
unsigned int out_digit_dur;
|
||||||
unsigned int out_digit_seq;
|
uint16_t out_digit_seq;
|
||||||
int32_t timestamp_send;
|
int32_t timestamp_send;
|
||||||
int32_t timestamp_recv;
|
int32_t timestamp_recv;
|
||||||
int32_t timestamp_dtmf;
|
int32_t timestamp_dtmf;
|
||||||
|
@ -80,8 +80,8 @@ static struct {
|
|||||||
int bytes_per_frame;
|
int bytes_per_frame;
|
||||||
char *dialplan;
|
char *dialplan;
|
||||||
int port;
|
int port;
|
||||||
int rtp_start;
|
switch_port_t rtp_start;
|
||||||
int rtp_end;
|
switch_port_t rtp_end;
|
||||||
char *codec_string;
|
char *codec_string;
|
||||||
char *codec_order[SWITCH_MAX_CODECS];
|
char *codec_order[SWITCH_MAX_CODECS];
|
||||||
int codec_order_last;
|
int codec_order_last;
|
||||||
@ -114,9 +114,9 @@ struct private_object {
|
|||||||
sdp_message_t *remote_sdp;
|
sdp_message_t *remote_sdp;
|
||||||
sdp_message_t *local_sdp;
|
sdp_message_t *local_sdp;
|
||||||
char remote_sdp_audio_ip[50];
|
char remote_sdp_audio_ip[50];
|
||||||
int remote_sdp_audio_port;
|
switch_port_t remote_sdp_audio_port;
|
||||||
char local_sdp_audio_ip[50];
|
char local_sdp_audio_ip[50];
|
||||||
int local_sdp_audio_port;
|
switch_port_t local_sdp_audio_port;
|
||||||
char call_id[50];
|
char call_id[50];
|
||||||
int ssrc;
|
int ssrc;
|
||||||
char last_digit;
|
char last_digit;
|
||||||
@ -129,13 +129,13 @@ struct private_object {
|
|||||||
unsigned char out_digit_packet[4];
|
unsigned char out_digit_packet[4];
|
||||||
unsigned int out_digit_sofar;
|
unsigned int out_digit_sofar;
|
||||||
unsigned int out_digit_dur;
|
unsigned int out_digit_dur;
|
||||||
unsigned int out_digit_seq;
|
uint16_t out_digit_seq;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static int next_rtp_port(void)
|
static switch_port_t next_rtp_port(void)
|
||||||
{
|
{
|
||||||
int port;
|
switch_port_t port;
|
||||||
|
|
||||||
switch_mutex_lock(globals.port_lock);
|
switch_mutex_lock(globals.port_lock);
|
||||||
port = globals.rtp_start;
|
port = globals.rtp_start;
|
||||||
@ -1176,7 +1176,7 @@ static switch_status exosip_create_call(eXosip_event_t * event)
|
|||||||
remote_med = eXosip_get_audio_media(remote_sdp);
|
remote_med = eXosip_get_audio_media(remote_sdp);
|
||||||
snprintf(tech_pvt->remote_sdp_audio_ip, 50, conn->c_addr);
|
snprintf(tech_pvt->remote_sdp_audio_ip, 50, conn->c_addr);
|
||||||
|
|
||||||
tech_pvt->remote_sdp_audio_port = atoi(remote_med->m_port);
|
tech_pvt->remote_sdp_audio_port = (switch_port_t)atoi(remote_med->m_port);
|
||||||
|
|
||||||
snprintf(tech_pvt->call_id, sizeof(tech_pvt->call_id), "%d", event->cid);
|
snprintf(tech_pvt->call_id, sizeof(tech_pvt->call_id), "%d", event->cid);
|
||||||
eXosip_lock();
|
eXosip_lock();
|
||||||
@ -1346,7 +1346,7 @@ static void handle_answer(eXosip_event_t * event)
|
|||||||
remote_med = eXosip_get_audio_media(remote_sdp);
|
remote_med = eXosip_get_audio_media(remote_sdp);
|
||||||
|
|
||||||
/* Grab IP/port */
|
/* Grab IP/port */
|
||||||
tech_pvt->remote_sdp_audio_port = atoi(remote_med->m_port);
|
tech_pvt->remote_sdp_audio_port = (switch_port_t)atoi(remote_med->m_port);
|
||||||
snprintf(tech_pvt->remote_sdp_audio_ip, 50, conn->c_addr);
|
snprintf(tech_pvt->remote_sdp_audio_ip, 50, conn->c_addr);
|
||||||
|
|
||||||
/* Grab codec elements */
|
/* Grab codec elements */
|
||||||
@ -1576,9 +1576,9 @@ static int config_exosip(int reload)
|
|||||||
globals.codec_order_last =
|
globals.codec_order_last =
|
||||||
switch_separate_string(globals.codec_string, ',', globals.codec_order, SWITCH_MAX_CODECS);
|
switch_separate_string(globals.codec_string, ',', globals.codec_order, SWITCH_MAX_CODECS);
|
||||||
} else if (!strcmp(var, "rtp_min_port")) {
|
} else if (!strcmp(var, "rtp_min_port")) {
|
||||||
globals.rtp_start = atoi(val);
|
globals.rtp_start = (switch_port_t)atoi(val);
|
||||||
} else if (!strcmp(var, "rtp_max_port")) {
|
} else if (!strcmp(var, "rtp_max_port")) {
|
||||||
globals.rtp_end = atoi(val);
|
globals.rtp_end = (switch_port_t)atoi(val);
|
||||||
} else if (!strcmp(var, "codec_ms")) {
|
} else if (!strcmp(var, "codec_ms")) {
|
||||||
globals.codec_ms = atoi(val);
|
globals.codec_ms = atoi(val);
|
||||||
} else if (!strcmp(var, "dtmf_duration")) {
|
} else if (!strcmp(var, "dtmf_duration")) {
|
||||||
|
@ -73,7 +73,7 @@ struct switch_rtp {
|
|||||||
rtp_msg_t recv_msg;
|
rtp_msg_t recv_msg;
|
||||||
srtp_ctx_t *recv_ctx;
|
srtp_ctx_t *recv_ctx;
|
||||||
|
|
||||||
uint32_t seq;
|
uint16_t seq;
|
||||||
uint32_t payload;
|
uint32_t payload;
|
||||||
|
|
||||||
switch_rtp_invalid_handler invalid_handler;
|
switch_rtp_invalid_handler invalid_handler;
|
||||||
@ -98,10 +98,10 @@ static void init_rtp(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_rtp *switch_rtp_new(char *rx_ip,
|
SWITCH_DECLARE(switch_rtp *)switch_rtp_new(char *rx_ip,
|
||||||
int rx_port,
|
switch_port_t rx_port,
|
||||||
char *tx_ip,
|
char *tx_ip,
|
||||||
int tx_port,
|
switch_port_t tx_port,
|
||||||
int payload,
|
int payload,
|
||||||
switch_rtp_flag_t flags,
|
switch_rtp_flag_t flags,
|
||||||
const char **err,
|
const char **err,
|
||||||
@ -176,7 +176,7 @@ switch_rtp *switch_rtp_new(char *rx_ip,
|
|||||||
rtp_session->send_msg.header.ts = 0;
|
rtp_session->send_msg.header.ts = 0;
|
||||||
rtp_session->send_msg.header.seq = (uint16_t) rand();
|
rtp_session->send_msg.header.seq = (uint16_t) rand();
|
||||||
rtp_session->send_msg.header.m = 0;
|
rtp_session->send_msg.header.m = 0;
|
||||||
rtp_session->send_msg.header.pt = htonl(payload);
|
rtp_session->send_msg.header.pt = (uint8_t)htonl(payload);
|
||||||
rtp_session->send_msg.header.version = 2;
|
rtp_session->send_msg.header.version = 2;
|
||||||
rtp_session->send_msg.header.p = 0;
|
rtp_session->send_msg.header.p = 0;
|
||||||
rtp_session->send_msg.header.x = 0;
|
rtp_session->send_msg.header.x = 0;
|
||||||
@ -187,7 +187,7 @@ switch_rtp *switch_rtp_new(char *rx_ip,
|
|||||||
rtp_session->recv_msg.header.ts = 0;
|
rtp_session->recv_msg.header.ts = 0;
|
||||||
rtp_session->recv_msg.header.seq = 0;
|
rtp_session->recv_msg.header.seq = 0;
|
||||||
rtp_session->recv_msg.header.m = 0;
|
rtp_session->recv_msg.header.m = 0;
|
||||||
rtp_session->recv_msg.header.pt = htonl(payload);
|
rtp_session->recv_msg.header.pt = (uint8_t)htonl(payload);
|
||||||
rtp_session->recv_msg.header.version = 2;
|
rtp_session->recv_msg.header.version = 2;
|
||||||
rtp_session->recv_msg.header.p = 0;
|
rtp_session->recv_msg.header.p = 0;
|
||||||
rtp_session->recv_msg.header.x = 0;
|
rtp_session->recv_msg.header.x = 0;
|
||||||
@ -201,7 +201,7 @@ switch_rtp *switch_rtp_new(char *rx_ip,
|
|||||||
return rtp_session;
|
return rtp_session;
|
||||||
}
|
}
|
||||||
|
|
||||||
void switch_rtp_killread(switch_rtp *rtp_session)
|
SWITCH_DECLARE(void) switch_rtp_killread(switch_rtp *rtp_session)
|
||||||
{
|
{
|
||||||
apr_socket_shutdown(rtp_session->sock, APR_SHUTDOWN_READWRITE);
|
apr_socket_shutdown(rtp_session->sock, APR_SHUTDOWN_READWRITE);
|
||||||
switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_IO);
|
switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_IO);
|
||||||
@ -209,7 +209,7 @@ void switch_rtp_killread(switch_rtp *rtp_session)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void switch_rtp_destroy(switch_rtp **rtp_session)
|
SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp **rtp_session)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch_rtp_killread(*rtp_session);
|
switch_rtp_killread(*rtp_session);
|
||||||
@ -218,19 +218,19 @@ void switch_rtp_destroy(switch_rtp **rtp_session)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_socket_t *switch_rtp_get_rtp_socket(switch_rtp *rtp_session)
|
SWITCH_DECLARE(switch_socket_t *)switch_rtp_get_rtp_socket(switch_rtp *rtp_session)
|
||||||
{
|
{
|
||||||
return rtp_session->sock;
|
return rtp_session->sock;
|
||||||
}
|
}
|
||||||
|
|
||||||
void switch_rtp_set_invald_handler(switch_rtp *rtp_session, switch_rtp_invalid_handler on_invalid)
|
SWITCH_DECLARE(void) switch_rtp_set_invald_handler(switch_rtp *rtp_session, switch_rtp_invalid_handler on_invalid)
|
||||||
{
|
{
|
||||||
rtp_session->invalid_handler = on_invalid;
|
rtp_session->invalid_handler = on_invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_rtp_read(switch_rtp *rtp_session, void *data, uint32_t datalen, int *payload_type)
|
SWITCH_DECLARE(int) switch_rtp_read(switch_rtp *rtp_session, void *data, uint32_t datalen, int *payload_type)
|
||||||
{
|
{
|
||||||
switch_size_t bytes;
|
uint32_t bytes;
|
||||||
|
|
||||||
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO)) {
|
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO)) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -257,9 +257,9 @@ int switch_rtp_read(switch_rtp *rtp_session, void *data, uint32_t datalen, int *
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int switch_rtp_zerocopy_read(switch_rtp *rtp_session, void **data, int *payload_type)
|
SWITCH_DECLARE(int) switch_rtp_zerocopy_read(switch_rtp *rtp_session, void **data, int *payload_type)
|
||||||
{
|
{
|
||||||
switch_size_t bytes;
|
uint32_t bytes;
|
||||||
|
|
||||||
*data = NULL;
|
*data = NULL;
|
||||||
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO)) {
|
if (!switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO)) {
|
||||||
@ -285,7 +285,7 @@ int switch_rtp_zerocopy_read(switch_rtp *rtp_session, void **data, int *payload_
|
|||||||
return bytes - rtp_header_len;
|
return bytes - rtp_header_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_rtp_write(switch_rtp *rtp_session, void *data, int datalen, uint32_t ts)
|
SWITCH_DECLARE(int) switch_rtp_write(switch_rtp *rtp_session, void *data, int datalen, uint32_t ts)
|
||||||
{
|
{
|
||||||
switch_size_t bytes;
|
switch_size_t bytes;
|
||||||
|
|
||||||
@ -304,10 +304,10 @@ int switch_rtp_write(switch_rtp *rtp_session, void *data, int datalen, uint32_t
|
|||||||
bytes = datalen + rtp_header_len;
|
bytes = datalen + rtp_header_len;
|
||||||
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)&rtp_session->send_msg, &bytes);
|
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)&rtp_session->send_msg, &bytes);
|
||||||
|
|
||||||
return bytes;
|
return (int)bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
int switch_rtp_write_payload(switch_rtp *rtp_session, void *data, int datalen, int payload, uint32_t ts, uint32_t mseq)
|
SWITCH_DECLARE(int) switch_rtp_write_payload(switch_rtp *rtp_session, void *data, int datalen, uint8_t payload, uint32_t ts, uint16_t mseq)
|
||||||
{
|
{
|
||||||
switch_size_t bytes;
|
switch_size_t bytes;
|
||||||
|
|
||||||
@ -317,32 +317,32 @@ int switch_rtp_write_payload(switch_rtp *rtp_session, void *data, int datalen, i
|
|||||||
rtp_session->ts += ts;
|
rtp_session->ts += ts;
|
||||||
rtp_session->send_msg.header.seq = htons(mseq);
|
rtp_session->send_msg.header.seq = htons(mseq);
|
||||||
rtp_session->send_msg.header.ts = htonl(rtp_session->ts);
|
rtp_session->send_msg.header.ts = htonl(rtp_session->ts);
|
||||||
rtp_session->send_msg.header.pt = htonl(payload);
|
rtp_session->send_msg.header.pt = (uint8_t)htonl(payload);
|
||||||
|
|
||||||
memcpy(rtp_session->send_msg.body, data, datalen);
|
memcpy(rtp_session->send_msg.body, data, datalen);
|
||||||
bytes = datalen + rtp_header_len;
|
bytes = datalen + rtp_header_len;
|
||||||
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)&rtp_session->send_msg, &bytes);
|
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)&rtp_session->send_msg, &bytes);
|
||||||
|
|
||||||
return bytes;
|
return (int)bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t switch_rtp_start(switch_rtp *rtp_session)
|
SWITCH_DECLARE(uint32_t) switch_rtp_start(switch_rtp *rtp_session)
|
||||||
{
|
{
|
||||||
switch_set_flag(rtp_session, SWITCH_RTP_FLAG_IO);
|
switch_set_flag(rtp_session, SWITCH_RTP_FLAG_IO);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t switch_rtp_get_ssrc(switch_rtp *rtp_session)
|
SWITCH_DECLARE(uint32_t) switch_rtp_get_ssrc(switch_rtp *rtp_session)
|
||||||
{
|
{
|
||||||
return rtp_session->send_msg.header.ssrc;
|
return rtp_session->send_msg.header.ssrc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void switch_rtp_set_private(switch_rtp *rtp_session, void *private_data)
|
SWITCH_DECLARE(void) switch_rtp_set_private(switch_rtp *rtp_session, void *private_data)
|
||||||
{
|
{
|
||||||
rtp_session->private_data = private_data;
|
rtp_session->private_data = private_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *switch_rtp_get_private(switch_rtp *rtp_session)
|
SWITCH_DECLARE(void *)switch_rtp_get_private(switch_rtp *rtp_session)
|
||||||
{
|
{
|
||||||
return rtp_session->private_data;
|
return rtp_session->private_data;
|
||||||
}
|
}
|
||||||
|
@ -64,10 +64,10 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresampled.lib"
|
AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresampled.lib srtp.lib"
|
||||||
OutputFile="$(OutDir)/FreeSwitch.dll"
|
OutputFile="$(OutDir)/FreeSwitch.dll"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories=""$(InputDir)..\..\libs\apr\$(OutDir)";"$(InputDir)..\..\libs\sqlite\$(OutDir)";"$(InputDir)..\..\libs\apr-util\$(OutDir)";"$(InputDir)..\..\libs\apr-iconv\$(OutDir)";"$(InputDir)..\..\libs\libresample\win""
|
AdditionalLibraryDirectories=""$(InputDir)..\..\libs\apr\$(OutDir)";"$(InputDir)..\..\libs\sqlite\$(OutDir)";"$(InputDir)..\..\libs\apr-util\$(OutDir)";"$(InputDir)..\..\libs\apr-iconv\$(OutDir)";"$(InputDir)..\..\libs\libresample\win";"$(InputDir)..\..\libs\srtp\$(OutDir)""
|
||||||
AddModuleNamesToAssembly=""
|
AddModuleNamesToAssembly=""
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
ProgramDatabaseFile="$(OutDir)/FreeSwitchCore.pdb"
|
ProgramDatabaseFile="$(OutDir)/FreeSwitchCore.pdb"
|
||||||
@ -149,10 +149,10 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresample.lib"
|
AdditionalDependencies="Ws2_32.lib Mswsock.lib libapr-1.lib sqlite.lib libapriconv-1.lib libaprutil-1.lib Rpcrt4.lib libresample.lib srtp.lib"
|
||||||
OutputFile="$(OutDir)/FreeSwitch.dll"
|
OutputFile="$(OutDir)/FreeSwitch.dll"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""$(InputDir)..\..\libs\apr\$(OutDir)";"$(InputDir)..\..\libs\sqlite\$(OutDir)";"$(InputDir)..\..\libs\apr-util\$(OutDir)";"$(InputDir)..\..\libs\apr-iconv\$(OutDir)";"$(InputDir)..\..\libs\libresample\win""
|
AdditionalLibraryDirectories=""$(InputDir)..\..\libs\apr\$(OutDir)";"$(InputDir)..\..\libs\sqlite\$(OutDir)";"$(InputDir)..\..\libs\apr-util\$(OutDir)";"$(InputDir)..\..\libs\apr-iconv\$(OutDir)";"$(InputDir)..\..\libs\libresample\win";"$(InputDir)..\..\libs\srtp\$(OutDir)""
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
@ -235,6 +235,10 @@
|
|||||||
RelativePath="..\..\src\switch_resample.c"
|
RelativePath="..\..\src\switch_resample.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\switch_rtp.c"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\switch_utils.c"
|
RelativePath="..\..\src\switch_utils.c"
|
||||||
>
|
>
|
||||||
@ -305,6 +309,10 @@
|
|||||||
RelativePath="..\..\src\include\switch_resample.h"
|
RelativePath="..\..\src\include\switch_resample.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\src\include\switch_rtp.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\src\include\switch_sqlite.h"
|
RelativePath="..\..\src\include\switch_sqlite.h"
|
||||||
>
|
>
|
||||||
|
@ -162,6 +162,9 @@ If BuildCore Then
|
|||||||
FSO.CopyFile LibDestDir & "libresample\include\*.h", LibDestDir & "include"
|
FSO.CopyFile LibDestDir & "libresample\include\*.h", LibDestDir & "include"
|
||||||
BuildLibs_sqlite BuildDebug, BuildRelease
|
BuildLibs_sqlite BuildDebug, BuildRelease
|
||||||
FSO.CopyFile LibDestDir & "sqlite\*.h", LibDestDir & "include"
|
FSO.CopyFile LibDestDir & "sqlite\*.h", LibDestDir & "include"
|
||||||
|
BuildLibs_srtp BuildDebug, BuildRelease
|
||||||
|
FSO.CopyFile LibDestDir & "srtp\include\*.h", LibDestDir & "include"
|
||||||
|
FSO.CopyFile LibDestDir & "srtp\crypto\include\*.h", LibDestDir & "include"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If BuildModzeroconf Then
|
If BuildModzeroconf Then
|
||||||
@ -257,7 +260,7 @@ Sub BuildLibs_aprutil(BuildDebug, BuildRelease)
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If BuildRelease Then
|
If BuildRelease Then
|
||||||
If Not FSO.FileExists(LibDestDir & "apr-util\xml\expat\lib\LibR<p align="center"></p>\xml.lib") Then
|
If Not FSO.FileExists(LibDestDir & "apr-util\xml\expat\lib\LibR\xml.lib") Then
|
||||||
BuildViaVCBuild LibDestDir & "apr-util\xml\expat\lib\xml.vcproj", "Release"
|
BuildViaVCBuild LibDestDir & "apr-util\xml\expat\lib\xml.vcproj", "Release"
|
||||||
End If
|
End If
|
||||||
If Not FSO.FileExists(LibDestDir & "apr-util\Release\libaprutil-1.lib") Then
|
If Not FSO.FileExists(LibDestDir & "apr-util\Release\libaprutil-1.lib") Then
|
||||||
@ -387,6 +390,26 @@ Sub BuildLibs_libosip2(BuildDebug, BuildRelease)
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub BuildLibs_srtp(BuildDebug, BuildRelease)
|
||||||
|
If Not FSO.FolderExists(LibDestDir & "srtp") Then
|
||||||
|
WgetUnCompress LibsBase & "srtp.zip", LibDestDir
|
||||||
|
End If
|
||||||
|
If FSO.FolderExists(LibDestDir & "srtp") Then
|
||||||
|
If BuildDebug Then
|
||||||
|
If Not FSO.FileExists(LibDestDir & "srtp\Debug\srtp.lib") Then
|
||||||
|
BuildViaVCBuild LibDestDir & "srtp\srtp.vcproj", "Debug"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If BuildRelease Then
|
||||||
|
If Not FSO.FileExists(LibDestDir & "srtp\Release\srtp.lib") Then
|
||||||
|
BuildViaVCBuild LibDestDir & "srtp\srtp.vcproj", "Release"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Wscript.echo "Unable to download srtp"
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Sub BuildLibs_jrtplib(BuildDebug, BuildRelease)
|
Sub BuildLibs_jrtplib(BuildDebug, BuildRelease)
|
||||||
|
|
||||||
If FSO.FolderExists(LibDestDir & "jrtplib")Then
|
If FSO.FolderExists(LibDestDir & "jrtplib")Then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user