From 28cd8404d60962b4f6bf1cd6dee70cd5dc7b7e13 Mon Sep 17 00:00:00 2001 From: Ram Mohan M Date: Thu, 27 Jul 2017 15:50:47 +0530 Subject: [PATCH] bug fix: handle OMX_EventBufferFlag events OMX_EventBufferFlag event is sent when the component has processed a buffer with its EOS flag set. This event is not sent by soft omx components. Vendor components can send this. From IOMX point of view, this event is not sent for processing bug:64102197 Merged-In: I3a978a885b1e4446f82f2356ae677f70ea6f8150 Change-Id: I3a978a885b1e4446f82f2356ae677f70ea6f8150 --- .../1.0/vts/functional/common/media_hidl_test_common.cpp | 3 --- .../omx/1.0/vts/functional/common/media_hidl_test_common.h | 6 ++++++ .../video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp | 3 --- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp index a890c4f487..863731aa2a 100755 --- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp +++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp @@ -560,9 +560,6 @@ void testEOS(sp omxNode, sp observer, // something unexpected happened EXPECT_TRUE(false); } - } else if (msg.data.eventData.event == OMX_EventBufferFlag) { - // soft omx components donot send this, we will just ignore it - // for now } else { // something unexpected happened EXPECT_TRUE(false); diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.h b/media/omx/1.0/vts/functional/common/media_hidl_test_common.h index 802f4d6075..b3ca92cd06 100644 --- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.h +++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.h @@ -131,6 +131,12 @@ struct CodecObserver : public IOmxObserver { android::hardware::media::omx::V1_0::Message::Type::EVENT) { *msg = *it; msgQueue.erase(it); + // OMX_EventBufferFlag event is sent when the component has + // processed a buffer with its EOS flag set. This event is + // not sent by soft omx components. Vendor components can + // send this. From IOMX point of view, we will ignore this + // event. + if (msg->data.eventData.event == OMX_EventBufferFlag) break; return ::android::hardware::media::omx::V1_0::Status::OK; } else if (it->type == android::hardware::media::omx::V1_0:: Message::Type::FILL_BUFFER_DONE) { diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp index a9c29c736a..16ba745eb1 100644 --- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp +++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp @@ -587,9 +587,6 @@ void portReconfiguration(sp omxNode, sp observer, std::cout << "[ ] Warning ! OMX_EventError/ " "Decode Frame Call might be failed \n"; return; - } else if (msg.data.eventData.event == OMX_EventBufferFlag) { - // soft omx components donot send this, we will just ignore it - // for now } else { // something unexpected happened ASSERT_TRUE(false);