[Gstreamer-openmax] Support for hardware codecs

Clark, Rob rob at ti.com
Wed Feb 24 17:30:33 PST 2010


On Feb 24, 2010, at 10:19 AM, Felipe Contreras wrote:

> On Wed, Feb 24, 2010 at 4:10 PM, Rob Clark <rob at ti.com> wrote:
>> On Feb 24, 2010, at 6:41 AM, Felipe Contreras wrote:
>>> I think rank should also be optional.
>> 
>> ok, should default rank=GST_RANK_NONE?
> 
> That was my idea, yeah.
> 
>>> Anyway, the only important comment I have for now is that I think the
>>> type should also be configurable (you can use g_type_from_name())
>>> 
>>> I'm thinking something like:
>>> 
>>> ---
>>> omx_mp3dec_ti:
>>>       type: GstOmxMp3Dec
>>>       library-name: libOMX_Core.so.0
>>>       component-name: OMX.TI.AUDIO.DECODE
>>>       component-role: audio_decode.dsp.mp3
>>>       rank: 256
>>> 
>>> omx_mp3dec_nokia:
>>>       type: GstOmxMp3Dec
>>>       library-name: libomxil_bellagio.so.0
>>>       component-name: OMX.nokia.audio_decode.mp3
>>>       rank: 128
>>> ---
>> 
>> ok, that seems reasonable..  are you ok w/ basically same thing in GstStructure syntax:
>> 
>> omx_mp3dec_ti,
>>        type=GstOmxMp3Dec,
>>        library-name=libOMX_Core.so.0,
>>        component-name=OMX.TI.AUDIO.DECODE,
>>        component-role=audio_decode.dsp.mp3,
>>        rank=256;
>> 
>> omx_mp3dec_nokia,
>>        type=GstOmxMp3Dec,
>>        library-name=libomxil_bellagio.so.0,
>>        component-name=OMX.nokia.audio_decode.mp3,
>>        rank=128;
> 
> Yeah, whatever is easier.


ok, what I ended up doing, in order to accommodate multiple elements with different names and different component-name and/or library-name but same gst-openmax class was to dynamically generate subclasses of the gst-openmax class..  so for example you'll end up with a class called omx_mp3dec_ti and omx_mp3dec_nokia which both subclass GstOmxMp3Dec.  This approach seems to work pretty well, you can have as many different elements using the same code but different OMX components as you want:

 http://gitorious.org/robclark-gstreamer/gst-openmax/commit/e91b1e643ceac35f04b6649af0532d12219e33d7
 http://gitorious.org/robclark-gstreamer/gst-openmax/commit/e91b1e643ceac35f04b6649af0532d12219e33d7.patch

I'll send the patch email separately to the list (I'm not sure if it will be big enough that you'll have to moderate)

There is one preceding patch to fix some issues building on 64bit host (since I found it easier to build and test on my laptop than on the target board).


BR,
-R



> 
>>> Oh, and I think the default configuration should be in a separate file.
>> 
>> ok, I'll do that..  expect an updated patch, rebased on latest gst-openmax master so you can more easily apply the patch and try it out
> 
> Cool :)
> 
> -- 
> Felipe Contreras





More information about the Gstreamer-openmax mailing list