[gst-devel] Overwriting files in sinks

Stefan Kost ensonic at hora-obscura.de
Thu Oct 4 09:55:09 CEST 2007


Hi,

Quoting Stefan Kost <ensonic at hora-obscura.de>:

> Hi René,
>
> René Stadler wrote:
>> Am Mittwoch, den 03.10.2007, 08:05 +0200 schrieb Stefan Kost:
>>> hi,
>>>
>>> Quoting Sebastian Dröge <slomo at circular-chaos.org>:
>>>
>>>> Am Montag, den 01.10.2007, 22:29 +0300 schrieb Stefan Kost:
>>>>> Hi,
>>>>>
>>>>> Sebastian Dröge wrote:
>>>>>> Am Samstag, den 29.09.2007, 13:38 +0300 schrieb Stefan Kost:
>>>>>>> shouldn't this be done as a GInterface? Then an application can
>>>>> reliably detect
>>>>>>> that it supports it.
>>>>>> How would this interface look like? Can interfaces contain signals?
>>>>>>
>>>>> Yes, they can.
>>>>> GstFilesystemSinkIface could be a interface name - dunno what else
>>>>> could fit in
>>>>> there.
>>>> Ok, good to know... might be a good solution then :)
>>> One more idea for the interface. It could help to identify the
>>> property that has the uir/location. Ideally its a interface property
>>> called "location". But that means elements like playbin will have the
>>> uri property as legacy (unfortunately there is not G_PARAM_DEPRECATED
>>> flag, to mark it as such).
>>>
>>> It would also be nice to see if it is a local file-path or a uri.
>>> Regariding this I just wrote an email to gtk-app-devel to see if
>>> someone already implemented GParamSpecs for a file-path or uri. That
>>> would then also be enough to tell them apart fromr egular strings.
>>> http://mail.gnome.org/archives/gtk-app-devel-list/2007-October/msg00022.html
>>>
>>> Why I need that info? Beause I generate UI for gstreamer elements.
>> <snip>
>>
>> For generating a consistent UI, just provide a way to set the URI
>> through the URIHandler interface.  There's no need to use a property for
>> that, let alone use heuristics or a new data type to find out which one
>> of the properties corresponds to the very same purpose that the
>> interface implementation does.
>>
> The UI generation code walks over the properties and generates   
> widgets for them.
> The URIHanlerInterface could have been usefull, if it would have used an
> interface property instead of two interface methods (get_uri/set_uri).
> How should the urihandler-iface help me to identify which property I  
>  can hide.

Answering myself: Please close this mail if you don't want to read  
something ugly so early in the morning:

saved = gst_uri_handler_get_uri (elem);
id = g_signal_connect (elem, "notify", check_notify, self);
gst_uri_handler_set_uri (elem, saved);
g_signal_handler_disconnect (elem, id);

static void
check_notify (const GstElement *elem,GParamSpec *arg,gpointer user_data)
{
   uri_param = arg->name;
}

Stefan





More information about the gstreamer-devel mailing list