summaryrefslogtreecommitdiff
path: root/src/qcam/assets/feathericons/monitor.svg
blob: 6c3556db2a1489b7c259222d80e9bf96bab9b0c0 (plain)
1
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-monitor"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"></rect><line x1="8" y1="21" x2="16" y2="21"></line><line x1="12" y1="17" x2="12" y2="21"></line></svg>
="hl com">/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * Copyright (C) 2019, Google Inc. * * request.h - Request class private data */ #pragma once #include <chrono> #include <map> #include <memory> #include <libcamera/base/event_notifier.h> #include <libcamera/base/timer.h> #include <libcamera/request.h> using namespace std::chrono_literals; namespace libcamera { class Camera; class FrameBuffer; class Request::Private : public Extensible::Private { LIBCAMERA_DECLARE_PUBLIC(Request) public: Private(Camera *camera); ~Private(); Camera *camera() const { return camera_; } bool hasPendingBuffers() const; bool completeBuffer(FrameBuffer *buffer); void complete(); void cancel(); void reset(); void prepare(std::chrono::milliseconds timeout = 0ms); Signal<> prepared; private: friend class PipelineHandler; friend std::ostream &operator<<(std::ostream &out, const Request &r); void doCancelRequest(); void emitPrepareCompleted(); void notifierActivated(FrameBuffer *buffer); void timeout(); Camera *camera_; bool cancelled_; uint32_t sequence_ = 0; bool prepared_ = false; std::unordered_set<FrameBuffer *> pending_; std::map<FrameBuffer *, std::unique_ptr<EventNotifier>> notifiers_; std::unique_ptr<Timer> timer_; }; } /* namespace libcamera */