Skip to content

Provide API for polling Libcamera-apps message queue #900

@matswebjorn

Description

@matswebjorn

I'm using libcamera-apps-v1.7.0 integrated into a multithread application. I therefore can't use RPiApp::Wait() method to wait for camera request to complete as it would lock up my entire application. The solution (so far) is therefore to add a method

bool RPiCamApp::QueueEmpty() { return msg_queue_.QueueEmpty(); }

which I can use to poll Libcamera for request status. Then in RpiCamApp::MessageQueue

bool QueueEmpty()
{
	std::unique_lock<std::mutex> lock(mutex_);
	return queue_.empty();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions