[gst-devel] Regarding neonhttpsrc - SEEK

Edgard Lima edgard.lima at indt.org.br
Fri Feb 24 10:14:02 CET 2006


Hi Jonas,

Im answer to you and gst-devel because it may be of interest of others.

Yes seek is possible, see below the answer from Joe Orten to my 
quasetion on libneon devl-list:

<<<<

On Tue, Feb 21, 2006 at 11:35:27AM -0300, Edgard Lima wrote:

>> Is it possible to seek forward/backward using libneon when download a file?
>> 
>> if not, somehow is it planned to be done? when?
>  
>

You cannot "seek" backwards and forwards within an HTTP response, no.  
If you change your mind about what offset you want, you have to send a 
new request - you can send "Range" headers in the request to ask for a 
specific offset; see ne_get_range() in ne_basic.c for an example of how 
to do that.

Does that help?

Regards,

joe


 >>>>

It means that inside the plugin when receive a seek we need some concurrency control to wait ne_read_response_block finish and then we force the current request to end and finnaly make a new request as told by Joe above.
In addition to that Ive identified a potential bug on neonhttpsrc that it can some times send EOS before push the last buffer, so the last buffer will be lost.

Jonas,

right now Im too busy with others task, so I wont touch in it for some weeks, if you or someone could write a patch or commit it I would thanks very much.
If not I can do it after some weeks no prob.

Best Regards,
Edgard - alima
edgard.lima at indt.org.br

- - - - - -  - - - - - - - -  - - - - - - - - - - - - - - - - - - - - - - - - - -





ext Jonas Storholm wrote:

>Thank you for the straight answer. 
>
>Please have consideration for mistakes in my logic, I am quite new to
>GStreamer hacking.
>
>I looked around in the code for gstgnomevfssrc that in 0.8 worked as I
>described in the earlier mail. Gnomevfs uses libneon for the http access
>part, maybe we can study the inner workings of the http-neon-method.c in
>gnome-vfs-2.9.93? Using gnomevfs it is possible to open a http source in
>"GNOME_VFS_OPEN_RANDOM"-mode, this causes libneon to add a a range request
>in the HTTP GET header to get a specific part of the file, but only if the
>server supports HTTP/1.1.
> 
>However, implementing this procedure in the neonhttpsrc is a different
>story.
>
>By using gnomevfssrc from gst-plugins-base out of CVS, and modifying ~10
>lines of code I've gotten seeking to work (it's a hack). It is at the moment
>doing a lot of redundant data requests and really hammering the http server
>during the typefind stage, but maybe this could be avoided using some kind
>of cache? Of course gnomevfssrc.c is the wrong place to put a cache, I am
>still pondering for a solution to this.
>
>Please let me know what you find out, I will continue on the path I am
>currently on and if I get something I am satisfied with I will send you a
>patch (or should I send it to gnomevfs maintainer?)
>
>My suggestion is, if you have the time, check out the http-neon-method.c in
>the gnome-vfs sources and use a similar method in gstneonhttpsrc to support
>seeking back and forth.
>
>Regards,
>Jonas Storholm
>
>-----Original Message-----
>From: Edgard Lima [mailto:edgard.lima at indt.org.br] 
>Sent: den 21 februari 2006 17:09
>To: ext Jonas Storholm
>Subject: Re: Regarding neonhttpsrc
>
>
>Hi Jonas,
>
>Im afraid it isnt possible with libneon. Ive just sent a mail to libneon 
>mail list and Im wating for answers.
>If Im wrong and it is possible I ll implement it soon.
>I ll let you know about it as soon as possible.
>
>[]s
>Edgard
>
>
>ext Jonas Storholm wrote:
>
>  
>
>>Dear Sir,
>>
>>I recently came across the neonhttpsrc code in GStreamer 0.10 and I've been
>>doing some testing with it. It seems to work quite well, however one aspect
>>needed for my purposes is missing: seeking.
>>
>>I would like to be able to do a seek (with the natural delay and
>>re-buffering of course) both backwards and forwards in a stream. Is this
>>something you are currently working on? (Or just something in my
>>implementation that doesn't work :)
>>
>>If you have thought about it but haven't found the time to do it, please
>>    
>>
>let
>  
>
>>me know if I can be of any help; If not I will try to get something working
>>and of course send you the patches.
>>
>>Regards,
>>Jonas Storholm
>>
>>
>>
>> 
>>
>>    
>>
>
>
>  
>





More information about the gstreamer-devel mailing list