components: VideoFramePool uses dedicated thread to fetch GraphicBlock
Originally VideoFramePool shared the same thread with V4L2Decoder. It
turned out the performance is pretty bad, many frames were dropped.
In this CL, VideoFramePool creates a dedicated thread and fetch
GraphicBlock on this thread.
Bug: 146406514
Test: pass e2e test
Change-Id: I3c51cf1ce1d8e40fb52ad947d779e8c0ad2f754c
diff --git a/components/V4L2DecodeComponent.cpp b/components/V4L2DecodeComponent.cpp
index 64cb4ba..4c657e5 100644
--- a/components/V4L2DecodeComponent.cpp
+++ b/components/V4L2DecodeComponent.cpp
@@ -275,8 +275,8 @@
return;
}
- *pool = std::make_unique<VideoFramePool>(std::move(blockPool), size, pixelFormat, mIsSecure,
- mDecoderTaskRunner);
+ *pool = VideoFramePool::Create(std::move(blockPool), size, pixelFormat, mIsSecure,
+ mDecoderTaskRunner);
}
c2_status_t V4L2DecodeComponent::stop() {