[MPlayer-dev-eng] [PATCH] CCTV part2 - sharedmem stream

Ötvös Attila oattila at chello.hu
Sat Nov 4 14:26:11 CET 2006


2006. november 4. 10.35 dátummal Nico Sabbi ezt írta:
> sorry to sound like the bad guy, but I have some objections:
>
> 1) what's the use of the width  and heght fields in the stream file?
> 2) width and height have absolutely nothing to do with the stream layer, so
> those STREAM_CTRL are bad (and unnecessary).
> use -rawvideo :w= and :h= instead
In the case of raw stream the width and height can't be determined directly. 
The source side of the sharedmem stream determines the format, width and
height of the stream.
So I used the width, height and stream_ctrl_*  in the stream reader.
Therefore  there is no need for  
-rawvideo w=720:h=576:format=0x32315659 options. 
I think this is usefriend solution.

mplayer smem://1001 -rawvideo w=720:h=576:format=0x32315659
or
mplayer smem://1001

> 3) this kind of streams is clearly non-seekable, so set stream->seek=NULL;
OK
> 4) I don't have the slightest clue about shared memory, so I won't comment
> 5) the patch to mencoder is largely intrusive and I don't like how you
> designed it.
>
> Since the intended usage is:
>
> mencoder tv:// -tv device=/dev/video0:width=720:height=576 [options]
> -smemid 1001 & mencoder tv:// -tv device=/dev/video1:width=720:height=576
> [options] -smemid 1002 & mencoder tv:// -tv
> device=/dev/video2:width=720:height=576 [options] -smemid 1003 & mencoder
> tv:// -tv device=/dev/video3:width=720:height=576 [options] -smemid 1004 &
>
> video2mem &
>
> mplayer { smem://1001 smem://1002 smem://1003 smem://1001,1002,1003,1004
> -vf scale=360:288,tile=2:2 -fps 100 } -loop 0 -rawvideo w=720:h=576:fps=25

mplayer { smem://1001 smem://1002 smem://1003 smem://1004 
{ smem://1001,1002,1003,1004 -vf scale=360:288,tile=2:2 -fps 100 } } -loop 0

this results in:

full 1001
<enter>
full 1002
<enter>
full 1003
<enter>
full 1004
<enter>
shared 1001-1004
<enter>
full 1001
...

>
>
> my advice is to create a stream_out structure for mencoder (partly
> already in place,
> although it requires some changes to the muxers) to save the output
> stream to
>
> (to be used with something like:
> $ mencoder -os smem -smemopts ids=1001 -oac copy -ovc copy ... tv://)
>
> and change your new stream reader making it recognize some twisted syntax
> to read from N shared memory segments, then call it with
>
> mplayer smem://1001,1002,1003,1004  -rawvideo w=720:h=576:fps=25  -vf
> scale=360:288,tile=2:2 -fps 100 -loop 0

This is a good idea and in future maybe the shared mem stream is
extendable therefore it can use mp_image_t so the result of the video
filters and/or frames of subtitles can be used.
In far future I can imagine a video filter family which will conect more
video stream.

Best regards!
Attila



More information about the MPlayer-dev-eng mailing list