[libcamera-devel,v1,1/6] cam: Don't print DNG option text if libtiff isn't found
diff mbox series

Message ID 20221019231537.26880-2-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • apps: Avoid duplicate compilation of common code
Related show

Commit Message

Laurent Pinchart Oct. 19, 2022, 11:15 p.m. UTC
If libtiff isn't found, DNG capture support is disabled. Don't print the
part of the --file help text that mentions DNG in that case.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/cam/main.cpp | 2 ++
 1 file changed, 2 insertions(+)

Comments

Nicolas Dufresne via libcamera-devel Oct. 20, 2022, 6:31 a.m. UTC | #1
On Thu, Oct 20, 2022 at 02:15:32AM +0300, Laurent Pinchart via libcamera-devel wrote:
> If libtiff isn't found, DNG capture support is disabled. Don't print the
> part of the --file help text that mentions DNG in that case.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

> ---
>  src/cam/main.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/cam/main.cpp b/src/cam/main.cpp
> index c4e18a130c02..d70130e2ab81 100644
> --- a/src/cam/main.cpp
> +++ b/src/cam/main.cpp
> @@ -144,8 +144,10 @@ int CamApp::parseOptions(int argc, char *argv[])
>  			 "to write files, using the default file name. Otherwise it sets the\n"
>  			 "full file path and name. The first '#' character in the file name\n"
>  			 "is expanded to the camera index, stream name and frame sequence number.\n"
> +#ifdef HAVE_TIFF
>  			 "If the file name ends with '.dng', then the frame will be written to\n"
>  			 "the output file(s) in DNG format.\n"
> +#endif
>  			 "The default file name is 'frame-#.bin'.",
>  			 "file", ArgumentOptional, "filename", false,
>  			 OptCamera);
Kieran Bingham Oct. 20, 2022, 8:54 a.m. UTC | #2
Quoting Laurent Pinchart via libcamera-devel (2022-10-20 00:15:32)
> If libtiff isn't found, DNG capture support is disabled. Don't print the
> part of the --file help text that mentions DNG in that case.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> ---
>  src/cam/main.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/cam/main.cpp b/src/cam/main.cpp
> index c4e18a130c02..d70130e2ab81 100644
> --- a/src/cam/main.cpp
> +++ b/src/cam/main.cpp
> @@ -144,8 +144,10 @@ int CamApp::parseOptions(int argc, char *argv[])
>                          "to write files, using the default file name. Otherwise it sets the\n"
>                          "full file path and name. The first '#' character in the file name\n"
>                          "is expanded to the camera index, stream name and frame sequence number.\n"
> +#ifdef HAVE_TIFF
>                          "If the file name ends with '.dng', then the frame will be written to\n"
>                          "the output file(s) in DNG format.\n"
> +#endif
>                          "The default file name is 'frame-#.bin'.",
>                          "file", ArgumentOptional, "filename", false,
>                          OptCamera);
> -- 
> Regards,
> 
> Laurent Pinchart
>

Patch
diff mbox series

diff --git a/src/cam/main.cpp b/src/cam/main.cpp
index c4e18a130c02..d70130e2ab81 100644
--- a/src/cam/main.cpp
+++ b/src/cam/main.cpp
@@ -144,8 +144,10 @@  int CamApp::parseOptions(int argc, char *argv[])
 			 "to write files, using the default file name. Otherwise it sets the\n"
 			 "full file path and name. The first '#' character in the file name\n"
 			 "is expanded to the camera index, stream name and frame sequence number.\n"
+#ifdef HAVE_TIFF
 			 "If the file name ends with '.dng', then the frame will be written to\n"
 			 "the output file(s) in DNG format.\n"
+#endif
 			 "The default file name is 'frame-#.bin'.",
 			 "file", ArgumentOptional, "filename", false,
 			 OptCamera);