From 470e9646821fea3c7cf8932764f49c6097433484 Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Tue, 23 May 2023 03:08:11 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9fcodc=20UT=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0BufferCallback=E7=9A=84=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghongran --- test/unittest/video_test/fcodec_unit_test.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/unittest/video_test/fcodec_unit_test.cpp b/test/unittest/video_test/fcodec_unit_test.cpp index 2b650fb50..bda44c82f 100644 --- a/test/unittest/video_test/fcodec_unit_test.cpp +++ b/test/unittest/video_test/fcodec_unit_test.cpp @@ -56,10 +56,10 @@ public: explicit BufferCallback(VDecSignal *userData) : userData_(userData) {} virtual ~BufferCallback() = default; VDecSignal *userData_; - virtual void OnError(AVCodecErrorType errorType, int32_t errorCode) override; - virtual void OnOutputFormatChanged(const Format &format) override; - virtual void OnInputBufferAvailable(size_t index) override; - virtual void OnOutputBufferAvailable(size_t index, AVCodecBufferInfo info, AVCodecBufferFlag flag) override; + void OnError(AVCodecErrorType errorType, int32_t errorCode) override; + void OnOutputFormatChanged(const Format &format) override; + void OnInputBufferAvailable(uint32_t index) override; + void OnOutputBufferAvailable(uint32_t index, AVCodecBufferInfo info, AVCodecBufferFlag flag) override; }; void BufferCallback::OnError(AVCodecErrorType errorType, int32_t errorCode) @@ -74,14 +74,14 @@ void BufferCallback::OnOutputFormatChanged(const Format &format) cout << "Format Changed" << endl; } -void BufferCallback::OnInputBufferAvailable(size_t index) +void BufferCallback::OnInputBufferAvailable(uint32_t index) { unique_lock lock(userData_->inMutex_); userData_->inIdxQueue_.push(index); userData_->inCond_.notify_all(); } -void BufferCallback::OnOutputBufferAvailable(size_t index, AVCodecBufferInfo info, AVCodecBufferFlag flag) +void BufferCallback::OnOutputBufferAvailable(uint32_t index, AVCodecBufferInfo info, AVCodecBufferFlag flag) { unique_lock lock(userData_->outMutex_); userData_->outIdxQueue_.push(index); -- Gitee