[gst-devel] Re: filesink tweak
rbultje at ronald.bitfreak.net
Tue Jun 10 19:36:05 CEST 2003
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
On the other hand, I see your point... Returning with a warning isn't a
good idea either (or is it?)... Comments wanted. ;).
(I'll apply most of this to CVS, we'll finetune it with whatever we come
up with if needed later on).
Ronald Bultje <rbultje at ronald.bitfreak.net>
More information about the gstreamer-devel