[gst-devel] Seeking on a http/ssh/ftp stream

LRN lrn1986 at gmail.com
Thu Jul 30 04:10:23 CEST 2009


Tiago Katcipis wrote:
> I have a multimedia server that provides live playing of stored files, i
> receive a uri (that can be a SSH, FTP or HTTP), opens it, decode and send it
> back to the client.
>
> Everything works fine, im using gnomevfs to open the uri, the problem starts
> when i start to seek through the stream, it seens that gnomevfssrc does not
> handle seeking. Im aware of the existence of a giosrc element too, but until
> now i just have tried to work with gnomevfssrc.
>
> i already read something about that but it was old posts (saying that isnt
> possible), so i wanted to be sure, is giosrc ou gnomevfssrc capable of doing
> seeking on a http/ssh/ftp stream? I didnt find anything on the documentation
> and i cant be sure if its not working because im doing something wrong or if
> it wont work simply because it dont work.
>
> best regards,
> Katcipis
>   
Everything boils down to this little macro:
#define GST_GIO_STREAM_IS_SEEKABLE(stream) (G_IS_SEEKABLE (stream) &&
g_seekable_can_seek (G_SEEKABLE (stream)))

Which uses this little function:
http://library.gnome.org/devel/gio/stable/GSeekable.html#g-seekable-can-seek

Which checks G_IS_SEEKABLE() and returns can_seek property of the
G_SEEKABLE_GET_IFACE
So, if you want to know whether you can seek a particular GIOSTREAM or
not, get its sources and grep for "->can_seek".





More information about the gstreamer-devel mailing list