Hi Stephan,
Stephan Bergmann a écrit :
>> Do you have an idea on how I could make a mapping between strings used
>> by gstreamer and UNO Constants ? First I though about an xml file
>> describing the mapping, however how could I make it dependent from the
>> component's library and not the whole program ?
>>
>> I mean: is there any way to embed the mapping into a shared library so
>> that I get a reusable component ?
> Not sure I get what you want to do, but UNO's reflection capabilities
> (com.sun.star.reflection) might come in handy when mapping between UNO
> entities and their string representations.
In fact I have in my component's API, I have methods like the following:
<idl>
interface XMElement: com::sun::star::uno::XInterface {
void setProperty([in] string sName, [in] string sValue);
};
</idl>
However, the sName parameter is actually a GStreamer string... which
isn't good for a generic API. I'd like to have some UNO constants to use
instead. The problem is how to make the mapping between the UNO
Constants (or their string representation) and the GStreamer strings.
For example, I'ld to use:
<c++>
//FILE_LOCATION is a UNO Constant defined in my API to be mapped on the
//Gstreamer "location" string...
myElement.setProperty(FILE_LOCATION, "/path/to/my/file);
</c++>
instead of:
<c++>
// "location" is a GStreamer dependent string :(
myElement.setProperty("location", "/path/to/my/file");
</c++>
I hope that was clearer this time.
Cedric
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]