[Gstreamer-openmax] Support for hardware codecs

Clark, Rob rob at ti.com
Mon Feb 22 18:42:39 PST 2010


On Feb 22, 2010, at 9:37 AM, Felipe Contreras wrote:

> On Mon, Feb 22, 2010 at 5:29 PM, Clark, Rob <rob at ti.com> wrote:
>> That said, I don't mind doing something like a simple ini file syntax or some other similar syntax.  Especially if the preference is to reduce dependency on libxml2.  But if the dependency would be there anyways, might as well reuse it.
> 
> I don't think there's any need for a complicated structure, so XML is
> overkill, specially if some systems don't have libxml2. Moreover I
> would like the file to be human readable; some people might like to
> modify it (for testing purposes or whatever).
> 
> Personally I would write a simpler parser, but if anyone has better
> ideas/patches, I'm open for them.

Ok, attached is a work-in-progress for what I'm thinking.. the basic idea is that the config file is just a list of GstStructure's, so no parser needed, just gst_structure_from_string().  These get stored within a parent GstStructure (so could be cached w/ gst_plugin_{get,set}_cache_data(), although that is not implemented yet.  The config file looks like:

-----8<----------8<-----
omx_mp3dec, library-name=libOMX_Core.so, component-name=OMX.TI.AUDIO.DECODE, component-role=audio_decode.dsp.mp3, rank=256;
omx_aacdec, library-name=libOMX_Core.so, component-name=OMX.TI.AUDIO.DECODE, component-role=audio_decode.dsp.aac, rank=256;
omx_volume, library-name=libomxil-bellagio.so.0, component-name=OMX.st.volume.component, rank=0;
...
----->8---------->8-----

(the component-role field is optional, others are mandatory)

I left for now the library-name/component-name/component-role properties in the base src/filter/sink elements.  But now they are just read-only properties, showing what is configured via the config file.  I think this is useful to see in output of gst-inspect, diagrams generated from .dot files of the pipeline, etc.

Right now I have a small default config, in case no config file is found.. but I could go either way on this, either making it complete or removing it altogether.  Anyone have any preference about whether the config file should just override a complete default table, or whether the config file should be mandatory?

The patch won't apply as-is on the gst-openmax tree from freedesktop.org (in our tree we've added component-role and some other stuff), but I'm just sending it as an RFC.  If people like the idea, I'll rebase it on current master from fd.o (after cleaning up a couple of quick-n-dirty aspects of the patch).

I've pushed the patch here, if this is an easier way for you to review:

 http://gitorious.org/robclark-gstreamer/gst-openmax/commit/4a8e4064c9b698d03ffce735257758cd0b8999f1

and since the patch seems to be too big and caused my original email to bounce, here it the link to the patch:

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


BR,
-R





More information about the Gstreamer-openmax mailing list