Commit 248d18ba authored by Aymeric Moizard's avatar Aymeric Moizard
Browse files

Merge branch 'master' of git.linphone.org:mediastreamer2

parents 1f08c31e af7bfe34
......@@ -561,10 +561,10 @@ AM_CONDITIONAL(BUILD_V4L, test x$found_v4l = xyes )
AC_ARG_ENABLE(libv4l,
[ --disable-libv4l Disable usage of libv4l, really discouraged],
[case "${enableval}" in
yes) libv4l=true ;;
no) libv4l=false ;;
yes) libv4l=yes ;;
no) libv4l=yes ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-libv4l) ;;
esac],[libv4l=true])b
esac],[libv4l=yes])
PKG_CHECK_MODULES(LIBV4L2, libv4l2,
[AC_DEFINE(HAVE_LIBV4L2,1,[Defined if we have libv4l2])
......@@ -578,7 +578,7 @@ PKG_CHECK_MODULES(LIBV4L1, libv4l1,
)
if test "$found_v4l" = "yes" && test "$have_libv4l2" != "yes" ; then
if test "$libv4l" = "no" ; then
if test "$libv4l" = "yes" ; then
AC_MSG_ERROR(
[
Missing libv4l2. It is highly recommended to build with
......
......@@ -61,6 +61,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/* set a gain in db */
#define MS_VOLUME_SET_DB_GAIN MS_FILTER_METHOD(MS_VOLUME_ID,13,float)
/* get a linear gain */
#define MS_VOLUME_GET_GAIN MS_FILTER_METHOD(MS_VOLUME_ID,14,float)
extern MSFilterDesc ms_volume_desc;
#endif
......@@ -213,6 +213,12 @@ static int volume_set_gain(MSFilter *f, void *arg){
return 0;
}
static int volume_get_gain(MSFilter *f, void *arg){
float *farg=(float*)arg;
Volume *v=(Volume*)f->data;
*farg = v->gain;
return 0;
}
static int volume_get_ea_state(MSFilter *f, void *arg){
int *barg=(int*)arg;
......@@ -399,6 +405,7 @@ static MSFilterMethod methods[]={
{ MS_VOLUME_SET_NOISE_GATE_THRESHOLD, volume_set_noise_gate_threshold},
{ MS_VOLUME_SET_NOISE_GATE_FLOORGAIN, volume_set_noise_gate_floorgain},
{ MS_VOLUME_SET_DB_GAIN , volume_set_db_gain },
{ MS_VOLUME_GET_GAIN , volume_get_gain },
{ 0 , NULL }
};
......
......@@ -1751,14 +1751,14 @@ void static_image_process(MSFilter *f){
SIData *d=(SIData*)f->data;
/*output a frame every second*/
if ((f->ticker->time - d->lasttime>1000) || d->lasttime==0){
ms_mutex_lock(&f->lock);
ms_filter_lock(f);
if (d->pic) {
mblk_t *o=dupb(d->pic);
/*prevent mirroring at the output*/
mblk_set_precious_flag(o,1);
ms_queue_put(f->outputs[0],o);
}
ms_mutex_unlock(&f->lock);
ms_filter_unlock(f);
d->lasttime=f->ticker->time;
}
}
......@@ -1799,8 +1799,11 @@ static int static_image_set_image(MSFilter *f, void *arg){
d->nowebcamimage = ms_strdup(def_image);
if (d->pic!=NULL){
/* Get rid of the old image and force a new preprocess so that the
new image is properly read. */
freemsg(d->pic);
d->pic=NULL;
static_image_preprocess(f);
}
ms_filter_unlock(f);
......
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