[MPlayer-dev-eng] [RFC] ssh sftp stream support

Nico Sabbi nsabbi at email.it
Mon Oct 30 09:51:05 CET 2006


Nicolas Collignon wrote:

> The attached patch add support for SFTP protocol over SSH using 
> OpenSSH program
> as slave for SSH communication (the same way sftp do).
>
> Several questions:
>
> 1) The stream is marked "config-is-in-url" but I would like to enable
> more option than just
>    - hostname
>    - port
>    - user
>    Actually the OpenSSH arguments are : "ssh -2akTxs hostname sftp".
> I want them to
>    be settable on command line.
>    How to do this if stream is marked "config-is-in-url" ?
>
> 2) STREAM_BUFFER_SIZE is 2ko in current mplayer source. This is not 
> enough for
>    SSH streams: the download rate is ~60ko/s which is too slow for 
> playing
>    remote movie (mpeg/divx/xvid encoded).


I suppose this depends on the movie itself; if the ssh stream code
can still work with the default 2048 bytes you don't need to alter it

>    Using a 32ko or 64ko STREAM_BUFFER_SIZE seems too be good enough: 
> ~250ko/s
>    I don't know if this happen only with SSH streams or with all
> remote streams.
>
>    I see 4 possible solutions:
>      - implement data prefetching in my code
>      - implement data prefetching in cache code


eventually in your code

>      - make STREAM_BUFFER_SIZE config-settable (compile time + run time)


this is my preferred choice

>      - increase STREAM_BUFFER_SIZE in stream.h
>
> 3) The code uses readv(2) instead of read(2) to perform zero-copy read
> operations.
>     So <sys/uio.h> is included, I don't know how portable it is.
>
> 4) This code has only been tested on little-endian systems.
>    Big-endian implementation must be tested
>
> The patch currently set STREAM_BUFFER_SIZE to 32ko so remote playing 
> works ok.
> Initial delay before playing video/audio is ~35 seconds. This can
> certainly be optimised.
>
> waiting for comments/answers :) ...
> There are some "FIXME" in the code.
>
>------------------------------------------------------------------------
>

forking is _unacceptable_
There is a mixture of tabs and spaces and inconsistent indentation;
fix them in your next patch, please.

   
    Nico



More information about the MPlayer-dev-eng mailing list