[libcamera-devel,0/2] Qt-based libcamera viewer
mbox series

Message ID 20190323073125.25497-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • Qt-based libcamera viewer
Related show

Message

Laurent Pinchart March 23, 2019, 7:31 a.m. UTC
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

Comments

Kieran Bingham March 26, 2019, 9:14 a.m. UTC | #1
Hi Laurent,

Thank you for this series.

I have been able to test it using an externally attached UVC camera,
though unfortunately I could not use it with my internal UVC webcam as
it only seems to support providing MJPEG content.

We can extend support for different image formats in this later I think
- and I'd rather see a starting point committed as a base to allow this
to be improved upon.

So, not so much of a code review, but more of an:

Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

(And I guess also a Tested-by: Kieran Bingham
<kieran.bingham@ideasonboard.com> too :D)

--
Regards

Kieran


On 23/03/2019 07:31, Laurent Pinchart wrote:
> 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
>