File: static.py

package info (click to toggle)
libcamera 0.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,336 kB
  • sloc: cpp: 83,873; python: 18,076; ansic: 12,651; sh: 1,267; makefile: 60
file content (24 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2024, Ideas on Board
#
# Module implementation for static data

from .module import Module


# This module can be used in cases where the tuning file should contain
# static data.
class StaticModule(Module):
    def __init__(self, out_name: str, output: dict = {}):
        super().__init__()
        self.out_name = out_name
        self.hr_name = f'Static {out_name}'
        self.type = f'static_{out_name}'
        self.output = output

    def validate_config(self, config: dict) -> bool:
        return True

    def process(self, config: dict, images: list, outputs: dict) -> dict:
        return self.output