TI OMX 基础入门

来源:互联网 发布:彼氏彼女的故事 知乎 编辑:程序博客网 时间:2024/05/20 03:40

以DM8168平台为例。


本文主要讲如何上手OMX。至于OMX是什么,以及EZSDK和gcc安装配置等问题默认已OK。


在EZSDK安装文件夹下找到OMX的UserGuide文件(具体位置:ti-ezsdk_dm816x-evm_xxxx/component-sources/omx_xxxx/OMX_xxxx_UserGuide.pdf)。


这个UserGuide文件对OMX进行了较为详细的介绍。其第四章讲的是多媒体相关例程(包括:视频解码、编码、解码与显示等例程)。


下面以视频解码例程为例。

该例程源代码位于:ti-ezsdk_dm816x-evm_xxxx/component-sources/omx_xxxx/examples/ti/omx/demos/decode/

入口函数在/src/main.c,程序主体在/src/decode_test.c。


UserGuide文件中对如何使用该例程有如下步骤

1. Building the Application
For Building the app, SDK needs to be installed on linux host machine. To build the examples components must be pre-built. In the top level SDK folder, “make components” would build the components required for examples.“make examples” would create the decode app binary in folder componentsources/omx_05_xx_yy_bb/rebuilt binaries/decode folder.

在EZSDK根目录下 “make components” 这一步没有问题,只是需要编译较长时间,耐心等待。

但是经过测试,在EZSDK根目录下“make examples” 这一步实际上是有问题的,命令无法识别(也有可能是因为我用的EZSDK版本的问题,我用的是ti-ezsdk_dm816x-evm_5_03_01_15版本)。

换成在EZSDK根目录下“make omx”命令,正常通过,在ti-ezsdk_dm816x-evm_xxxx/component-sources/omx_xxxx/bin文件夹下会生成各例程的应用程序,

其中解码程序为/bin/decode/bin/ti816x-evm/decode_a8host_debug.vx5t

将该vx5t文件放于dm8168文件系统中,就可以按照UserGuide文件的Running the application执行解码264文件的功能了。

2. Running the application
For running the application following steps are required ( By default in the init scripts of Linux in /etc/init/rc5.d folder, firmware and module will be getting loaded)
60· Run the application “./decode_a8host_debug.xv5T -i sample.264 -w 1920 -h 1080 -o sample.yuv -c h264”


其他例程也类似,我们就可以一边学习源文件,一边添加修改自己想要的功能慢慢入门和提高了。


0 0
原创粉丝点击