diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-10-27 15:57:44 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2021-01-29 15:35:28 +0100 |
commit | 2b57d712a28674eb03ce1e1549b90c7d59eccc6c (patch) | |
tree | a49c56f26b7637ed14cf93eec93390240f43bf99 /src/libcamera/pipeline/rkisp1/timeline.h | |
parent | ea8b576a8ca06b46f3caffb280ca84d952952e53 (diff) |
libcamera: pipeline: rkisp1: Remove Timeline
There are no users left of the Timeline and there is no longer a need to
keep emulating a start of exposure event as the CSI-2 resciver reports
it. Remove the Timeline helper and what's left of it's integration in
the pipeline.
There is no functional change as nothing i the pipeline uses the
Timeline.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rkisp1/timeline.h')
-rw-r--r-- | src/libcamera/pipeline/rkisp1/timeline.h | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/libcamera/pipeline/rkisp1/timeline.h b/src/libcamera/pipeline/rkisp1/timeline.h deleted file mode 100644 index 35a08515..00000000 --- a/src/libcamera/pipeline/rkisp1/timeline.h +++ /dev/null @@ -1,71 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -/* - * Copyright (C) 2019, Google Inc. - * - * timeline.h - Timeline for per-frame controls - */ -#ifndef __LIBCAMERA_TIMELINE_H__ -#define __LIBCAMERA_TIMELINE_H__ - -#include <list> -#include <map> - -#include "libcamera/internal/timer.h" -#include "libcamera/internal/utils.h" - -namespace libcamera { - -class FrameAction -{ -public: - FrameAction(unsigned int frame, unsigned int type) - : frame_(frame), type_(type) {} - - virtual ~FrameAction() = default; - - unsigned int frame() const { return frame_; } - unsigned int type() const { return type_; } - - virtual void run() = 0; - -private: - unsigned int frame_; - unsigned int type_; -}; - -class Timeline -{ -public: - Timeline(); - virtual ~Timeline() = default; - - virtual void reset(); - virtual void scheduleAction(std::unique_ptr<FrameAction> action); - virtual void notifyStartOfExposure(unsigned int frame, utils::time_point time); - - utils::duration frameInterval() const { return frameInterval_; } - -protected: - int frameOffset(unsigned int type) const; - utils::duration timeOffset(unsigned int type) const; - - void setRawDelay(unsigned int type, int frame, utils::duration time); - - std::map<unsigned int, std::pair<int, utils::duration>> delays_; - -private: - static constexpr unsigned int HISTORY_DEPTH = 10; - - void timeout(Timer *timer); - void updateDeadline(); - - std::list<std::pair<unsigned int, utils::time_point>> history_; - std::multimap<utils::time_point, std::unique_ptr<FrameAction>> actions_; - utils::duration frameInterval_; - - Timer timer_; -}; - -} /* namespace libcamera */ - -#endif /* __LIBCAMERA_TIMELINE_H__ */ |