From 84ad104499d9efc0253dae1a60ee070ed375ad95 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 20 Oct 2022 00:44:55 +0300 Subject: Move test applications to src/apps/ The cam and qcam test application share code, currently through a crude hack that references the cam source files directly from the qcam meson.build file. To prepare for the introduction of hosting that code in a static library, move all applications to src/apps/. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/cam/kms_sink.h | 83 ------------------------------------------------------ 1 file changed, 83 deletions(-) delete mode 100644 src/cam/kms_sink.h (limited to 'src/cam/kms_sink.h') diff --git a/src/cam/kms_sink.h b/src/cam/kms_sink.h deleted file mode 100644 index e2c618a1..00000000 --- a/src/cam/kms_sink.h +++ /dev/null @@ -1,83 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (C) 2021, Ideas on Board Oy - * - * kms_sink.h - KMS Sink - */ - -#pragma once - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include "drm.h" -#include "frame_sink.h" - -class KMSSink : public FrameSink -{ -public: - KMSSink(const std::string &connectorName); - - void mapBuffer(libcamera::FrameBuffer *buffer) override; - - int configure(const libcamera::CameraConfiguration &config) override; - int start() override; - int stop() override; - - bool processRequest(libcamera::Request *request) override; - -private: - class Request - { - public: - Request(std::unique_ptr drmRequest, - libcamera::Request *camRequest) - : drmRequest_(std::move(drmRequest)), camRequest_(camRequest) - { - } - - std::unique_ptr drmRequest_; - libcamera::Request *camRequest_; - }; - - int selectPipeline(const libcamera::PixelFormat &format); - int configurePipeline(const libcamera::PixelFormat &format); - bool testModeSet(DRM::FrameBuffer *drmBuffer, - const libcamera::Rectangle &src, - const libcamera::Rectangle &dst); - bool setupComposition(DRM::FrameBuffer *drmBuffer); - - void requestComplete(DRM::AtomicRequest *request); - - DRM::Device dev_; - - const DRM::Connector *connector_; - const DRM::Crtc *crtc_; - const DRM::Plane *plane_; - const DRM::Mode *mode_; - - libcamera::PixelFormat format_; - libcamera::Size size_; - unsigned int stride_; - std::optional colorEncoding_; - std::optional colorRange_; - - libcamera::Rectangle src_; - libcamera::Rectangle dst_; - - std::map> buffers_; - - std::mutex lock_; - std::unique_ptr pending_; - std::unique_ptr queued_; - std::unique_ptr active_; -}; -- cgit v1.2.1