国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
OpenMAX Call Sequences
 

codec集成到PV OpenCORE多媒體框架的方法有幾種:1)作為壓縮多媒體輸入輸出(MIO)組件,2)作為節(jié)點(node),3)作為OpenMAX組件集成到OpenMAX codecs節(jié)點中。許多codecs,特別是包含硬件加速器的codes執(zhí)行OpenMAX IL接口,并且將OpenMAX接口當(dāng)成最簡單的集成方法。

OpenCOREOMX core/component的交互

1) OMX core初始化

PlayerDriver::playerThread()

->OMX_MasterInit() (pv_omxmastercore.cpp)

->_Try_OMX_MasterInit(error, status, data)

->_OMX_MasterInit(data) 執(zhí)行所有的OpenMAX IL Core標(biāo)準(zhǔn)函數(shù)

->OMX_Init()

  OMX_ComponentNameEnum()

  OMX_GetRolesOfComponent()
OMX Core Initialization
 

2)
OMX Component instantiation, capabilities and port indices
After the OMX Core is initialized, the next step is typically to instantiate a specific component and enumerate capabilities and port indices. The PV framework will:
 

l       利用OMX_GetHandle調(diào)用來實例化想要的OMX組件

l       利用OMX_GetParameter調(diào)用來獲取OMX組件的能力和OMX組件上可用端口的數(shù)量

l       遍歷可用的端口以查找輸入端口的索引

l       遍歷可用的端口以查找輸出端口的索引

 

OMX Component Instantiation through OMX_GetHandle

3) OMX component input and output buffer negotiation

Before any data can be exchanged, parameters for input and output buffers need to be negotiated. To accomplish this, the PV framework:

l       調(diào)用OMX_GetParameter來獲取input port buffer參數(shù)

l       核實(verify) input buffer參數(shù)的有效性

l       調(diào)用OMX_SetParameter來設(shè)置input buffer參數(shù)

l       調(diào)用OMX_GetParameter來獲取output port buffer參數(shù)

l       核實(verify) output buffer參數(shù)的有效性

l       調(diào)用OMX_SetParameter來設(shè)置output buffer參數(shù)
 OMX Component Buffer Negotiation
 
4) OMX Transition Loaded->Idel State

The buffer allocation is handled as part of the allocation to the Idle state. During this transition, PV Framework:

l       調(diào)用OMX_SendCommandOMX組件發(fā)送命令以改變組件狀態(tài)(Loaded->Idel)

l       調(diào)用OMX_UseBufferOMX_AllocateBufferOMX組件發(fā)送命令。The call is used NumInputBuffer times for input port, and NumOutputBuffer for output port.

l       等待組件的EventHandler回調(diào)。這個callback通知框架組件的狀態(tài)轉(zhuǎn)換已經(jīng)完成。
 OMX Component state transition from OMX_StateLoaded->OMX_StateIdle
 
5) Transition to “Executing”state and data exchange

The transition to executing starts the active processing of data. In this step, PV Framework:

l       調(diào)用OMX_SendCommandOMX組件發(fā)送命令以改變組件狀態(tài)(Idle->Executing)

l       等待EventHandler callback,組件的狀態(tài)轉(zhuǎn)換已完成

l       調(diào)用OMX_EmptyThisBufferOMX_FillThisBuffer向音頻組件發(fā)送inputoutput buffers。組件利用適當(dāng)?shù)?/span>callback返回buffers。

  OMX component state transition from idle to execute and data exchange

 6) Pausing

A common use-case involves pausing and resuming. In this case, the PV framework:

l       調(diào)用OMX_SendCommandOMX組件發(fā)送命令以改變組件狀態(tài)(Executing->Pause)

l       等待EventHandler callback,組件的狀態(tài)轉(zhuǎn)換已完成

OMX組件發(fā)送pause命令后,PV框架立即停止向OMX組件發(fā)送inpupt/output buffers。

 In order to resume, the PV framework:

l       調(diào)用OMX_SendCommandOMX組件發(fā)送命令以改變組件狀態(tài)(Pause->Executing)

l       等待EventHandler callback,組件的狀態(tài)轉(zhuǎn)換已完成

當(dāng)接到callback組件狀態(tài)轉(zhuǎn)換成Executing后,PV框架可以恢復(fù)向組件發(fā)送OMX input/output buffers。

OMX component state transition from execute to pause and back

 7) Port flush (if applicable)

The port flush call is typically used with a decoder component during repositioning so that any queued data is discarded. In this situation, the PV framework:

l       調(diào)用OMX_SendCommandOMX組件發(fā)送命令flush所有ports。

l       等待兩個來自組件inputoutput portsEventHandler callback,組件已完成ports flushing。

當(dāng)發(fā)送flush命令后,PV框架立刻停止向OMX組件發(fā)送input/output buffers。當(dāng)收到第二個callback后,PV框架可以恢復(fù)向組件發(fā)送input/output buffers。

OMX component port flush procedure

 8) Stop/Transition to “Idle” state

In order to stop processing, the PV framework:

l       調(diào)用OMX_SendCommandOMX組件發(fā)送命令以改變組件的狀態(tài)(Executing/Pause->Idle)

l       等待EventHandler callback,組件的狀態(tài)轉(zhuǎn)換已完成

當(dāng)接收到Idle狀態(tài)轉(zhuǎn)換命令完成的callback時,PV框架認(rèn)為所有的OMX輸入buffers和輸出buffers都已經(jīng)從OMX組件返回。

OMX component state transition from OMX_StateExecuting/Paused->OMX_StateIdle

 9) OMX Component Transition from Idle->Loaded State and De-initialization

當(dāng)結(jié)束與OMX組件的交互后,PV框架將:

l       調(diào)用OMX_SendCommandOMX組件發(fā)送命令以改變組件的狀態(tài)(Idle->Loaded)

l       發(fā)起一系列的OMX_FreeBuffer調(diào)用

l       等待EventHandler callback,組件的狀態(tài)轉(zhuǎn)換已完成

l       OMX Core發(fā)起OMX_FreeHandle調(diào)用以釋放組件的Handle

在發(fā)起狀態(tài)轉(zhuǎn)換命令之前,PV框架需要等待所有的輸入輸出buffersOMX組件返回。

OMX component state transition from OMX_StateIdle->OMX_StateLoaded

 10)   OMX Core De-initialization

PV框架簡單地調(diào)用OMX_Deinit()


 

 

 

 

本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
OpenMAX學(xué)習(xí)--omx_base_filter.c
OpenMax在Android上的實現(xiàn)
Media | Android Developers
stagefright框架
樹莓派raspberry pi3硬件解碼H264 GPU OMX
opencore and stagefright
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服