Fork of https://gitlab.com/megapixels-org/Megapixels
Martijn Braam a84e2c797c Update for new libmegapixels_find_config signature | 5 月之前 | |
---|---|---|
config | 1 年之前 | |
data | 5 月之前 | |
src | 5 月之前 | |
tools | 1 年之前 | |
.clang-format | 3 年之前 | |
.editorconfig | 4 年之前 | |
.gitignore | 4 年之前 | |
.gitlab-ci.yml | 7 月之前 | |
CMakeLists.txt | 5 月之前 | |
LICENSE | 4 年之前 | |
README.md | 7 月之前 | |
clang-format.sh | 2 年之前 | |
medianame.h | 7 月之前 | |
meson.build | 5 月之前 | |
meson_options.txt | 4 年之前 | |
movie.sh.in | 7 月之前 | |
movie_audio_rec.c | 7 月之前 | |
mpegize.py | 7 月之前 |
A GTK4 camera application that knows how to deal with the media request api. It uses opengl to debayer the raw sensor data for the preview.
Chat: #megapixels:brixit.nl on Matrix
Before building this, build and install libmegapixels, libdng and postprocessd.
$ meson build
$ cd build
$ ninja
$ sudo ninja install
$ sudo glib-compile-schemas /usr/local/share/glib-2.0/schemas
Megapixels only captures raw frames and stores .dng files. It captures a 5 frame burst and saves it to a temporary location. Then the postprocessing script is run which will generate the final .jpg file and writes it into the pictures directory. Megapixels looks for the post processing script in the following locations:
./postprocess.sh
$XDG_CONFIG_DIR/megapixels/postprocess.sh
~/.config/megapixels/postprocess.sh
/etc/megapixels/postprocess.sh
/usr/share/megapixels/postprocess.sh
The bundled postprocess.sh
script will copy the first frame of the burst into the picture directory as an DNG
file. If dcraw and imagemagick are installed it will generate a JPG and also write that to the picture
directory. It supports either the full dcraw
or dcraw_emu
from libraw.
It is possible to write your own post processing pipeline by providing your own postprocess.sh
script at
one of the above locations. The first argument to the script is the directory containing the temporary
burst files and the second argument is the final path for the image without an extension. For more details
see postprocess.sh
in this repository.
Megapixels is developed at: https://gitlab.com/megapixels-org/megapixels
camera_config.c
describes how cameras are configured. Contains no state.main.c
contains the entry point and UI portion of the application.quickpreview.c
implements fast preview functionality, including debayering, color correction, rotation, etc.io_pipeline.c
implements all IO interaction with V4L2 devices in a separate thread to prevent blocking.process_pipeline.c
implements all process done on captured images, including launching post-processing.pipeline.c
Generic threaded message passing implementation based on glib, used to implement the pipelines.camera.c
V4L2 abstraction layer to make working with cameras easier.device.c
V4L2 abstraction layer for devices.The primary image pipeline consists of the main application, the IO pipeline and the process pipeline. The main application sends commands to the IO pipeline, which in turn talks to the process pipeline, which then talks to the main application. This way neither IO nor processing blocks the main application and races are generally avoided.
Tests are located in tests/
.