Skip to content
Snippets Groups Projects
Commit 8e52544f authored by Bartłomiej Grzesik's avatar Bartłomiej Grzesik
Browse files

VideoFramePool: Remove unused methods

This CL removes requestNewBufferSet and setNotifyBlockAvailableCb
methods, that became unused after switch to C2BufferQueueBlockPool and
C2PooledBlockPool.

Bug: 268301611
Bug: 268305422
Bug: 270329448
Bug: 238710012
Bug: 238390060
Bug: 270331759
Bug: 238709912
Test: CtsMediaCodecTestCases
Test: CtsMediaDecoderTestCases
Test: CtsMediaV2TestCases
Test: GtsExoPlayerTestCases com.google.android.exoplayer.gts.CommonEncryptionDrmTest#cencSchemeTypeV*
Change-Id: I6085cb7d5a7118d2b81d1f6d9d533b98fc978fa1
(cherry picked from commit d73cbf57)
parent 9613d2ac
No related branches found
No related tags found
No related merge requests found
...@@ -65,19 +65,6 @@ std::optional<uint32_t> VideoFramePool::getBufferIdFromGraphicBlock(C2BlockPool& ...@@ -65,19 +65,6 @@ std::optional<uint32_t> VideoFramePool::getBufferIdFromGraphicBlock(C2BlockPool&
return std::nullopt; return std::nullopt;
} }
// static
c2_status_t VideoFramePool::requestNewBufferSet(C2BlockPool& blockPool, int32_t bufferCount,
const ui::Size& size, uint32_t format,
C2MemoryUsage usage) {
ALOGE("%s(): unknown allocator ID: %u", __func__, blockPool.getAllocatorId());
return C2_BAD_VALUE;
}
// static
bool VideoFramePool::setNotifyBlockAvailableCb(C2BlockPool& blockPool, ::base::OnceClosure cb) {
return false;
}
// static // static
std::unique_ptr<VideoFramePool> VideoFramePool::Create( std::unique_ptr<VideoFramePool> VideoFramePool::Create(
std::shared_ptr<C2BlockPool> blockPool, const size_t numBuffers, const ui::Size& size, std::shared_ptr<C2BlockPool> blockPool, const size_t numBuffers, const ui::Size& size,
...@@ -94,11 +81,6 @@ std::unique_ptr<VideoFramePool> VideoFramePool::Create( ...@@ -94,11 +81,6 @@ std::unique_ptr<VideoFramePool> VideoFramePool::Create(
} }
const C2MemoryUsage memoryUsage(usage); const C2MemoryUsage memoryUsage(usage);
if (requestNewBufferSet(*blockPool, numBuffers, size, static_cast<uint32_t>(pixelFormat),
memoryUsage) != C2_OK) {
return nullptr;
}
std::unique_ptr<VideoFramePool> pool = std::unique_ptr<VideoFramePool> pool =
::base::WrapUnique(new VideoFramePool(std::move(blockPool), numBuffers, size, ::base::WrapUnique(new VideoFramePool(std::move(blockPool), numBuffers, size,
pixelFormat, memoryUsage, std::move(taskRunner))); pixelFormat, memoryUsage, std::move(taskRunner)));
......
...@@ -63,19 +63,9 @@ private: ...@@ -63,19 +63,9 @@ private:
// Returns true if a buffer shall not be handed to client. // Returns true if a buffer shall not be handed to client.
bool shouldDropBuffer(uint32_t bufferId); bool shouldDropBuffer(uint32_t bufferId);
// Ask |blockPool| to allocate the specified number of buffers.
// |bufferCount| is the number of requested buffers.
static c2_status_t requestNewBufferSet(C2BlockPool& blockPool, int32_t bufferCount,
const ui::Size& size, uint32_t format,
C2MemoryUsage usage);
static std::optional<uint32_t> getBufferIdFromGraphicBlock(C2BlockPool& blockPool, static std::optional<uint32_t> getBufferIdFromGraphicBlock(C2BlockPool& blockPool,
const C2Block2D& block); const C2Block2D& block);
// Ask |blockPool| to notify when a block is available via |cb|.
// Return true if |blockPool| supports notifying buffer available.
static bool setNotifyBlockAvailableCb(C2BlockPool& blockPool, ::base::OnceClosure cb);
std::shared_ptr<C2BlockPool> mBlockPool; std::shared_ptr<C2BlockPool> mBlockPool;
// Holds the number of maximum amount of buffers that VideoFramePool // Holds the number of maximum amount of buffers that VideoFramePool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment