[Gstreamer-openmax] [PATCH 2/2] add gst-openmax registry (config file)
Clark, Rob
rob at ti.com
Fri Feb 26 14:44:56 PST 2010
On Feb 26, 2010, at 4:20 PM, Felipe Contreras wrote:
> On Sat, Feb 27, 2010 at 12:03 AM, Clark, Rob <rob at ti.com> wrote:
>> so something like:
>>
>> -----
>> omx_dummy,
>> type=GstOmxDummy,
>> derived-type=GstOmxDummyOne,
>> library-name=libomxil-bellagio.so,
>> component-name=OMX.st.dummy,
>> rank=0;
>>
>> omx_dummy_2,
>> type=GstOmxDummy,
>> derived-type=GstOmxDummyTwo,
>> library-name=libomxil-bellagio.so,
>> component-name=OMX.bellagio.dummy,
>> rank=256;
>> -----
>
> Yeah, but type => parent, derived-type = type.
>
>> it does make the config file more complex (one more thing to misconfigure), and then we need a bit more error handling, in case user specifies a type name that already exists.. so I'm not super-excited about that.
>
> I don't think we need to spend so much code to check for duplicated
> types, the type register would fail. Besides, what happens if you
> derive from a class that's not GstOmx; I don't think the proneness to
> errors is increasing that much by adding one field more.
>
>> Also, then we need an additional hash-table to map back to element name (or something like g_type_set_qdata()).. both is possible, but it makes the code slightly less simple.
>
> Why do we need to map back to element names? As you said; the user can
> select any name anyways. (We are using g_type_set_qdata() already)
sorry that wasn't very clear
I don't mean element name, but element type name.. (ie. "omx_dummy", not "omx_dummy0")
we need some way to g_omx_get_component_info() from the element instance. Currently I just use type name. I could use typename into a key into a hashtable, or g_type_set_qdata(). I guess it only really changes one function so it doesn't make that much of a difference. My bigger fear is it is just one more thing to be misconfigured, but if you aren't to worried about that, I can change it..
BR,
-R
>
>> using the element name as the type name seems a simple solution to both.
>
> Yeah, it's simple but doesn't feel right to me. I am picturing myself
> reading some debug log, scratching my head and then saying: ohh,
> omx_dummy was the _class_ name!
>
> Cheers.
>
> --
> Felipe Contreras
More information about the Gstreamer-openmax
mailing list