- Patch OSS backend to remove latency

- Remove USE_GNOME=gnomehier and @dirrm (handled by pkg)

PR:		194346
Submitted by:	hselasky
This commit is contained in:
Tijl Coosemans 2014-10-14 17:49:06 +00:00
parent d90b0c4e22
commit a50ad016ea
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=370874
3 changed files with 17 additions and 3 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= mediastreamer PORTNAME= mediastreamer
PORTVERSION= 2.10.0 PORTVERSION= 2.10.0
PORTREVISION= 5 PORTREVISION= 6
CATEGORIES= net CATEGORIES= net
MASTER_SITES= SAVANNAH/linphone/mediastreamer MASTER_SITES= SAVANNAH/linphone/mediastreamer
@ -25,7 +25,7 @@ CPPFLAGS+= -I${LOCALBASE}/include
LIBS+= -L${LOCALBASE}/lib LIBS+= -L${LOCALBASE}/lib
INSTALL_TARGET= install-strip INSTALL_TARGET= install-strip
USES= gmake libtool pathfix pkgconfig USES= gmake libtool pathfix pkgconfig
USE_GNOME= gnomehier intlhack USE_GNOME= intlhack
USE_LDCONFIG= yes USE_LDCONFIG= yes
OPTIONS_DEFINE= IPV6 NLS UPNP VIDEO OPTIONS_DEFINE= IPV6 NLS UPNP VIDEO

View file

@ -0,0 +1,15 @@
--- src/audiofilters/oss.c.orig
+++ src/audiofilters/oss.c
@@ -364,7 +364,11 @@
}
}
if (d->pcmfd_write>=0){
- if (d->write_started){
+ int bufsize = 0;
+ ioctl(d->pcmfd_write, SNDCTL_DSP_GETODELAY, &bufsize);
+ if (bufsize >= bsize){
+ /* wait for buffer to empty */
+ }else if (d->write_started){
err=ms_bufferizer_read(d->bufferizer,wtmpbuff,bsize);
if (err==bsize){
err=write(d->pcmfd_write,wtmpbuff,bsize);

View file

@ -55,4 +55,3 @@ share/images/nowebcamCIF.jpg
%%NLS%%share/locale/ru/LC_MESSAGES/mediastreamer.mo %%NLS%%share/locale/ru/LC_MESSAGES/mediastreamer.mo
%%NLS%%share/locale/sv/LC_MESSAGES/mediastreamer.mo %%NLS%%share/locale/sv/LC_MESSAGES/mediastreamer.mo
%%NLS%%share/locale/zh_CN/LC_MESSAGES/mediastreamer.mo %%NLS%%share/locale/zh_CN/LC_MESSAGES/mediastreamer.mo
@dirrm include/mediastreamer2