forked from raspberrypi/libcamera
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pipeline: raspberrypi: Read config parameters from a file
Add the ability to read the platform configuration parameters from a config file provided by the user through the LIBCAMERA_RPI_CONFIG_FILE environment variable. Use the PipelineHandler::configurationFile() helper to determine the full path of the file. Provide an example configuration file named example.yaml. Currently two parameters are available through the json file: "min_unicam_buffers" The minimum number of internal Unicam buffers to allocate. "min_total_unicam_buffers" The minimum number of internal + external Unicam buffers that must be allocated. Signed-off-by: Naushir Patuck <[email protected]> Reviewed-by: David Plowman <[email protected]> Signed-off-by: Kieran Bingham <[email protected]>
- Loading branch information
Showing
5 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"version": 1.0, | ||
"target": "bcm2835", | ||
|
||
"pipeline_handler": | ||
{ | ||
# The minimum number of internal buffers to be allocated for | ||
# Unicam. This value must be greater than 0, but less than or | ||
# equal to min_total_unicam_buffers. | ||
# | ||
# A larger number of internal buffers can reduce the occurrence | ||
# of frame drops during high CPU loads, but might also cause | ||
# additional latency in the system. | ||
# | ||
# Note that the pipeline handler might override this value and | ||
# not allocate any internal buffers if it knows they will never | ||
# be used. For example if the RAW stream is marked as mandatory | ||
# and there are no dropped frames signalled for algorithm | ||
# convergence. | ||
# | ||
# "min_unicam_buffers": 2, | ||
|
||
# The minimum total (internal + external) buffer count used for | ||
# Unicam. The number of internal buffers allocated for Unicam is | ||
# given by: | ||
# | ||
# internal buffer count = max(min_unicam_buffers, | ||
# min_total_unicam_buffers - external buffer count) | ||
# | ||
# "min_total_unicam_buffers": 4 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
conf_files = files([ | ||
'example.yaml', | ||
]) | ||
|
||
install_data(conf_files, | ||
install_dir : pipeline_data_dir / 'raspberrypi') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ libcamera_sources += files([ | |
'raspberrypi.cpp', | ||
'rpi_stream.cpp', | ||
]) | ||
|
||
subdir('data') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters