diff options
Diffstat (limited to 'v4l2++/src')
| -rw-r--r-- | v4l2++/src/helpers.cpp | 2 | ||||
| -rw-r--r-- | v4l2++/src/pixelformats.cpp | 24 | ||||
| -rw-r--r-- | v4l2++/src/videodevice.cpp | 10 |
3 files changed, 17 insertions, 19 deletions
diff --git a/v4l2++/src/helpers.cpp b/v4l2++/src/helpers.cpp index db80408..d24c4f8 100644 --- a/v4l2++/src/helpers.cpp +++ b/v4l2++/src/helpers.cpp @@ -1,6 +1,6 @@ #include <v4l2++/helpers.h> -void __my_throw(const char* file, int line, const char *funcname, const char *cond, fmt::string_view format, fmt::format_args args) +void __my_throw(const char* file, int line, const char* funcname, const char* cond, fmt::string_view format, fmt::format_args args) { std::string str = fmt::vformat(format, args); diff --git a/v4l2++/src/pixelformats.cpp b/v4l2++/src/pixelformats.cpp index b7ecc7b..f892c97 100644 --- a/v4l2++/src/pixelformats.cpp +++ b/v4l2++/src/pixelformats.cpp @@ -270,24 +270,24 @@ static const map<PixelFormat, PixelFormatInfo> format_info_array = { } }, { PixelFormat::SBGGR12, { PixelColorType::RAW, - 1, - { { 16, 1, 1 } }, - } }, + 1, + { { 16, 1, 1 } }, + } }, { PixelFormat::SRGGB12, { PixelColorType::RAW, 1, { { 16, 1, 1 } }, - } }, + } }, { PixelFormat::META_8, { + PixelColorType::RGB, + 1, + { { 8, 1, 1 } }, + } }, + { PixelFormat::META_16, { PixelColorType::RGB, 1, - { { 8, 1, 1 } }, - } }, - { PixelFormat::META_16, { - PixelColorType::RGB, - 1, - { { 16, 1, 1 } }, - } }, + { { 16, 1, 1 } }, + } }, }; PixelFormat DRMFourCCToPixelFormat(const std::string& fourcc) @@ -311,4 +311,4 @@ const struct PixelFormatInfo& get_pixel_format_info(PixelFormat format) return format_info_array.at(format); } -} +} // namespace v4l2 diff --git a/v4l2++/src/videodevice.cpp b/v4l2++/src/videodevice.cpp index c25e9be..909cb1b 100644 --- a/v4l2++/src/videodevice.cpp +++ b/v4l2++/src/videodevice.cpp @@ -551,7 +551,7 @@ std::vector<PixelFormat> VideoStreamer::get_formats() return v4l2_get_formats(m_fd, get_buf_type(m_type)); } -int VideoStreamer::get_format(PixelFormat &fmt, uint32_t &width, uint32_t &height) +int VideoStreamer::get_format(PixelFormat& fmt, uint32_t& width, uint32_t& height) { return v4l2_get_format(m_fd, get_buf_type(m_type), fmt, width, height); } @@ -580,7 +580,7 @@ void VideoStreamer::set_queue_size(uint32_t queue_size, VideoMemoryType mem_type m_fbs.resize(queue_size); } -void VideoStreamer::queue(VideoBuffer &fb) +void VideoStreamer::queue(VideoBuffer& fb) { uint32_t idx; @@ -600,7 +600,7 @@ void VideoStreamer::queue(VideoBuffer &fb) VideoBuffer VideoStreamer::dequeue() { - VideoBuffer fb {}; + VideoBuffer fb{}; fb.m_mem_type = m_mem_type; uint32_t idx = v4l2_dequeue(m_fd, fb, get_buf_type(m_type)); @@ -637,8 +637,6 @@ int VideoStreamer::export_buffer(uint32_t index) return expbuf.fd; } - - MetaStreamer::MetaStreamer(int fd, StreamerType type) : VideoStreamer(fd, type) { @@ -648,7 +646,7 @@ void MetaStreamer::set_format(PixelFormat fmt, uint32_t size) { int r; - v4l2_format v4lfmt {}; + v4l2_format v4lfmt{}; v4lfmt.type = get_buf_type(m_type); //r = ioctl(m_fd, VIDIOC_G_FMT, &v4lfmt); |
