I have a non-ui application (server) that sends pictures using raspistill.
I use the following code:
I want to change the size of the images while the app runs., but when I kill the process and run again the camera fails.
How can I do that ?
I tried to go round the problem by changing the size of the image after it is taken but couldn't find a way to do it - it is a non-ui app.
Solution: I limited the raspistill picture-taking time ("-t", "180000"), when the process ends I can restart with the required size.
I still don't know how to end raspistill process...
I use the following code:
B4X:
sub AppStart...
...
If ProcessIsRunning = False Then
shl.Initialize("shl", "raspistill", Array("-o", "temp.jpg", "-t", "0", _
"-tl", "2000", "-w", "960", "-h", "720", "-q", "75"))
shl.Run(-1)
Else
Log("raspistill is already running.")
End If
...
end sub
Sub ProcessIsRunning As Boolean
shl.Initialize("", "ps", Array("-a"))
Return shl.RunSynchronous(10000).StdOut.Contains("raspistill")
End Sub
I want to change the size of the images while the app runs., but when I kill the process and run again the camera fails.
How can I do that ?
I tried to go round the problem by changing the size of the image after it is taken but couldn't find a way to do it - it is a non-ui app.
Solution: I limited the raspistill picture-taking time ("-t", "180000"), when the process ends I can restart with the required size.
I still don't know how to end raspistill process...
Last edited: