[gst-devel] Re: filesink tweak
Joshua N Pritikin
vishnu at pobox.com
Fri Jun 6 21:45:05 CEST 2003
On Sat, Jun 07, 2003 at 01:55:30AM +0200, Ronald Bultje wrote:
> On Wed, 2003-06-04 at 19:45, Joshua N Pritikin wrote:
> > Here's my version of gst_filesink_set_property, slightly different
> > from your proposal:
> > case ARG_LOCATION:
> > /* the element must be stopped or paused in order to do this */
> > g_return_if_fail (GST_STATE (sink) <= GST_STATE_PAUSED);
> > if (GST_STATE (sink) == GST_STATE_PAUSED &&
> > GST_FLAG_IS_SET (sink, GST_FILESINK_OPEN))
> > gst_filesink_close_file (sink);
> > ...
> > Look OK? Closing the file seems better than g_return_if_fail.
> I'm not sure. I'm actually much in doubt here (so, CC: devel). The idea
> is to connect to the EOS signal and change the file location in there.
> That'd be the ideal case. The problem of your approach is basically that
> the application *cannot* possibly know when is a good time to close the
> file, so allowing it to close it would be a stupid idea. At best, it can
> insert an EOS event somewhere in the pipeline to achieve that
Oh! i was missing that EOS closes the file. Actually i am already
triggering on the EOS signal, so i don't need any change to what is
already in CVS.
> On the other hand, I see your point... Returning with a warning isn't a
> good idea either (or is it?)... Comments wanted. ;).
Consider my point withdrawn. ;-)
Victory to the Divine Mother!! after all,
More information about the gstreamer-devel