From 419babcd8ef423e787e122044601567fbff3457c Mon Sep 17 00:00:00 2001 From: Benoit Parrot Date: Mon, 29 Oct 2018 12:11:02 -0500 Subject: wbm2m: Add resolution and format to output filename To make it easier to deal with the resulting file, the filename should show the resolution and pixel format used. Signed-off-by: Benoit Parrot --- utils/wbm2m.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/wbm2m.cpp b/utils/wbm2m.cpp index 4a126a8..e08ffb1 100644 --- a/utils/wbm2m.cpp +++ b/utils/wbm2m.cpp @@ -57,8 +57,6 @@ int main(int argc, char** argv) const uint32_t dst_height = 480; auto dst_fmt = PixelFormat::XRGB8888; - const string filename = "wb-out.raw"; - OptionSet optionset = { Option("f|format=", [&](string s) { @@ -78,6 +76,9 @@ int main(int argc, char** argv) exit(-1); } + const string filename = sformat("wb-out-%ux%u_%4.4s.raw", dst_width, dst_height, + PixelFormatToFourCC(dst_fmt).c_str()); + VideoDevice vid("/dev/video10"); Card card; -- cgit v1.2.3