Android OMX 02 -- [SoftOMXPlugin.cpp] add new Soft CODEC in stagefright/OMX

来源:互联网 发布:mac远程连接服务器 编辑:程序博客网 时间:2024/06/08 16:49

SoftOMXPlugin.cpp是管理CODEC Plugin的文件。

SoftOMXPlugin::makeComponentInstance 是裏面的主要函數。。。

我們看到的軟解類型,主要是有kComponents數組存儲

kComponents[] = {
....

}

在makeComponentInstance,lib_name會等於“libstagefright_soft_”+ NAME +".so"

完了,dlopen打開動態庫得到libHandle,dlsym打開createSoftOMXComponent函數名。由名字我們可以看出,這是創建一個CODEC

sp<SoftOMXComponent> codec = (*createSoftOMXComponent)(name, callback,...)

最後codec需要自己的一番配置init等。

 

 

 

 

原创粉丝点击