Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
248d18ba
Commit
248d18ba
authored
Mar 26, 2010
by
Aymeric Moizard
Browse files
Merge branch 'master' of git.linphone.org:mediastreamer2
parents
1f08c31e
af7bfe34
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
6 deletions
+19
-6
configure.ac
configure.ac
+4
-4
include/mediastreamer2/msvolume.h
include/mediastreamer2/msvolume.h
+3
-0
src/msvolume.c
src/msvolume.c
+7
-0
src/nowebcam.c
src/nowebcam.c
+5
-2
No files found.
configure.ac
View file @
248d18ba
...
...
@@ -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
...
...
include/mediastreamer2/msvolume.h
View file @
248d18ba
...
...
@@ -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
src/msvolume.c
View file @
248d18ba
...
...
@@ -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
}
};
...
...
src/nowebcam.c
View file @
248d18ba
...
...
@@ -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_
mu
te
x
_lock
(
&
f
->
lock
);
ms_
fil
te
r
_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_
mu
te
x
_unlock
(
&
f
->
lock
);
ms_
fil
te
r
_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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment