[MPlayer-dev-eng] [PATCH] shmem - stream
Ötvös Attila
oattila at chello.hu
Wed Sep 12 12:41:08 CEST 2007
2007. szeptember 12. 10.48 dátummal Vladimir Voroshilov ezt írta:
> 2007/9/12, Ötvös Attila <oattila at chello.hu>:
> > 2007. szeptember 12. 09.04 dátummal Vladimir Voroshilov ezt írta:
> > > 2007/9/12, Ötvös Attila <oattila at chello.hu>:
> > > > Hi All!
> > > >
> > > > This patch implement shared video frames between more programs
>
> (mplayer
>
> > > > or mencoder) with shared memory special stream (similar TV stream).
> > > >
> > > > This patch add shmem and semaprhore detect to configure, add
> > > > stream_shmem.c.
> > >
> > > shmem detect already exists in configure (search for HAVE_SHM)
> >
> > Hi Vladimir Voroshilov!
> >
> > I used shared memory:
> > "#define HAVE_SHMEM 1" in config.h
> > "SHMEM=yes" in config.mak
> >
> > semaphores:
> > "#define HAVE_SHEMAPOHORE 1" in config.h
> >
> > configure part in patch:
> >
> > @@ -5489,6 +5497,45 @@
> > _noinputmodules="cddb $_noinputmodules"
> > fi
> >
> > +echocheck "shmem"
> > +if test "$_shmem" = auto ; then
> > + cat > $TMPC << EOF
> > +#include <sys/types.h>
> > +#include <sys/shm.h>
> > +int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0);
> > return 0; }
> > +EOF
> > + _shmem=no
> > + cc_check && _shmem=yes
> > +fi
> > +if test "$_shmem" = yes ; then
> > + _def_shmem='#define HAVE_SHMEM 1'
> > + _inputmodules="shmem $_inputmodules"
> > +else
> > + _def_shmem='#undef HAVE_SHMEM'
> > + _noinputmodules="shmem $_noinputmodules"
> > +fi
> > +echores "$_shmem"
>
> compare above code with:
>
> echocheck "shm"
> if test "$_shm" = auto ; then
> cat > $TMPC << EOF
> #include <sys/types.h>
> #include <sys/shm.h>
> int main(void) { shmget(0, 0, 0); shmat(0, 0, 0); shmctl(0, 0, 0); return
> 0; }
> EOF
> _shm=no
> cc_check && _shm=yes
> fi
> if test "$_shm" = yes ; then
> _def_shm='#define HAVE_SHM 1'
> else
> _def_shm='#undef HAVE_SHM'
> fi
> echores "$_shm"
>
> ... and "find ten differences" (c)
>
> You'll should only change HAVE_SHMEM to HAVE_SHM,
> add "SHM=$_shm" in proper place into configure and change $(SHMEM) to
> $(SHM) in your make files.
Hi Vladimir Voroshilov!
The HAVE_SHM used with video driver (vo_xvmc, vo_x11, vo_xv).
If shared memory stream depend shm check is user don't separate:
video shm (--enable-shm/--disable-shm),
shared memory stream (--enable-shmem/--disable-shmem).
Do I make depend?
Best regard.
Attila
More information about the MPlayer-dev-eng
mailing list