[MPlayer-dev-eng] Re: [PATCH] Seek in http-streams

Valentine Zaretsky valik+mplayerdev at email.dp.ua
Sat Jan 10 16:01:19 CET 2004


Alban Bedel wrote:

>>- type of the second argument in streaming_seek callback of 
>>streaming_ctrl_t structure has been changed to stream_t* (from 
>>streaming_ctrl_t*) because we need new to open new connection in order 
>>to seek on http and thus close old stream->fd and assign new one, so 
>>streaming_ctrl_t is not enough
>>    
>>
>
>I don't really like the idea of changing all these callbacks, etc
>You can use dup2 to continue to use the old fd.
>  
>
>Dunno however if that will work on win32 and other fancy os.
>  
>
Ok, maybe in this case it would be better not to use streaming_ctrl_t 
callback at all?
Using seek callback of stream_t  after checking flags of stream in 
stream_seek_long seems to be cleaner than my patch and your dup2 suggestion.
What do you think of it?

>  
>
>>- new http_streaming_seek function doing the main job
>>    
>>
>
>I have a few other remarks. First note that stream seeking caps.
>is normaly indicated in the stream flags. So you should rather use
>that instead of the ugly STREAM_SEEKABLE() define.
>Ihmo you should only modify autodetectProtocol to make it return
>a different value if the stream is seekable. Then the seek callback
>can just be set in streaming_start. No need for an extra field in
>streaming_ctrl_t.
>
>  
>
Agreed.

--
Best regards, Valentine





More information about the MPlayer-dev-eng mailing list