Add V4L2_PIX_FMT_RGB24 pixel format support
This is the format used by the gxp v4l2 driver.
Change-Id: Ia78e39b95f1cdffa2df111d1f1af4cb9c290cc9f
Signed-off-by: charles kearney <charles.kearney@hpe.com>
diff --git a/ikvm_video.cpp b/ikvm_video.cpp
index 734294e..3445715 100644
--- a/ikvm_video.cpp
+++ b/ikvm_video.cpp
@@ -33,7 +33,7 @@
Video::Video(const std::string& p, Input& input, int fr, int sub) :
resizeAfterOpen(false), timingsError(false), fd(-1), frameRate(fr),
lastFrameIndex(-1), height(600), width(800), subSampling(sub), input(input),
- path(p)
+ path(p), pixelformat(V4L2_PIX_FMT_JPEG)
{}
Video::~Video()
@@ -457,6 +457,13 @@
height = fmt.fmt.pix.height;
width = fmt.fmt.pix.width;
+ pixelformat = fmt.fmt.pix.pixelformat;
+
+ if (pixelformat != V4L2_PIX_FMT_RGB24 && pixelformat != V4L2_PIX_FMT_JPEG)
+ {
+ log<level::ERR>("Pixel Format not supported",
+ entry("PIXELFORMAT=%d", pixelformat));
+ }
resize();