Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/main/java/com/pi4j/catalog/components/Camera.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
import com.pi4j.catalog.components.base.Component;

/**
* FHNW implementation of a camera, works with the raspberry-pi v2 camera module and
* FHNW implementation of a camera, works with the raspberry-pi v2 and v3 camera module and
* the Pi4J-Basic-OS image on the raspberry-pi.
* <p>
* Maybe works on other camera-modules too, but is not yet tested.
* <p>
* It uses the libcamera-still and libcamera-vid bash commands. those are pre-installed
* on all raspbian-versions after Buster.
* It uses the rpicam-still and rpicam-vid bash commands. Those are pre-installed
* on all raspbian-versions from Bookworm on.
*/
public class Camera extends Component {
public static PicConfig.Builder newPictureConfigBuilder(){
Expand Down Expand Up @@ -125,7 +125,7 @@ private void init() {
logDebug("initialisation of camera");

ProcessBuilder processBuilder = new ProcessBuilder();
processBuilder.command("bash", "-c", "libcamera-still");
processBuilder.command("bash", "-c", "rpicam-still");

try {
callBash(processBuilder);
Expand Down Expand Up @@ -254,7 +254,7 @@ private PicConfig(Builder builder) {
* @return a string that can be called from the bash
*/
public String asCommand() {
StringBuilder command = new StringBuilder("libcamera-still");
StringBuilder command = new StringBuilder("rpicam-still");
if (useDate) {
command.append(" -o '").append(outputPath).append(LocalDateTime.now()).append(".").append((encoding != null) ? encoding : "jpg").append("'");
} else {
Expand Down Expand Up @@ -407,7 +407,7 @@ private VidConfig(Builder builder) {
* @return a string that can be called from the bash
*/
public String asCommand() {
StringBuilder command = new StringBuilder("libcamera-vid -t " + recordTime);
StringBuilder command = new StringBuilder("rpicam-vid -t " + recordTime);
if (useDate) {
command.append(" -o '").append(outputPath).append(LocalDateTime.now()).append(".").append((encoding != null) ? encoding : "h264").append("'");
} else {
Expand Down
Loading