Android10之Video MediaCodec硬解码流程(二十七)

MeidaCodec硬解码视频流程
1.framework/av/media/libstagefright/ACodec.cpp
<1>.ACodec::ACodec(){

     ACodec *mCodec;
    
    mUninitializedState = new UninitializedState(this);//这里this就是(ACodec *codec)传进来的mCodec句柄
    mLoadedState = new LoadedState(this);
    mLoadedToIdleState = new LoadedToIdleState(this);
    mIdleToExecutingState = new IdleToExecutingState(this);
    mExecutingState = new ExecutingState(this);
    mOutputPortSettingsChangedState = new OutputPortSettingsChangedState(this);

    mExecutingToIdleState = new ExecutingToIdleState(this);
    mIdleToLoadedState = new IdleToLoadedState(this);
    mFlushingState = new FlushingState(this);
    mVideoPoewerHint = new VideoPowerHintInstance(mIsWFDRunning);
    
    changeState(mUninitializedState);
}

<2>.bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) {
    sp<CodecObserver> observer = new CodecObser

猜你喜欢

转载自blog.csdn.net/u010164190/article/details/126040831