[MPlayer-dev-eng] [PATCH] shared memory stream - part 1

Ötvös Attila oattila at chello.hu
Wed Aug 8 13:20:48 CEST 2007


2007. augusztus 8. 09.47 dátummal Carl Eugen Hoyos ezt írta:
> Hi Attila!
>
> Just a few remarks, I'm sorry, I can't really review the code.
>
> Attila Ötvös wrote:
> > Hi all!
> >
> > part-1: configure, shared memory stream and implement -ors options.
> > part-2: shared memory export, import filter
>
> Does the first part work without the second?

Yes.

> [...]
>
> > ===================================================================
> > --- stream/stream_sharedmem.c	(revision 0)
> > +++ stream/stream_sharedmem.c	(revision 0)
> > @@ -0,0 +1,476 @@
> > +/*
> > + *  stream_sharedmem.c
> > + *
> > + *	Copyright (C) Ötvös, Attila <attila at onebithq.com> - 08/2007
> > + *
> > + *  This file is part of MPlayer, a free movie player.
> > + *
> > + *  MPlayer 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, or (at your option)
> > + *  any later version.
> > + *
> > + *  MPlayer 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 GNU Make; see the file COPYING.  If not, write to
> > + *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139,
> > USA.
>
> This is not a correct license header (adress wrong). Also in other files.

I copy from stream_netstream.c (since 06/2006). I will corrections.

> [...]
>
> > Index: stream/stream_sharedmem.h
> > ===================================================================
> > --- stream/stream_sharedmem.h	(revision 0)
> > +++ stream/stream_sharedmem.h	(revision 0)
> > @@ -0,0 +1,8 @@
> > +#ifndef _STREAM_SHAREDMEM_H_
> > +#define _STREAM_SHAREDMEM_H_
>
> No leading underscores, please.

OK. I will corrections.

> [...]
>
> > Index: configure
> > ===================================================================
> > --- configure	(revision 24014)
> > +++ configure	(working copy)
> > @@ -281,6 +281,8 @@
> >    --disable-w32threads   disable Win32 threads support [autodetect]
> >    --disable-ass          disable internal SSA/ASS subtitle support
> > [autodetect] --enable-rpath         enable runtime linker path for extra
> > libs [disabled] +  --enable-sharedmem	 Enable put readed frame to shared
> > memory area in mencoder and + 			             shared memory reader stream
> > [autodetect]
>
> This should be improved - I don't understand it.

I will probe correction.

> [...]
>
> > Index: libmpdemux/demux_rawvideo.c
> > ===================================================================
> > --- libmpdemux/demux_rawvideo.c	(revision 24014)
> > +++ libmpdemux/demux_rawvideo.c	(working copy)
> > @@ -15,7 +15,7 @@
> >  #include "libmpcodecs/img_format.h"
> >
> >  extern int demuxer_type;
> > -static int format = IMGFMT_I420;
> > +static int format = 0;
> >  static int size_id = 0;
> >  static int width = 0;
> >  static int height = 0;
> > @@ -55,6 +55,12 @@
> >  static demuxer_t* demux_rawvideo_open(demuxer_t* demuxer) {
> >    sh_video_t* sh_video;
> >
> > +#ifdef HAVE_SHAREDMEM
> > +  if (width==0) stream_control(demuxer->stream, STREAM_CTRL_GET_WIDTH,
> > &width); +  if (height==0) stream_control(demuxer->stream,
> > STREAM_CTRL_GET_HEIGHT, &height); +  if (format==0)
> > stream_control(demuxer->stream, STREAM_CTRL_GET_FORMAT, &format);
>
> if (!width), if (!height), if (!format) is, AFAIK, the preferred form
> for mplayer.

OK. I will corrections.

> > +#endif
> > +  if (format==0) format = IMGFMT_I420;
> >    switch(size_id){
> >    case 1: width=128; height=96; break;
> >    case 2: width=176; height=144; break;
> > @@ -80,6 +86,7 @@
> >    case IMGFMT_YUY2: imgsize=width*height*2;break;
> >    case IMGFMT_UYVY: imgsize=width*height*2;break;
> >    case IMGFMT_Y8: imgsize=width*height;break;
> > +  case IMGFMT_Y800: imgsize=width*height;break;
>
> Possibly unrelated bugfix?

Yes. I will separated.

Best regard.
Attila



More information about the MPlayer-dev-eng mailing list