summaryrefslogtreecommitdiff
path: root/utils/tuning/libtuning/modules/ccm/ccm.py
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2024-10-08 17:29:40 +0200
committerStefan Klug <stefan.klug@ideasonboard.com>2024-11-13 11:47:06 +0100
commitd0e30e0ffcc4dbe11b57f0b0a9feae88637d9a2a (patch)
tree1c9f0521da3a1e01783541ba96252bb71768010a /utils/tuning/libtuning/modules/ccm/ccm.py
parentaf0ca816b802166b625fa3bc1ec2499d1a8358ba (diff)
libcamera: Add a DebugMetadata helper
Debug metadata often occurs in places where the metadata control list is not available e.g. in queueRequest() or processStatsBuffer() or even in a class far away from the metadata handling code. It is therefore difficult to add debug metadata without adding lots of boilerplate code. This can be mitigated by recording the metadata and forwarding it to the metadata control list when it becomes available. To solve the issue of code that is far away from the metadata context, add a chaining mechanism to allow loose coupling at runtime. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'utils/tuning/libtuning/modules/ccm/ccm.py')
0 files changed, 0 insertions, 0 deletions
lass="hl opt">) { } ~TestObject() { /* Count the deletions from the correct thread. */ if (thread() == Thread::current()) (*deleteCount_)++; } unsigned int *deleteCount_; }; class NewThread : public Thread { public: NewThread(Object *obj) : object_(obj) { } protected: void run() { object_->deleteLater(); } private: Object *object_; }; class ObjectDeleteTest : public Test { protected: int run() { /* * Test that deferred deletion is executed from the object's * thread, not the caller's thread. */ unsigned int count = 0; TestObject *obj = new TestObject(&count); NewThread thread(obj); thread.start(); thread.wait(); Thread::current()->dispatchMessages(Message::Type::DeferredDelete); if (count != 1) { cout << "Failed to dispatch DeferredDelete (" << count << ")" << endl; return TestFail; } /* * Test that multiple calls to deleteLater() delete the object * once only. */ count = 0; obj = new TestObject(&count); obj->deleteLater(); obj->deleteLater(); Thread::current()->dispatchMessages(Message::Type::DeferredDelete); if (count != 1) { cout << "Multiple deleteLater() failed (" << count << ")" << endl; return TestFail; } return TestPass; } }; TEST_REGISTER(ObjectDeleteTest)