码迷,mamicode.com
首页 > Windows程序 > 详细

使用 Codec Engine 的 API 函数

时间:2015-01-02 09:48:44      阅读:270      评论:0      收藏:0      [点我收藏+]

标签:嵌入式开发   codec engine   arm   dsp   linux   

本文翻译自TI的手册,该手册是学习GPP+DSP开发的金典文档,希望对各位入门有所帮助,有理解不当之处望请赐教。
Codec Engine Application Developer User‘s Guide.pdf (Literature Number: SPRUE67D)
《Codec Engine 应用开发使用手册》           http://blog.csdn.net/dyzok88/article/details/42154487
《第一章 Codec Engine 概要》                http://blog.csdn.net/dyzok88/article/details/42214813
《第二章 Codec Engine 安装和设置》          http://blog.csdn.net/dyzok88/article/details/42278109
《第三章 使用 Codec Engine 的示例应用程序》 http://blog.csdn.net/dyzok88/article/details/42302793


// 正文


Chapter 4 Using the Codec Engine APIs

第4章 使用 Codec Engine 的API

 

This chapter describes how to use the Codec Engine APIs in an application.
4.1 Overview
4.5 What Happens to DSP Memory Issues?
4.6 What Happens to DSP Real-Time Issues?
4.7 What About Codec Engine Debugging?
4.8 What About Software Trace?
4.2 The Core Engine APIs
4.3 The VISA Classes: Video, Image, Speech, Audio
4.4 The Server APIs

本章介绍了如何在应用程序中使用 Codec Engine 的 API 函数。
4.1 综述
4.2 核心引擎的 API 函数
4.3 VISA 类: 视频,图像,语音,音频
4.4 Codec 服务器 API 函数
4.5 会发生什么 DSP 内存问题?
4.6 会发生什么 DSP 实时的问题?
4.6 怎么样调试 Codec Engine?
4.7 怎么样使用软件跟踪?

 

4.1 Overview

4.1 综述 

The Codec Engine has Core Engine APIs and VISA APIs. The following table shows the Core Engine API modules:

Codec Engine 包含核心引擎 API 函数和 VISA 函数。下表显示了核心引擎 API 模块:

Table 4–1 Codec Engine Modules

技术分享

In addition to modules that perform setup and teardown activities, a memory abstraction module provides support for applications that use Codec Engine in a GPP+DSP system.

除了执行安装和卸载的活动模块,内存抽象模块为在 GPP+DSP 系统中使用 Codec Engine 的应用程序提供支持。


The following table shows the VISA API modules:

下表显示了 VISA  API 模块:

Table 4–2 Codec Engine Modules

技术分享

The VISA interfaces provided with CE 1.20 include support for both the xDM 0.9 and xDM 1.0 interfaces. The "x" suffixes in Table 4–2 represent a version of the interface. In xDM 0.9, the suffix was omitted; in xDM 1.0, it is "1".

VISA接口提供包括 xDM 0.9/xDM 1.0 接口支持的CE 1.20。表4-2中的 "x" 后缀代表一个接口的版本号。在 xDM 0.9 中,后缀被省略;在 xDM 1.0 中,后缀是"1"。

Copy codecs complying with the xDM 1.0 interfaces are provided with the xDAIS 5.21 product. CE 1.20 utilizes those codecs in some of its examples. For example, the video1_copy example utilizes the VIDENC1 and VIDDEC1 VISA interfaces to communicate with those copy codecs.

拷贝的符合 xDM 1.0 接口的编解码器是 xDAIS 5.21 的产物。CE 1.20 在它的一些示例中利用这些编解码器,例如,video1_copy示例利用 VIDENC1 和 VIDDEC1 VISA 接口与拷贝的编解码器进行通信。

The package name corresponds to the path your application must use to reference the header file it includes to use a particular module. For example, the speech encoder module, SPHENCx, has a package name of ti.sdo.ce.speech(x). The #include statement for this module is (where x is a version-based suffix):

#include <ti/sdo/ce/speechx/sphencx.h>

该软件包名称对应于您的应用程序必须引用的,包含特定模块的头文件的路径。例如,语音编码器模块,SPHENCx,有一个ti.sdo.ce.speech(x) 包的名称。此模块中的 #include 语句(其中x是一个基于版本的后缀)是:

#include <ti/sdo/ce/speechx/sphencx.h>

Your application uses the Engine module to open and close instances of the Codec Engine. You can also use this module to get information about memory use and CPU loading. See Section 4.2, The Core Engine APIs.

您的应用程序使用引擎模块来打开和关闭 Codec Engine 实例。您也可以使用这个模块来获取有关内存使用和CPU负载的信息,参见4.2节,核心引擎的 API 函数。

Once your application has opened an instance of the Codec Engine, you use the modules in the VISA packages (for example, VIDENC for video encoding) to create instances of various algorithms. Using the handle for the algorithm instance you create, you then use the same module to run or otherwise control the algorithm. See Section 4.3, The VISA Classes: Video, Image, Speech, Audio.

一旦你的应用程序打开了 Codec Engine 的一个实例,您使用的 VISA 软件包模块(例如,视频编码 VIDENC)就会创建各种算法的实例。为你创建的算法实例使用句柄( handle ),然后使用相同的模块运行或以其他方式控制算法。参见4.3节,VISA 类: 视频,图像,语音,音频。

Reference documentation for the Codec Engine APIs is installed with the Codec Engine software at CE_INSTALL_DIR/docs/html. This chapter provides an overview of the APIs and how you use them. For details about the calling syntax, see the reference documentation.

参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。本章提供 API 函数的概述,以及如何使用它们。有关调用语法的详细信息,请参阅参考该文档。

 

4.2 The Core Engine APIs

4.2 核心引擎的 API 函数 

The Codec Engine has a "core" module called "Engine". Your application uses this module to open and close Engine instances. Multi-threaded applications must either serialize access to a shared Engine instance or create a separate Engine instance for each thread.

Codec Engine 有一个“核心”模块称为"Engine"。您的应用程序使用此模块来打开和关闭引擎实例。多线程应用程序必须要么连续访问一个共享引擎实例,要么为每个线程创建一个单独的引擎实例。

Once your application has opened an instance of the Codec Engine, you use the modules in the VISA packages (for example, VIDENC for video encoding) to create instances of various algorithms. Using the handle for the algorithm instance you create, you then use the same module to run or otherwise control the algorithm. See Section 4.3, The VISA Classes: Video, Image, Speech, Audio.

一旦你的应用程序打开了 Codec Engine 的一个实例,您使用的 VISA 软件包模块(例如,视频编码 VIDENC)就会创建各种算法的实例。为你创建的算法实例使用句柄( handle ),然后使用相同的模块运行或以其他方式控制算法。参见4.3节,VISA 类: 视频,图像,语音,音频。

 

Reference documentation for the Codec Engine APIs is installed with the Codec Engine software at CE_INSTALL_DIR/docs/html. This chapter provides an overview of the APIs and how you use them. For details about the calling syntax, see the reference documentation.

参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。本章提供 API 函数的概述,以及如何使用它们。有关调用语法的详细信息,请参阅参考该文档。

 

4.2 The Core Engine APIs

4.2 核心引擎的 API 函数

 

The Codec Engine has a "core" module called "Engine". Your application uses this module to open and close Engine instances. Multi-threaded applications must either serialize access to a shared Engine instance or create a separate Engine instance for each thread.

Codec Engine 有一个“核心”模块称为"Engine"。您的应用程序使用此模块来打开和关闭引擎实例。多线程应用程序必须要么连续访问一个共享引擎实例,要么为每个线程创建一个单独的引擎实例。

 

Reference documentation for the Codec Engine APIs is installed with the Codec Engine software at CE_INSTALL_DIR/docs/html. This chapter provides an overview of the APIs and how you use them. For details about the calling syntax, see the reference documentation.

参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。本章提供 API 函数的概述,以及如何使用它们。有关调用语法的详细信息,请参阅参考该文档。

 

4.2 The Core Engine APIs

4.2 核心引擎的 API 函数

 

The Codec Engine has a "core" module called "Engine". Your application uses this module to open and close Engine instances. Multi-threaded applications must either serialize access to a shared Engine instance or create a separate Engine instance for each thread.

Codec Engine 有一个“核心”模块称为"Engine"。您的应用程序使用此模块来打开和关闭引擎实例。多线程应用程序必须要么连续访问一个共享引擎实例,要么为每个线程创建一个单独的引擎实例。


:注意引擎句柄( handles )不是线程保护。使用一个引擎实例的每个线程应该执行自己的 Engine_open() 函数调用,并使用自己的引擎句柄。这样在多线程环境中,保护了每个引擎实例被其他线程访问。

 

You can also use the Engine module to get information about memory use and CPU loading.

您也可以使用引擎模块,以获取有关内存使用和CPU负载的信息。

 

The APIs for the Engine module are:



打开一个引擎后,您将使用4.3节中描述的VISA API 创建算法实例。


参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。有关调用语法的详细信息,请参阅参考该文档。


Note: Be aware that Engine handles are not thread-protected. Each thread that uses an Engine instance should perform its own Engine_open() call and use its own Engine handle. This protects each Engine instance from access by other threads in a multi-threaded environment.
? Engine_open(). Open an Engine. 
? Engine_close(). Close an Engine. 
? Engine_getCpuLoad(). Get Server‘s CPU usage in percent.
? Engine_getLastError(). Get the error code of the last failed operation.
? Engine_getUsedMem(). Get Engine memory usage.
? Engine_getNumAlgs(). Get the number of algorithms in an Engine.
? Engine_getAlgInfo(). Get information about an algorithm.


Note: Be aware that Engine handles are not thread-protected. Each thread that uses an Engine instance should perform its own Engine_open() call and use its own Engine handle. This protects each Engine instance from access by other threads in a multi-threaded environment.
? Engine_open(). Open an Engine. 
? Engine_close(). Close an Engine. 
? Engine_getCpuLoad(). Get Server‘s CPU usage in percent.
? Engine_getLastError(). Get the error code of the last failed operation.
? Engine_getUsedMem(). Get Engine memory usage.
? Engine_getNumAlgs(). Get the number of algorithms in an Engine.
? Engine_getAlgInfo(). Get information about an algorithm.

Reference documentation for the Codec Engine APIs is installed with the Codec Engine software at CE_INSTALL_DIR/docs/html. This chapter provides an overview of the APIs and how you use them. For details about the calling syntax, see the reference documentation.

参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。本章提供 API 函数的概述,以及如何使用它们。有关调用语法的详细信息,请参阅参考该文档。

 

4.2 The Core Engine APIs

4.2 核心引擎的 API 函数

 

The Codec Engine has a "core" module called "Engine". Your application uses this module to open and close Engine instances. Multi-threaded applications must either serialize access to a shared Engine instance or create a separate Engine instance for each thread.

Codec Engine 有一个“核心”模块称为"Engine"。您的应用程序使用此模块来打开和关闭引擎实例。多线程应用程序必须要么连续访问一个共享引擎实例,要么为每个线程创建一个单独的引擎实例。


:注意引擎句柄( handles )不是线程保护。使用一个引擎实例的每个线程应该执行自己的 Engine_open() 函数调用,并使用自己的引擎句柄。这样在多线程环境中,保护了每个引擎实例被其他线程访问。

 

You can also use the Engine module to get information about memory use and CPU loading.

您也可以使用引擎模块,以获取有关内存使用和CPU负载的信息。

 

The APIs for the Engine module are:



打开一个引擎后,您将使用4.3节中描述的VISA API 创建算法实例。


参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。有关调用语法的详细信息,请参阅参考该文档。




Note: Be aware that Engine handles are not thread-protected. Each thread that uses an Engine instance should perform its own Engine_open() call and use its own Engine handle. This protects each Engine instance from access by other threads in a multi-threaded environment.
? Engine_open(). Open an Engine. 
? Engine_close(). Close an Engine. 
? Engine_getCpuLoad(). Get Server‘s CPU usage in percent.
? Engine_getLastError(). Get the error code of the last failed operation.
? Engine_getUsedMem(). Get Engine memory usage.
? Engine_getNumAlgs(). Get the number of algorithms in an Engine.
? Engine_getAlgInfo(). Get information about an algorithm.

 

Reference documentation for the Codec Engine APIs is installed with the Codec Engine software at CE_INSTALL_DIR/docs/html. This chapter provides an overview of the APIs and how you use them. For details about the calling syntax, see the reference documentation.

参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。本章提供 API 函数的概述,以及如何使用它们。有关调用语法的详细信息,请参阅参考该文档。

 

4.2 The Core Engine APIs

4.2 核心引擎的 API 函数

 

The Codec Engine has a "core" module called "Engine". Your application uses this module to open and close Engine instances. Multi-threaded applications must either serialize access to a shared Engine instance or create a separate Engine instance for each thread.

Codec Engine 有一个“核心”模块称为"Engine"。您的应用程序使用此模块来打开和关闭引擎实例。多线程应用程序必须要么连续访问一个共享引擎实例,要么为每个线程创建一个单独的引擎实例。


:注意引擎句柄( handles )不是线程保护。使用一个引擎实例的每个线程应该执行自己的 Engine_open() 函数调用,并使用自己的引擎句柄。这样在多线程环境中,保护了每个引擎实例被其他线程访问。

 

You can also use the Engine module to get information about memory use and CPU loading.

您也可以使用引擎模块,以获取有关内存使用和CPU负载的信息。

 

The APIs for the Engine module are:



打开一个引擎后,您将使用4.3节中描述的VISA API 创建算法实例。


参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。有关调用语法的详细信息,请参阅参考该文档。


这些 API 的引擎模块有:

1. Engine_open(). 打开一个引擎。

2. Engine_close(). 关闭一个引擎。

3. Engine_getCpuLoad(). 获取服务器的CPU使用率百分比。

4. Engine_getLastError(). 获得最后失败操作的错误代码。

5. Engine_getUsedMem(). 获取引擎内存使用情况。

6. Engine_getNumAlgs(). 获得在一个引擎中的算法数量。

7. Engine_getAlgInfo(). 获取有关算法的信息。


:注意引擎句柄( handles )不是线程保护。使用一个引擎实例的每个线程应该执行自己的 Engine_open() 函数调用,并使用自己的引擎句柄。这样在多线程环境中,保护了每个引擎实例被其他线程访问。

 

You can also use the Engine module to get information about memory use and CPU loading.

您也可以使用引擎模块,以获取有关内存使用和CPU负载的信息。

 

The APIs for the Engine module are:



打开一个引擎后,您将使用4.3节中描述的VISA API 创建算法实例。


参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。有关调用语法的详细信息,请参阅参考该文档。


Note: Be aware that Engine handles are not thread-protected. Each thread that uses an Engine instance should perform its own Engine_open() call and use its own Engine handle. This protects each Engine instance from access by other threads in a multi-threaded environment.
? Engine_open(). Open an Engine. 
? Engine_close(). Close an Engine. 
? Engine_getCpuLoad(). Get Server‘s CPU usage in percent.
? Engine_getLastError(). Get the error code of the last failed operation.
? Engine_getUsedMem(). Get Engine memory usage.
? Engine_getNumAlgs(). Get the number of algorithms in an Engine.
? Engine_getAlgInfo(). Get information about an algorithm.

这些 API 的引擎模块有:

1. Engine_open(). 打开一个引擎。

2. Engine_close(). 关闭一个引擎。

3. Engine_getCpuLoad(). 获取服务器的CPU使用率百分比。

4. Engine_getLastError(). 获得最后失败操作的错误代码。

5. Engine_getUsedMem(). 获取引擎内存使用情况。

6. Engine_getNumAlgs(). 获得在一个引擎中的算法数量。

7. Engine_getAlgInfo(). 获取有关算法的信息。


:注意引擎句柄( handles )不是线程保护。使用一个引擎实例的每个线程应该执行自己的 Engine_open() 函数调用,并使用自己的引擎句柄。这样在多线程环境中,保护了每个引擎实例被其他线程访问。

 

You can also use the Engine module to get information about memory use and CPU loading.

您也可以使用引擎模块,以获取有关内存使用和CPU负载的信息。

 

The APIs for the Engine module are:



打开一个引擎后,您将使用4.3节中描述的VISA API 创建算法实例。


参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。有关调用语法的详细信息,请参阅参考该文档。




After opening an Engine, you create algorithm instances using the VISA APIs described in Section 4.3.
Reference documentation for the Codec Engine APIs is installed with the Codec Engine software at CE_INSTALL_DIR/docs/html. For details about the calling syntax, see the reference documentation.




 

Copy codecs complying with the xDM 1.0 interfaces are provided with the xDAIS 5.21 product. CE 1.20 utilizes those codecs in some of its examples. For example, the video1_copy example utilizes the VIDENC1 and VIDDEC1 VISA interfaces to communicate with those copy codecs.

拷贝的符合 xDM 1.0 接口的编解码器是 xDAIS 5.21 的产物。CE 1.20 在它的一些示例中利用这些编解码器,例如,video1_copy示例利用 VIDENC1 和 VIDDEC1 VISA 接口与拷贝的编解码器进行通信。

 

The package name corresponds to the path your application must use to reference the header file it includes to use a particular module. For example, the speech encoder module, SPHENCx, has a package name of ti.sdo.ce.speech(x). The #include statement for this module is (where x is a version-based suffix):

 #include <ti/sdo/ce/speechx/sphencx.h>

该软件包名称对应于您的应用程序必须引用的,包含特定模块的头文件的路径。例如,语音编码器模块,SPHENCx,有一个ti.sdo.ce.speech(x) 包的名称。此模块中的 #include 语句(其中x是一个基于版本的后缀)是:

#include <ti/sdo/ce/speechx/sphencx.h>

 


 

Once your application has opened an instance of the Codec Engine, you use the modules in the VISA packages (for example, VIDENC for video encoding) to create instances of various algorithms. Using the handle for the algorithm instance you create, you then use the same module to run or otherwise control the algorithm. See Section 4.3, The VISA Classes: Video, Image, Speech, Audio.

一旦你的应用程序打开了 Codec Engine 的一个实例,您使用的 VISA 软件包模块(例如,视频编码 VIDENC)就会创建各种算法的实例。为你创建的算法实例使用句柄( handle ),然后使用相同的模块运行或以其他方式控制算法。参见4.3节,VISA 类: 视频,图像,语音,音频。

 

Reference documentation for the Codec Engine APIs is installed with the Codec Engine software at CE_INSTALL_DIR/docs/html. This chapter provides an overview of the APIs and how you use them. For details about the calling syntax, see the reference documentation.

参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。本章提供 API 函数的概述,以及如何使用它们。有关调用语法的详细信息,请参阅参考该文档。

 

4.2 The Core Engine APIs

4.2 核心引擎的 API 函数

 

The Codec Engine has a "core" module called "Engine". Your application uses this module to open and close Engine instances. Multi-threaded applications must either serialize access to a shared Engine instance or create a separate Engine instance for each thread.

Codec Engine 有一个“核心”模块称为"Engine"。您的应用程序使用此模块来打开和关闭引擎实例。多线程应用程序必须要么连续访问一个共享引擎实例,要么为每个线程创建一个单独的引擎实例。


:注意引擎句柄( handles )不是线程保护。使用一个引擎实例的每个线程应该执行自己的 Engine_open() 函数调用,并使用自己的引擎句柄。这样在多线程环境中,保护了每个引擎实例被其他线程访问。

 

You can also use the Engine module to get information about memory use and CPU loading.

您也可以使用引擎模块,以获取有关内存使用和CPU负载的信息。

 

The APIs for the Engine module are:



打开一个引擎后,您将使用4.3节中描述的VISA API 创建算法实例。


参考 CE_INSTALL_DIR/docs/html 中的软件文档可以了解 Codec Engine API 函数,该文档是安装 Codec Engine 软件时产生的。有关调用语法的详细信息,请参阅参考该文档。

Note: Be aware that Engine handles are not thread-protected. Each thread that uses an Engine instance should perform its own Engine_open() call and use its own Engine handle. This protects each Engine instance from access by other threads in a multi-threaded environment.
? Engine_open(). Open an Engine. 
? Engine_close(). Close an Engine. 
? Engine_getCpuLoad(). Get Server‘s CPU usage in percent.
? Engine_getLastError(). Get the error code of the last failed operation.
? Engine_getUsedMem(). Get Engine memory usage.
? Engine_getNumAlgs(). Get the number of algorithms in an Engine.
? Engine_getAlgInfo(). Get information about an algorithm.

使用 Codec Engine 的 API 函数

标签:嵌入式开发   codec engine   arm   dsp   linux   

原文地址:http://blog.csdn.net/dyzok88/article/details/42323123

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!