zou_12345的ChinaUnix博客
zou_12345
全部博文(107)
2014年(2)
2013年(13)
2012年(16)
2011年(76)
yuansy
dodba
flw
prolj
梦洋love
华仔desi
yinliudo
清爽之梦
vanjun20
cynthia
qqqno1
yn_xysnz
MEYEGG
丿奔跑的
ydfivy
mjw88122
zhagnzon
noy0623
分类: Java
2011-04-13 17:53:52
OMXClient mClient;AwesomePlayer::AwesomePlayer(){ mClient.connect();}status_t OMXClient::connect(){ mOMX = service->getOMX();}sp<IOMX> MediaPlayerService::getOMX(){ mOMX = new OMX;}OMX::OMX() : mMaster(new OMXMaster)OMXMaster::OMXMaster(){ addPlugin(new OMXPVCodecsPlugin);}OMXPVCodecsPlugin::OMXPVCodecsPlugin(){ OMX_MasterInit();}OMX_ERRORTYPE OMX_MasterInit() <-- under OpenCORE{ return OMX_Init();}
OMXCodec::function_name(){ mOMX->sendCommand(mNode, OMX_CommandStateSet, OMX_StateIdle);}status_t OMX::sendCommand(node, cmd, param){ return findInstance(node)->sendCommand(cmd, param);}status_t OMXNodeInstance::sendCommand(cmd, param){ OMX_SendCommand(mHandle, cmd, param, NULL);}
(3) 其他作用在 OMX 元件的指令其他作用在OMX元件的指令也和OMX_SendCommand的call path一樣,請見下表:
OMXCodec
OMX
OMXNodeInstance
useBuffer
useBuffer (OMX_UseBuffer)
getParameter
getParameter (OMX_GetParameter)
fillBuffer
fillBuffer (OMX_FillThisBuffer)
emptyBuffer
emptyBuffer (OMX_EmptyThisBuffer)
OMX_CALLBACKTYPE OMXNodeInstance::kCallbacks ={ &OnEvent, <--------------- omx_message::EVENT &OnEmptyBufferDone, <----- omx_message::EMPTY_BUFFER_DONE &OnFillBufferDone <------- omx_message::FILL_BUFFER_DONE}
上一篇:stagefright框架(一)Video Playback的流程
下一篇:stagefright框架(三)-選擇Video Decoder
登录 注册