91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

codec編碼傳輸流程是怎么樣的

發布時間:2022-01-07 22:13:53 來源:億速云 閱讀:140 作者:柒染 欄目:移動開發

codec編碼傳輸流程是怎么樣的,很多新手對此不是很清楚,為了幫助大家解決這個難題,下面小編將為大家詳細講解,有這方面需求的人可以來學習下,希望你能有所收獲。

  1.  SurfaceMediaSource::read()鎖控制從IGraphicBufferConsumer處讀取buffer,當graphic產生數據
    Overrun時等待

     while (mStarted && mNumPendingBuffers == mMaxAcquiredBufferCount) {

           mMediaBuffersAvailableCondition.wait(mMutex);

        }

  2. MediaPuller拿到該buffer后
    status_t err = mSource->read(&mbuf);

    notify->setInt32("what", kWhatAccessUnit);

    notify->setBuffer("accessUnit", accessUnit);

    notify->post();


  3. Converter 接收CHECK_EQ(what, MediaPuller::kWhatAccessUnit);

    mInputBufferQueue.push_back(accessUnit);

    feedEncoderInputBuffers();


  4. Converter::feedEncoderInputBuffers() 中拷貝buffer數據到codec的mEncoderInputBuffers
    通過這個while循環來等待拷貝

    while (!mInputBufferQueue.empty()&& !mAvailEncoderInputIndices.empty()){


    memcpy(mEncoderInputBuffers.itemAt(bufferIndex)->data(),

                       buffer->data(),

                       buffer->size());

    status_t err = mEncoder->queueInputBuffer(

                bufferIndex, 0, (buffer == NULL) ? 0 : buffer->size(),

                timeUs, flags);

5. 上面流程傳遞的是主要是共享內存buffer_handle_t,當codec 完成ACodec::BaseState::onOMXEmptyBufferDone后

 // We're in "store-metadata-in-buffers" mode, the underlying

    // OMX component had access to data that's implicitly refcounted

    // by this "MediaBuffer" object. Now that the OMX component has

    // told us that it's done with the input buffer, we can decrement

    // the mediaBuffer's reference count.

    info->mData->setMediaBufferBase(NULL);

    才通知SurfaceMediaSource::signalBufferReturned()讓graphic consumer來真正釋放

     mConsumer->releaseBuffer();

Stack 信息

 #06 pc 000f4583  /system/lib/libstagefright.so (android::SurfaceMediaSource::signalBufferReturned(android::MediaBuffer*)+38) 

 #07 pc 000f45a5  /system/lib/libstagefright.so (non-virtual thunk to android::SurfaceMediaSource::signalBufferReturned(android::MediaBuffer*)+4) 

 #08 pc 0000b011  /system/lib/libstagefright_foundation.so (android::ABuffer::setMediaBufferBase(android::MediaBufferBase*)+16) 

 #09 pc 0008adeb  /system/lib/libstagefright.so (android::ACodec::BaseState::onOMXEmptyBufferDone(unsigned int, int)+78) 

 #10 pc 0008aab5  /system/lib/libstagefright.so (android::ACodec::BaseState::onOMXMessage(android::sp<android::AMessage> const&)+228) 

 #11 pc 0008a731  /system/lib/libstagefright.so (android::ACodec::BaseState::onMessageReceived(android::sp<android::AMessage> const&)+744) 

 #12 pc 0008e779  /system/lib/libstagefright.so (android::ACodec::ExecutingState::onMessageReceived(android::sp<android::AMessage> const&)+508) 

 #13 pc 0000b5a1  /system/lib/libstagefright_foundation.so (android::AHierarchicalStateMachine::handleMessage(android::sp<android::AMessage> const&)+64) 

 #14 pc 0008a917  /system/lib/libstagefright.so (android::ACodec::BaseState::onOMXMessageList(android::sp<android::AMessage> const&)+106) 

 #15 pc 0008a5e7  /system/lib/libstagefright.so (android::ACodec::BaseState::onMessageReceived(android::sp<android::AMessage> const&)+414) 

 #16 pc 0008e779  /system/lib/libstagefright.so (android::ACodec::ExecutingState::onMessageReceived(android::sp<android::AMessage> const&)+508)

看完上述內容是否對您有幫助呢?如果還想對相關知識有進一步的了解或閱讀更多相關文章,請關注億速云行業資訊頻道,感謝您對億速云的支持。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

普兰店市| 阆中市| 和田县| 左权县| 贵溪市| 揭阳市| 大丰市| 景东| 新野县| 庆安县| 金阳县| 南昌县| 辽源市| 海南省| 嘉义市| 闸北区| 三门峡市| 黔南| 翼城县| 松溪县| 蕲春县| 灵台县| 彭水| 阿瓦提县| 敖汉旗| 来安县| 包头市| 高平市| 化隆| 孝义市| 界首市| 通州市| 图们市| 广丰县| 金坛市| 台中市| 邵东县| 德化县| 祁连县| 泉州市| 上思县|