[gst-devel] Overwriting files in sinks
Tim Müller
t.i.m at zen.co.uk
Sat Sep 29 20:38:24 CEST 2007
On Sat, 2007-09-29 at 08:57 +0200, Sebastian Dröge wrote:
> I wondered what ways we currently have for overwriting files in sinks
> and what is the prefered way.
> There's a signal that is emitted in gnomevfssink, that apps can hook
> into to ask the user if the file should be overridden, filesink doesn't
> have such mechanism at all.
>
> The signal in gnomevfssink is:
> "allow-overwrite" : gboolean user_function (GstElement* object,
> GnomeVFSURI* arg0,
> gpointer user_data);
>
> Would it make sense to implement this signal in filesink and giosink
> (and any other file sinks), too? Of course the GnomeVFSURI parameter in
> those other sinks must be changed to something else, i.e. char *
> containing the URI.
This issue is also being discussed in
http://bugzilla.gnome.org/show_bug.cgi?id=334290
just in case you haven't seen that yet.
> For 0.11 this should be changed in gnomevfssink as this way the app has
> to know about GnomeVFS unfortunately.
In 0.11 gnomevfssink will hopefully have been replaced by giosink.
> Does anybody have better ideas? Otherwise I'll go ahead and implement
> this in filesink and giosink.
It would IMHO be good if a solution was found that didn't require the
application to check the actual type of the element in order to know
what the second argument is.
Also, emitting a signal is a bit evil, even if it's usually not going to
be emitted from a streaming thread in this case, since applications will
probably show a confirmation dialog from the signal callback and run a
main loop via gtk_dialog_run() or similar, which means there's at least
the potential for all kind of reentrancy issues that an application
developer is unlikely to expect. Not sure what a better solution would
be though.
Cheers
-Tim
More information about the gstreamer-devel
mailing list