summaryrefslogtreecommitdiff
path: root/src/gstreamer/gstlibcamerapool.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-28 02:13:38 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-09-30 22:30:17 +0300
commitdaec83536d2ce5be7e1e39fb1db1d07ff22de369 (patch)
tree2650c0d451650d474440711b69f6d3c88e4f8b62 /src/gstreamer/gstlibcamerapool.h
parent0cd715c4ded3b945e7281421552d185018f96a0c (diff)
utils: rkisp1: gen-csc-table: Add support for inverting the CSC
Add a -i/--invert command line argument to invert the YCbCr encoding and output a YCbCr to RGB matrix. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/gstreamer/gstlibcamerapool.h')
0 files changed, 0 insertions, 0 deletions
opt">*buffer, const std::string &streamName) { std::string filename; size_t pos; int fd, ret = 0; filename = pattern_; pos = filename.find_first_of('#'); if (pos != std::string::npos) { std::stringstream ss; ss << streamName << "-" << std::setw(6) << std::setfill('0') << buffer->sequence(); filename.replace(pos, 1, ss.str()); } fd = open(filename.c_str(), O_CREAT | O_WRONLY | (pos == std::string::npos ? O_APPEND : O_TRUNC), S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH); if (fd == -1) return -errno; for (libcamera::Plane &plane : buffer->planes()) { void *data = plane.mem(); unsigned int length = plane.length(); ret = ::write(fd, data, length); if (ret < 0) { ret = -errno; std::cerr << "write error: " << strerror(-ret) << std::endl; break; } else if (ret != (int)length) { std::cerr << "write error: only " << ret << " bytes written instead of " << length << std::endl; break; } } close(fd); return ret; }