Skip to content

Commit

Permalink
core: adding method to access CameraManager
Browse files Browse the repository at this point in the history
Added the ability to get at the CameraManager to allow for access to the Camera list.
Signed-off-by: naushir
  • Loading branch information
Anjo Krank committed Jul 5, 2023
1 parent d932d31 commit 3aaaec2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/libcamera_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,11 @@ libcamera::Stream *LibcameraApp::GetMainStream() const
return nullptr;
}

libcamera::CameraManager *LibcameraApp::GetCameraManager() const
{
return camera_manager_.get();
}

std::vector<libcamera::Span<uint8_t>> LibcameraApp::Mmap(FrameBuffer *buffer) const
{
auto item = mapped_buffers_.find(buffer);
Expand Down
3 changes: 3 additions & 0 deletions core/libcamera_app.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ class LibcameraApp
Stream *LoresStream(StreamInfo *info = nullptr) const;
Stream *GetMainStream() const;

CameraManager *GetCameraManager() const;
std::vector<std::shared_ptr<libcamera::Camera>> GetCameras();

std::vector<libcamera::Span<uint8_t>> Mmap(FrameBuffer *buffer) const;

void ShowPreview(CompletedRequestPtr &completed_request, Stream *stream);
Expand Down

0 comments on commit 3aaaec2

Please sign in to comment.