Gstreamer continue playing a deleted file

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

Gstreamer continue playing a deleted file

cristian
I observed that an mp3 application using a base pipeline for decoding that when launching the binary and a given sample, the pipeline begins to work and in that time I remove the audio file that is playing, the pipeline continue to play with no problems.
I don't know what gstreamer is doing, I guess it buffers 100% the file from the beggining and then doesn't get its data from the original audio file.
My question is that, where can I look or modify my code that the pipeline stops when the audio file is deleted during the playing state?

Cristi.
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer continue playing a deleted file

Marc Leeman
> I don't know what gstreamer is doing, I guess it buffers 100% the file from
> the beggining and then doesn't get its data from the original audio file.

You opened your filehandle in kernel space; the reference to your
deleted file will only be gone once the filehandle is closed. This is
not GStreamer related.

--
  greetz, marc
Biology is the only science in which multiplication means the same thing
as division.
crichton 2.6.26 #1 PREEMPT Tue Jul 29 21:17:59 CDT 2008 GNU/Linux

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer continue playing a deleted file

cristian
>You opened your filehandle in kernel space; the reference to your
deleted file will only be gone once the filehandle is closed. This is
not GStreamer related.

You might be right about this but how can I open my filehandle in kernel space???
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer continue playing a deleted file

Andrés González
In reply to this post by cristian
On 08/10/10 15:09, cristiurban wrote:

> I observed that an mp3 application using a base pipeline for decoding that
> when launching the binary and a given sample, the pipeline begins to work
> and in that time I remove the audio file that is playing, the pipeline
> continue to play with no problems.
> I don't know what gstreamer is doing, I guess it buffers 100% the file from
> the beggining and then doesn't get its data from the original audio file.
> My question is that, where can I look or modify my code that the pipeline
> stops when the audio file is deleted during the playing state?
>
> Cristi.
I suggest using g_timeout_add() to check periodically (e.g. every
second) if the file still exists [using fopen(..., "r"), fstat(), ...],
and if not, stop pipeline.
Regards,
Andrés

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel