OpenCores学习(4)--接口与NODE

第四章和第五章就是些介绍,只是把关键的语句翻译出来,见谅。

从第六章开始很关键,我也会尽量全部翻译过来。

4.接口

4.1默认接口

      PVPlayer的接口是标准的OSCL-based 接口,引擎的API都是通过这些接口来调用相对应的操作,但是像一些OSCL类型的组件和PVMF类型的组件里需要注意有些不同.

 4.2 适配层

       the interface to PVPlayer SDK needs to be different than the OSCL-based interface, another interface layer needs to be created to “wrap” around the OSCL-based interface. This “wrapper” is referred to as an

 adaptation layer for OSCL-based PVPlayer engine interface.One possible reason to create an adaptation layer would be to encapsulate the OSCL interface with types and components of a particular platform or operating system (e.g. ANSI C interface, Symbian interface).Another reason would be that the adaptation layer modifies the interface and behavior of PVPlayer SDK to match the expectation of the application (e.g. legacy interface). The adaptation layer could also combine PVPlayer SDK with another SDK or component to provide a unified interface to the application.The block diagrams below illustrate how the adaptation layer relates to PVPlayer Engine and its OSCL-based interface. The diagram on the right shows the adaptation layer adding more functionality by including another engine.

OpenCores学习(4)--接口与NODE

                                   图四    适配层

4.3 多线程支持

        默认的OSCL-based 接口不支持多线程,所以在使用多线程的时候,适配层需要提供一个功能来实现.一种方法是使用OSCL proxy 接口组件来提供多线程的支持.另一种方法是添加一个另外的Platform Threading Support.两种方法的框图如下.

4.4  媒体数据输出到数据池

 PVPlayer引擎利用PVMF节点指定数据输出的数据池,但大部份使用的时候,同步数据通过适合的渲染后再送到媒体输出设备.在输出视频流的时候,需 要一个显示设备,音频流需要一个PCM 音频输出设备.媒体输出设备是一个具体的特定平台.输出设备的创建有两个方法可以实现:

 (1)在PVMF节点里封装一个media device,引擎可以直接调用,这种方法可以最大限度的减少PVPlayer和接口层的代码,但是需要创建一个新的PVMF节点.

  (2)直接调用PV media I/O接口,在I/O接口中调用输出设备.这种方法相对于第一种来说并不需要创建新的PVMF节点,复杂性也小.但增加了代码的层次和和代码量.下图是两 种方法的引擎.更多PV I/O接口的信息,参考PV MEDIA I/O datasheet.

   

OpenCores学习(4)--接口与NODE

                          图 6 媒体输出的两种方法

5. PVMF Node

       本节给出PVMF简短的描述节点,由PVPlayer引擎使用。只有PVMF节点OSCL和PVMF 基于组件都包括在内。没有特定于平台PVMF节点覆盖。欲了解更多有关特定节点(1,低于或平台特定一)的详细信息,请参阅该节点文件。

5.1 数据池节点(Data Sink Nodes)

       数据池节点是PVPlayer的引擎中输出数据前最后的数据终点.

5.1.1 PVMFMediaOutputNode

       PVMFMediaOutputNode is a wrapper node around the PV media I/O interface to output data. The node translates node commands and incoming media data to appropriate media I/O actions and handles media I/O events. Using PVMFMediaOutputNode allows encapsulation of platform and device specific output interface with PV media I/O interface.

5.1.2 PVMFFileOutputNode

       PVMFFileOutputNode accesses the file directly using OSCL file I/O to write media data coming in via the port. The node has some capability to understand format type and to write out data appropriately for the specified format type (AMR file header for AMR IETF format).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值