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

Nico Sabbi nicola_sabbi at fastwebnet.it
Sat Nov 4 10:35:12 CET 2006


Attila Kinali wrote:

>On Tue, 31 Oct 2006 00:46:14 +0100
>Ötvös Attila <oattila at chello.hu> wrote:
>
>  
>
>>This patch does sharedmem 'stream'.
>>    
>>
>
>This looks cool! We need that for the next LinuxTag! :-)
>
>Can please someone review this?
>
>Thanks
>				Attila Kinali
>
>  
>

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
3) this kind of streams is clearly non-seekable, so set stream->seek=NULL;
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



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 







More information about the MPlayer-dev-eng mailing list