[libcamera-devel,1/4] utils: rkisp1: Remove frames before starting capture
diff mbox series

Message ID 20220620210658.20288-2-laurent.pinchart@ideasonboard.com
State Accepted
Commit 695304c43f4e468eef24eb23920d148044dc15eb
Headers show
Series
  • utils: rkisp1: Miscellaneous capture script updates
Related show

Commit Message

Laurent Pinchart June 20, 2022, 9:06 p.m. UTC
Delete frames previously captured before starting a new capture, to
avoid mixing old and new frames.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 utils/rkisp1/rkisp1-capture.sh | 1 +
 1 file changed, 1 insertion(+)

Comments

Nicolas Dufresne via libcamera-devel July 15, 2022, 7:19 a.m. UTC | #1
Hi Laurent,

On Tue, Jun 21, 2022 at 12:06:55AM +0300, Laurent Pinchart via libcamera-devel wrote:
> Delete frames previously captured before starting a new capture, to
> avoid mixing old and new frames.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  utils/rkisp1/rkisp1-capture.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh
> index 4d09f5d5f01b..d5ebe5b1d1ba 100755
> --- a/utils/rkisp1/rkisp1-capture.sh
> +++ b/utils/rkisp1/rkisp1-capture.sh
> @@ -88,6 +88,7 @@ capture_frames() {
>  
>  	if [[ $save_file -eq 1 ]]; then
>  		file_op="--file=/tmp/frame-#.bin"
> +		rm -f /tmp/frame-*.bin
>  	fi
>  
>  	yavta -c$frame_count -n5 -I -f $capture_format -s $capture_size \

Patch
diff mbox series

diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh
index 4d09f5d5f01b..d5ebe5b1d1ba 100755
--- a/utils/rkisp1/rkisp1-capture.sh
+++ b/utils/rkisp1/rkisp1-capture.sh
@@ -88,6 +88,7 @@  capture_frames() {
 
 	if [[ $save_file -eq 1 ]]; then
 		file_op="--file=/tmp/frame-#.bin"
+		rm -f /tmp/frame-*.bin
 	fi
 
 	yavta -c$frame_count -n5 -I -f $capture_format -s $capture_size \