提交 51241ad3 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1355 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 febd8b9a
......@@ -156,7 +156,7 @@ depends:
./build/buildlib.sh . libresample-0.1.3.tgz --prefix=$(PREFIX)
./build/buildlib.sh . install libteletone --prefix=$(PREFIX)
./build/buildlib.sh . install srtp --prefix=$(PREFIX)
./build/buildlib.sh . install jitterbuffer --prefix=$(PREFIX)
./build/buildlib.sh . install libspeakup --prefix=$(PREFIX)
rm build/freeswitch.env
......
......@@ -1056,7 +1056,7 @@ depends:
./build/buildlib.sh . libresample-0.1.3.tgz --prefix=$(PREFIX)
./build/buildlib.sh . install libteletone --prefix=$(PREFIX)
./build/buildlib.sh . install srtp --prefix=$(PREFIX)
./build/buildlib.sh . install jitterbuffer --prefix=$(PREFIX)
./build/buildlib.sh . install libspeakup --prefix=$(PREFIX)
rm build/freeswitch.env
modules: $(NAME)
......
差异被折叠。
差异被折叠。
......@@ -99,14 +99,14 @@ DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = ${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run aclocal-1.9
ACLOCAL = ${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run tar
AMTAR = ${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run autoconf
AUTOHEADER = ${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run autoheader
AUTOMAKE = ${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run automake-1.9
AUTOCONF = ${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run autoconf
AUTOHEADER = ${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run autoheader
AUTOMAKE = ${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run automake-1.9
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
......@@ -138,7 +138,7 @@ LIBS =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run makeinfo
MAKEINFO = ${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run makeinfo
OBJEXT = o
PACKAGE = libspeakup
PACKAGE_BUGREPORT = BUG-REPORT-ADDRESS
......@@ -182,7 +182,7 @@ host_os = linux-gnu
host_vendor = unknown
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /usr/src/freeswitch.trunk/libs/jitterbuffer/install-sh
install_sh = /usr/src/freeswitch.trunk/libs/libspeakup/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
......
......@@ -48,7 +48,7 @@ configure:1660: result: yes
configure:1725: checking for gawk
configure:1741: found /usr/bin/gawk
configure:1751: result: gawk
configure:1761: checking whether make sets $(MAKE)
configure:1761: checking whether /usr/local/bin/gmake sets $(MAKE)
configure:1781: result: yes
configure:1999: checking for gcc
configure:2015: found /usr/bin/gcc
......@@ -122,11 +122,11 @@ configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2894: checking for style of include used by make
configure:2894: checking for style of include used by /usr/local/bin/gmake
configure:2922: result: GNU
configure:2950: checking dependency style of gcc
configure:3040: result: gcc3
configure:3057: checking whether make sets $(MAKE)
configure:3057: checking whether /usr/local/bin/gmake sets $(MAKE)
configure:3077: result: yes
configure:3164: checking build system type
configure:3182: result: x86_64-unknown-linux-gnu
......@@ -527,7 +527,7 @@ configure: failed program was:
| end
configure:5390: result: no
configure:5420: checking the maximum length of command line arguments
configure:5512: result: 32768
configure:5512: result: 64
configure:5523: checking command to parse /usr/bin/nm -B output from gcc object
configure:5619: gcc -c -g -O2 conftest.c >&5
configure:5622: $? = 0
......@@ -798,7 +798,7 @@ ac_cv_prog_cxx_g=yes
ac_cv_prog_egrep='grep -E'
ac_cv_prog_f77_g=no
ac_cv_prog_gcc_traditional=no
ac_cv_prog_make_make_set=yes
ac_cv_prog_make__usr_local_bin_gmake_set=yes
ac_cv_search_opendir='none required'
ac_cv_struct_tm=time.h
ac_cv_type_signal=void
......@@ -822,7 +822,7 @@ lt_cv_prog_gnu_ldcxx=yes
lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'''
lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr) \&\2},/p'\'''
lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^. .* \(.*\)$/extern int \1;/p'\'''
lt_cv_sys_max_cmd_len=32768
lt_cv_sys_max_cmd_len=64
lt_lt_cv_prog_compiler_c_o='"yes"'
lt_lt_cv_prog_compiler_c_o_CXX='"yes"'
lt_lt_cv_sys_global_symbol_pipe='"sed -n -e '\''s/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'\''"'
......@@ -833,15 +833,15 @@ lt_lt_cv_sys_global_symbol_to_cdecl='"sed -n -e '\''s/^. .* \\(.*\\)\$/extern in
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run aclocal-1.9'
ACLOCAL='${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run aclocal-1.9'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run tar'
AMTAR='${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run tar'
AR='ar'
AUTOCONF='${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run autoconf'
AUTOHEADER='${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run autoheader'
AUTOMAKE='${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run automake-1.9'
AUTOCONF='${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run autoconf'
AUTOHEADER='${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run autoheader'
AUTOMAKE='${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run automake-1.9'
AWK='gawk'
CC='gcc'
CCDEPMODE='depmode=gcc3'
......@@ -873,7 +873,7 @@ LIBS=''
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
LN_S='ln -s'
LTLIBOBJS=''
MAKEINFO='${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run makeinfo'
MAKEINFO='${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run makeinfo'
OBJEXT='o'
PACKAGE='libspeakup'
PACKAGE_BUGREPORT='BUG-REPORT-ADDRESS'
......@@ -917,7 +917,7 @@ host_os='linux-gnu'
host_vendor='unknown'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/usr/src/freeswitch.trunk/libs/jitterbuffer/install-sh'
install_sh='/usr/src/freeswitch.trunk/libs/libspeakup/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
......
......@@ -480,12 +480,12 @@ s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
s,@CYGPATH_W@,echo,;t t
s,@PACKAGE@,libspeakup,;t t
s,@VERSION@,0.1,;t t
s,@ACLOCAL@,${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run aclocal-1.9,;t t
s,@AUTOCONF@,${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run autoconf,;t t
s,@AUTOMAKE@,${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run automake-1.9,;t t
s,@AUTOHEADER@,${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run autoheader,;t t
s,@MAKEINFO@,${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run makeinfo,;t t
s,@install_sh@,/usr/src/freeswitch.trunk/libs/jitterbuffer/install-sh,;t t
s,@ACLOCAL@,${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run aclocal-1.9,;t t
s,@AUTOCONF@,${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run autoconf,;t t
s,@AUTOMAKE@,${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run automake-1.9,;t t
s,@AUTOHEADER@,${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run autoheader,;t t
s,@MAKEINFO@,${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run makeinfo,;t t
s,@install_sh@,/usr/src/freeswitch.trunk/libs/libspeakup/install-sh,;t t
s,@STRIP@,strip,;t t
s,@ac_ct_STRIP@,strip,;t t
s,@INSTALL_STRIP_PROGRAM@,${SHELL} $(install_sh) -c -s,;t t
......@@ -493,7 +493,7 @@ s,@mkdir_p@,mkdir -p --,;t t
s,@AWK@,gawk,;t t
s,@SET_MAKE@,,;t t
s,@am__leading_dot@,.,;t t
s,@AMTAR@,${SHELL} /usr/src/freeswitch.trunk/libs/jitterbuffer/missing --run tar,;t t
s,@AMTAR@,${SHELL} /usr/src/freeswitch.trunk/libs/libspeakup/missing --run tar,;t t
s,@am__tar@,${AMTAR} chof - "$$tardir",;t t
s,@am__untar@,${AMTAR} xf -,;t t
s,@CC@,gcc,;t t
......
......@@ -144,7 +144,7 @@ pic_flag=" -fPIC -DPIC"
pic_mode=default
# What is the maximum length of a command?
max_cmd_len=32768
max_cmd_len=64
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
......@@ -6851,7 +6851,7 @@ pic_flag=" -fPIC -DPIC"
pic_mode=default
# What is the maximum length of a command?
max_cmd_len=32768
max_cmd_len=64
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
......
......@@ -120,6 +120,7 @@ typedef enum {
SWITCH_RTP_FLAG_GOOGLEHACK - Convert payload from 102 to 97
SWITCH_RTP_FLAG_VAD - Enable VAD
SWITCH_RTP_FLAG_BREAK - Stop what you are doing and return SWITCH_STATUS_BREAK
SWITCH_RTP_FLAG_MINI - Use mini RTP when possible
</pre>
*/
typedef enum {
......@@ -132,7 +133,8 @@ typedef enum {
SWITCH_RTP_FLAG_RAW_WRITE = (1 << 6),
SWITCH_RTP_FLAG_GOOGLEHACK = (1 << 7),
SWITCH_RTP_FLAG_VAD = (1 << 8),
SWITCH_RTP_FLAG_BREAK = ( 1 << 9)
SWITCH_RTP_FLAG_BREAK = ( 1 << 9),
SWITCH_RTP_FLAG_MINI = ( 1 << 10)
} switch_rtp_flag_t;
/*!
......
......@@ -135,7 +135,7 @@ struct show_return {
};
static int show_callback(void *pArg, int argc, char **argv, char **columnNames){
struct show_return *returnval = (struct api_return *) pArg;
struct show_return *returnval = (struct show_return *) pArg;
char temp[1024];
size_t len;
......
......@@ -52,12 +52,49 @@ static switch_mutex_t *port_lock = NULL;
typedef srtp_hdr_t rtp_hdr_t;
#ifdef _MSC_VER
#pragma pack(1)
#endif
#if __BYTE_ORDER == __BIG_ENDIAN
typedef struct {
unsigned version:2; /* protocol version */
unsigned p:1; /* padding flag */
unsigned x:1; /* header extension flag */
unsigned cc:4; /* CSRC count */
uint32_t ts; /* timestamp */
} PACKED srtp_mini_hdr_t;
#else
typedef struct {
uint8_t cc:4; /* CSRC count */
uint8_t x:1; /* header extension flag */
uint8_t p:1; /* padding flag */
uint8_t version:2; /* protocol version */
uint32_t ts; /* timestamp */
} PACKED srtp_mini_hdr_t;
#endif
#ifdef _MSC_VER
#pragma pack()
#endif
typedef struct {
srtp_hdr_t header;
char body[SWITCH_RTP_MAX_BUF_LEN];
} rtp_msg_t;
typedef struct {
srtp_hdr_t header;
char body[SWITCH_RTP_MAX_BUF_LEN];
} rtp_mini_msg_t;
struct rfc2833_digit {
char digit;
int duration;
......@@ -113,7 +150,9 @@ struct switch_rtp {
srtp_ctx_t *recv_ctx;
uint16_t seq;
uint16_t rseq;
switch_payload_t payload;
switch_payload_t rpayload;
switch_rtp_invalid_handler_t invalid_handler;
void *private_data;
......@@ -675,10 +714,8 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
return 0;
}
if (rtp_session->recv_msg.header.version == 2) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_GOOGLEHACK) && rtp_session->recv_msg.header.pt == 102) {
rtp_session->recv_msg.header.pt = 97;
}
if (rtp_session->recv_msg.header.version) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && rtp_session->from_addr->port &&
(rtp_session->from_addr->port != rtp_session->remote_port)) {
const char *err;
......@@ -689,9 +726,29 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
switch_sockaddr_ip_get(&tx_host, rtp_session->from_addr);
switch_sockaddr_ip_get(&old_host, rtp_session->remote_addr);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Auto Changing port from %s:%u to %s:%u\n", old_host, old, tx_host, rtp_session->from_addr->port);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Auto Changing port from %s:%u to %s:%u\n",
old_host, old, tx_host, rtp_session->from_addr->port);
switch_rtp_set_remote_address(rtp_session, tx_host, rtp_session->from_addr->port, &err);
}
}
if (rtp_session->recv_msg.header.version == 2) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_GOOGLEHACK) && rtp_session->recv_msg.header.pt == 102) {
rtp_session->recv_msg.header.pt = 97;
}
rtp_session->rseq = ntohs(rtp_session->recv_msg.header.seq);
rtp_session->rpayload = rtp_session->recv_msg.header.pt;
} else if (rtp_session->recv_msg.header.version == 1) {
uint32_t ts;
rtp_mini_msg_t *mini = (rtp_mini_msg_t *) &rtp_session->recv_msg;
switch_set_flag(rtp_session, SWITCH_RTP_FLAG_MINI);
ts = mini->header.ts;
memmove(rtp_session->recv_msg.body, mini->body, bytes - sizeof(srtp_mini_hdr_t));
rtp_session->recv_msg.header.ts = ts;
rtp_session->recv_msg.header.seq = htons(rtp_session->rseq++);
rtp_session->recv_msg.header.pt = rtp_session->rpayload;
} else {
if (rtp_session->recv_msg.header.version == 0 && rtp_session->ice_user) {
handle_ice(rtp_session, (void *) &rtp_session->recv_msg, bytes);
......@@ -1071,7 +1128,17 @@ static int rtp_common_write(switch_rtp_t *rtp_session, void *data, uint32_t data
}
if (send) {
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)send_msg, &bytes);
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_MINI)) {
rtp_mini_msg_t mini = {{0}};
bytes -= rtp_header_len;
mini.header.ts = send_msg->header.ts;
mini.header.version = 1;
memcpy(mini.body, send_msg->body, bytes);
bytes += sizeof(rtp_mini_msg_t);
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)&mini, &bytes);
} else {
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)send_msg, &bytes);
}
}
if (rtp_session->ice_user) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论