[libcamera-devel] [PATCH 0/2] Qt-based libcamera viewer

Laurent Pinchart laurent.pinchart at ideasonboard.com
Sat Mar 23 08:31:23 CET 2019


Hello,

As part of a recent demo, I faced a need to display the frames generated
by libcamera on the screen. Starting with Niklas' experiments with Qt
and libcamera, I've created the qcam application.

The result is quite simple, supports a single stream, and has very
limited features (the only feature is camera selection, everything else,
including format selection, user-controlled camera start/stop, is not
implemented yet). Still, I believe it can be useful, and may even be
clean enough to merge it in the libcamera tree.

One item worth noting is the integration of the Qt event loop in the
libcamera event dispatcher infrastructure. This component could possibly
be moved to a libcamera-utils library, as it it could be useful to
libcamera users.

Laurent Pinchart (2):
  cam: Separate options valid() and empty()
  qcam: Add Qt-based GUI application

 src/cam/main.cpp                 |   7 +-
 src/cam/options.cpp              |  34 +++--
 src/cam/options.h                |   5 +-
 src/meson.build                  |   1 +
 src/qcam/format_converter.cpp    |  99 ++++++++++++++
 src/qcam/format_converter.h      |  14 ++
 src/qcam/main.cpp                |  75 +++++++++++
 src/qcam/main_window.cpp         | 223 +++++++++++++++++++++++++++++++
 src/qcam/main_window.h           |  54 ++++++++
 src/qcam/meson.build             |  19 +++
 src/qcam/qt_event_dispatcher.cpp | 145 ++++++++++++++++++++
 src/qcam/qt_event_dispatcher.h   |  62 +++++++++
 src/qcam/viewfinder.cpp          |  38 ++++++
 src/qcam/viewfinder.h            |  31 +++++
 14 files changed, 785 insertions(+), 22 deletions(-)
 create mode 100644 src/qcam/format_converter.cpp
 create mode 100644 src/qcam/format_converter.h
 create mode 100644 src/qcam/main.cpp
 create mode 100644 src/qcam/main_window.cpp
 create mode 100644 src/qcam/main_window.h
 create mode 100644 src/qcam/meson.build
 create mode 100644 src/qcam/qt_event_dispatcher.cpp
 create mode 100644 src/qcam/qt_event_dispatcher.h
 create mode 100644 src/qcam/viewfinder.cpp
 create mode 100644 src/qcam/viewfinder.h

-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list