Commit f37f0e86 authored by Simon Morlat's avatar Simon Morlat

Merge branch 'master' into dev_ratecontrol

parents ad11d1d5 66355f56
......@@ -92,6 +92,8 @@ endif
ifeq ($(BUILD_SRTP), 1)
LOCAL_C_INCLUDES += $(SRTP_C_INCLUDE)
else
endif
ifeq ($(LINPHONE_VIDEO),1)
......@@ -185,6 +187,11 @@ ifeq ($(BUILD_MS2), 1)
libavcore \
libavutil
endif
ifeq ($(BUILD_SRTP),1)
LOCAL_SHARED_LIBRARIES += libsrtp
endif
LOCAL_LDLIBS += -lGLESv2 -llog -ldl
include $(BUILD_SHARED_LIBRARY)
else
......
......@@ -134,16 +134,23 @@ if test $GCC = yes && test $wall_werror = yes; then
fi
macosx_found=no
ios_found=false
mingw32ce_found=no
dnl add thread flags
case $target_os in
*darwin*)
MSPLUGINS_CFLAGS=""
MSPLUGINS_LIBS="-dynamiclib"
case $host_alias in
i386-apple*)
ios_found=yes
;;
armv6-apple*)
ios_found=yes
;;
armv7-apple*)
ios_found=yes
;;
x86_64-apple*)
macosx_found=yes
LIBS="$LIBS -framework CoreFoundation -framework AudioToolbox -framework CoreAudio "
;;
;;
*mingw32ce)
CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -D_WIN32_WCE -DORTP_STATIC"
CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC -D_WIN32_WCE"
......@@ -167,7 +174,11 @@ dnl ORTP_STATIC to tell ortp not to export its variable with dllexport, as if we
;;
esac
if test "$macosx_found" == "yes" || test "$ios_found" == "yes" ; then
MSPLUGINS_CFLAGS=""
MSPLUGINS_LIBS="-dynamiclib"
LIBS="$LIBS -framework CoreFoundation -framework AudioToolbox -framework CoreAudio "
fi
dnl localization tools
IT_PROG_INTLTOOL([0.40], [no-xml])
......@@ -366,13 +377,17 @@ AC_ARG_ENABLE(macsnd,
*) AC_MSG_ERROR(bad value ${enableval} for --enable-macsnd) ;;
esac],[macsnd=true])
macaqsnd_default=false;
if test "$ios_found" = "yes" ; then
macaqsnd_default=true;
fi
AC_ARG_ENABLE(macaqsnd,
[ --enable-macaqsnd Turn on native macosx Audio Queue sound support (default=no)],
[case "${enableval}" in
yes) macaqsnd=true ;;
no) macaqsnd=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-macaqsnd) ;;
esac],[macaqsnd=false])
esac],[macaqsnd=$macaqsnd_default])
......@@ -383,32 +398,18 @@ if test "$macosx_found" = "yes" ; then
LIBS="$LIBS -framework Carbon -framework AudioUnit"
found_sound=yes
fi
if test "$macaqsnd" = "true"; then
AC_DEFINE(__MAC_AQ_ENABLED__,1,[defined if native macosx AQ sound support is available])
found_sound=yes
macaqsnd=true
fi
fi
if test "$macaqsnd" = "true"; then
AC_DEFINE(__MAC_AQ_ENABLED__,1,[defined if native macosx AQ sound support is available])
found_sound=yes
macaqsnd=true
fi
AM_CONDITIONAL(BUILD_MACSND, test x$macsnd_enabled = xtrue)
AM_CONDITIONAL(BUILD_MACAQSND, test x$macaqsnd = xtrue)
AC_ARG_ENABLE(iounit,
[ --enable-iounit Turn on native iOS audio unit support (default=no)],
[case "${enableval}" in
yes) iounit=true ;;
no) iounit=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-iounit) ;;
esac],[iounit=false])
if test "$iounit" = "true"; then
AC_DEFINE(__MACIOUNIT_ENABLED__,1,[defined if native apple iounit support is available])
iounit_enabled=true
found_sound=yes
fi
AM_CONDITIONAL(BUILD_MACIOUNIT, test x$iounit_enabled = xtrue)
AM_CONDITIONAL(BUILD_IOSIOUNIT, test x$ios_found = xyes)
AC_ARG_ENABLE(jack,
[ --disable-jack Disable jack support],
......
......@@ -30,7 +30,8 @@ public class Version {
public static final int API03_CUPCAKE_15 = 3;
public static final int API04_DONUT_16 = 4;
public static final int API06_ECLAIR_20 = 6;
public static final int API05_ECLAIR_20 = 5;
public static final int API06_ECLAIR_201 = 6;
public static final int API07_ECLAIR_21 = 7;
public static final int API08_FROYO_22 = 8;
public static final int API09_GINGERBREAD_23 = 9;
......
......@@ -5,6 +5,7 @@ APP_STL := stlport_static
# define linphone-root-dir to linphone base dir
BUILD_MS2 := 1
BUILD_SRTP := 1
linphone-root-dir:=$(APP_PROJECT_PATH)/../../../
APP_BUILD_SCRIPT:=$(linphone-root-dir)/jni/Android.mk
......
......@@ -112,7 +112,7 @@ if BUILD_MACSND
libmediastreamer_la_SOURCES+=macsnd.c
endif
if BUILD_MACIOUNIT
if BUILD_IOSIOUNIT
libmediastreamer_la_SOURCES+=msiounit.c
endif
......
......@@ -480,7 +480,7 @@ static int ice_process_stun_message(RtpSession *session, struct IceCheckList *ch
struct CandidatePair *remote_candidates = NULL;
StunMessage msg;
bool_t res;
int highest_priority_success=-1;
//int highest_priority_success=-1;
OrtpEventData *evt_data = ortp_event_get_data(evt);
mblk_t *mp = evt_data->packet;
struct sockaddr_in *udp_remote;
......@@ -552,7 +552,7 @@ static int ice_process_stun_message(RtpSession *session, struct IceCheckList *ch
if (cand_pair->connectivity_check == ICE_SUCCEEDED)
{
highest_priority_success=pos;
//highest_priority_success=pos;
break;
}
}
......
......@@ -69,6 +69,7 @@ extern void libmsandroidopengldisplay_init(void);
#ifdef ANDROID
#include <android/log.h>
#endif
#include "msprivate.h"
#if defined(WIN32) && !defined(_WIN32_WCE)
static MSList *ms_plugins_loaded_list;
......@@ -464,7 +465,7 @@ extern MSSndCardDesc aq_card_desc;
extern MSSndCardDesc pulse_card_desc;
#endif
#ifdef __IOSIOUNIT_ENABLED__
#if TARGET_OS_IPHONE
extern MSSndCardDesc au_card_desc;
#endif
......@@ -501,7 +502,7 @@ static MSSndCardDesc * ms_snd_card_descs[]={
&pulse_card_desc,
#endif
#ifdef __IOSIOUNIT_ENABLED__
#if TARGET_OS_IPHONE
&au_card_desc,
#endif
#ifdef ANDROID
......@@ -751,3 +752,30 @@ void ms_get_cur_time(MSTimeSpec *ret){
ret->tv_nsec=ts.tv_nsec;
#endif
}
struct _MSConcealerContext {
uint64_t sample_time;
int plc_count;
};
void ms_concealer_context_init(MSConcealerContext* obj){
obj->sample_time=0;
obj->plc_count=0;
}
void ms_concealer_context_update_sampling_time(MSConcealerContext* obj,unsigned int delta) {
obj->sample_time+=delta;
}
bool_t ms_concealer_context_is_concealement_required(MSConcealerContext* obj,uint64_t current_time) {
if (obj->sample_time < current_time) {
obj->plc_count++;
return TRUE;
} else {
if (obj->plc_count) {
ms_warning("Did packet loss concealment for %i ms",obj->plc_count*20);
/* FIXME: will continue to output this warning continuously...*/
}
}
return FALSE;
}
......@@ -283,7 +283,7 @@ static double powerspectrum_stat_beyond8K(struct Channel *chan){
#endif
yp = yp * fftmul;
yp = MIN(yp * 3000.0, 1.0);
yp = (1 - yp) * (100 - 1.0f);
yp = (1 - yp) * (100 - 1.0f);
mystat = yp + mystat;
}
......@@ -416,8 +416,7 @@ static void conf_sum(MSFilter *f, ConfState *s){
#ifndef DISABLE_SPEEX
if (chan->speex_pp!=NULL && s->enable_vad==TRUE && i==0)
{
int vad;
vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
ms_filter_notify(f, MS_CONF_SPEEX_PREPROCESS_MIC, (void*)chan->speex_pp);
if (s->enable_halfduplex>0)
......@@ -447,15 +446,13 @@ static void conf_sum(MSFilter *f, ConfState *s){
}
else if (chan->speex_pp!=NULL && s->enable_vad==TRUE)
{
int vad;
if (s->enable_halfduplex>0)
{
vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
}
else
{
vad = speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
speex_preprocess(chan->speex_pp, (short*)chan->input, NULL);
//speex_preprocess_estimate_update(chan->speex_pp, (short*)chan->input);
}
}
......
......@@ -166,8 +166,8 @@ static void au_detect(MSSndCardManager *m){
ms_debug("au_detect");
MSSndCard *card=au_card_new(AU_CARD_RECEIVER);
ms_snd_card_manager_add_card(m,card);
card=au_card_new(AU_CARD_SPEAKER);
ms_snd_card_manager_add_card(m,card);
//card=au_card_new(AU_CARD_SPEAKER); //Disabled because iounit cannot be used in play only mode on IOS 5.0
//ms_snd_card_manager_add_card(m,card);
}
static OSStatus au_read_cb (
......
......@@ -34,8 +34,7 @@ static void join_process(MSFilter *f){
if (f->inputs[1]!=NULL)
{
while((im=ms_queue_get(f->inputs[1]))!=NULL){
int payload;
payload=mblk_set_payload_type(im, 123);
mblk_set_payload_type(im, 123);
ms_queue_put(f->outputs[0],im);
}
}
......
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2012 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef msprivate_h
#define msprivate_h
#include "ortp/port.h"
typedef struct _MSConcealerContext MSConcealerContext;
void ms_concealer_context_init(MSConcealerContext* obj);
void ms_concealer_context_update_sampling_time(MSConcealerContext* obj,unsigned int delta);
bool_t ms_concealer_context_is_concealement_required(MSConcealerContext* obj,uint64_t current_time);
#endif
\ No newline at end of file
......@@ -214,6 +214,9 @@ int ms_discover_mtu(const char *host){
char *buf=ms_malloc0(datasize);
send_returned = send(sock,buf,datasize,0);
if (send_returned==-1){
/*ignore*/
}
ms_free(buf);
usleep(500000);/*wait for an icmp message come back */
err=getsockopt(sock,IPPROTO_IP,IP_MTU,&new_mtu,&optlen);
......
......@@ -185,17 +185,17 @@ static mblk_t * skip_rfc2190_header(mblk_t *inm){
static mblk_t * skip_rfc2429_header(mblk_t *inm){
if (msgdsize(inm) >= 2){
uint32_t *p = (uint32_t*)inm->b_rptr;
/*uint32_t *p = (uint32_t*)inm->b_rptr;*/
uint8_t *ph=inm->b_rptr;
int PLEN;
int gob_num;
/*int gob_num;*/
bool_t P;
P=rfc2429_get_P(ph);
PLEN=rfc2429_get_PLEN(ph);
/*printf("receiving new packet; P=%i; V=%i; PLEN=%i; PEBIT=%i\n",P,rfc2429_get_V(ph),PLEN,rfc2429_get_PEBIT(ph));
*/
gob_num = (ntohl(*p) >> 10) & 0x1f;
/*gob_num = (ntohl(*p) >> 10) & 0x1f;*/
/*ms_message("gob %i, size %i", gob_num, msgdsize(inm));
ms_message("ms_AVdecoder_process: received %08x %08x", ntohl(p[0]), ntohl(p[1]));*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment