playbin2 streaming while downloading file on disk

classic Classic list List threaded Threaded
3 messages Options
smo
Reply | Threaded
Open this post in threaded view
|

playbin2 streaming while downloading file on disk

smo
hi all

is it possible to stream a file from disk (file:///....) while
downloading and have the duration updated too ?

i can start reading but it play 9 seconds for exemple, i try to update
the file duration but seems not working and reading stop after 9 seconds...

thanks


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: playbin2 streaming while downloading file on disk

Wes Miller
Administrator


On 8/22/11 11:08 AM, "laguillaumie sylvain" <[hidden email]> wrote:


>hi all
>
>is it possible to stream a file from disk (file:///....) while
>downloading and have the duration updated too ?


If I read this correctly, you are simultaneously downloading and playing
the same one file.  And it sounds like you're able to play faster than you
can download.

The obvious answer is, of course, you  have to download faster or, wait to
start playing till you enough file that you can't out run yourself.

I suppose you could pause on a single (the last) frame and keep
retransmitting it until more data is available.  You'd have something to
look at while you are stalled. I've never tried this so I have no idea if
it is possible.  Perhaps, tee our data into your play element and into a
appsink and have the appsink remember the last couple of frames.   When
the data paused, the appsionk could signal a separate pipeline to play the
saved frame in a loop using an appsrc?  This sounds WAY not trivial.

 Would the duration really matter?  If you know the full duration up
front, it doesn't need updated.  If you only have the current segment's
duration and you are waiting on more data, the duration is meaningless
until the data arrives, right?

>
>i can start reading but it play 9 seconds for exemple, i try to update
>the file duration but seems not working and reading stop after 9
>seconds...
>
>thanks
>

Wes Miller


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: playbin2 streaming while downloading file on disk

Stefan Sauer
In reply to this post by smo
On 08/22/11 17:08, laguillaumie sylvain wrote:
> hi all
>
> is it possible to stream a file from disk (file:///....) while
> downloading and have the duration updated too ?

not like that. You can try using playbin2 with
flag=GST_PLAY_FLAG_DOWNLOAD. Your milage will vary depending on the
format you are using.

Stefan

> i can start reading but it play 9 seconds for exemple, i try to update
> the file duration but seems not working and reading stop after 9
> seconds...
>
> thanks
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel