summaryrefslogtreecommitdiff
path: root/test/v4l2_videodevice
AgeCommit message (Expand)Author
2020-11-15libcamera: Move EventDispatcher to internal APILaurent Pinchart
2020-10-21test: v4l2_videodevice: Prevent variable shadowing of formatKieran Bingham
2020-10-20test: Omit extra semicolonsHirokazu Honda
2020-06-18test: Replace explicit DRM FourCCs with libcamera formatsLaurent Pinchart
2020-05-16libcamera: Move internal headers to include/libcamera/internal/Laurent Pinchart
2020-05-13licenses: License all meson files under CC0-1.0Laurent Pinchart
2020-04-28libcamera: v4l2_device: Simplify usage of getControls()Laurent Pinchart
2020-03-27libcamera: v4l2PixelFormat: Replace hex with fourCCKaaira Gupta
2020-03-23test: v4l2_videodevice: Test U8 array controlsJacopo Mondi
2020-03-20libcamera: controls: Rename ControlRange to ControlInfoLaurent Pinchart
2020-03-20libcamera: controls: Name all ControlInfoMap instance variables infoMapLaurent Pinchart
2020-03-19libcamera: v4l2_videodevice: Make V4L2PixelFormat constructor explicitLaurent Pinchart
2020-03-18libcamera: v4l2_videodevice: Rename exportBuffers() to allocateBuffers()Laurent Pinchart
2020-03-18libcamera: PixelFormat: Make constructor explicitLaurent Pinchart
2020-03-18test: v4l2_videodevice: buffer_cache: Use DRM pixel formatNiklas Söderlund
2020-03-06test: v4l2_videodevice: Add test for V4L2BufferCacheNiklas Söderlund
2020-01-12libcamera: v4l2_videodevice: Remove Buffer interfaceNiklas Söderlund
2020-01-12test: v4l2_videodevice: Switch to FrameBuffer interfaceNiklas Söderlund
2020-01-12libcamera: buffer: Move captured metadata to FrameMetadataNiklas Söderlund
2019-12-16libcamera: Remove buffer index from loggingNiklas Söderlund
2019-11-08libcamera: Remove unneeded semicolonsLaurent Pinchart
2019-10-23libcamera: Standardise on C compatibility headersLaurent Pinchart
2019-10-15libcamera: v4l2_controls: Remove V4L2ControlList classLaurent Pinchart
2019-10-15libcamera: controls: Merge ControlInfoMap and V4L2ControlInfoMapLaurent Pinchart
2019-10-15libcamera: v4l2_controls: Store a ControlRange in V4L2ControlInfoMapLaurent Pinchart
2019-10-15libcamera: v4l2_controls: Replace V4L2ControlInfo with V4L2ControlRangeLaurent Pinchart
2019-10-15test: v4l2_videodevice: controls: Use correct control range in checkLaurent Pinchart
2019-10-13libcamera: v4l2_device: Replace V4L2ControlList with ControlListLaurent Pinchart
2019-10-13test: v4l2_videodevice: Add V4L2 control testLaurent Pinchart
2019-08-19test: Get event dispatcher from current threadLaurent Pinchart
2019-08-13test: v4l2_device: Remove unused functionKieran Bingham
2019-08-13test: v4l2_videodevice: Add M2M device testKieran Bingham
2019-08-11tests: v4l2_videodevice: Set media bus and pixel formats for vimcNiklas Söderlund
2019-07-14libcamera: v4l2_videodevice: Signal buffer completion at streamoff timeLaurent Pinchart
2019-07-14libcamera: v4l2_videodevice: Add helper to queue all buffersLaurent Pinchart
2019-07-13test: v4l2_videodevice: buffer_sharing: Lower resolution to speed up testLaurent Pinchart
2019-06-19libcamera: Rename V4L2Device to V4L2VideoDeviceJacopo Mondi
ls" << endl; return TestFail; } if (ctrls.get(V4L2_CID_BRIGHTNESS).get<int32_t>() == -1 || ctrls.get(V4L2_CID_CONTRAST).get<int32_t>() == -1 || ctrls.get(V4L2_CID_SATURATION).get<int32_t>() == -1) { cerr << "Incorrect value for retrieved controls" << endl; return TestFail; } uint8_t u8Min = u8.min().get<uint8_t>(); uint8_t u8Max = u8.max().get<uint8_t>(); Span<const uint8_t> u8Span = ctrls.get(VIVID_CID_U8_4D_ARRAY).get<Span<const uint8_t>>(); bool valid = std::all_of(u8Span.begin(), u8Span.end(), [&](uint8_t v) { return v >= u8Min && v <= u8Max; }); if (!valid) { cerr << "Incorrect value for retrieved array control" << endl; return TestFail; } /* Test setting controls. */ ctrls.set(V4L2_CID_BRIGHTNESS, brightness.min()); ctrls.set(V4L2_CID_CONTRAST, contrast.max()); ctrls.set(V4L2_CID_SATURATION, saturation.min()); std::array<uint8_t, VIVID_CID_U8_ARRAY_SIZE> u8Values; std::fill(u8Values.begin(), u8Values.end(), u8.min().get<uint8_t>()); ctrls.set(VIVID_CID_U8_4D_ARRAY, Span<const uint8_t>(u8Values)); int ret = capture_->setControls(&ctrls); if (ret) { cerr << "Failed to set controls" << endl; return TestFail; } /* Test setting controls outside of range. */ ctrls.set(V4L2_CID_BRIGHTNESS, brightness.min().get<int32_t>() - 1); ctrls.set(V4L2_CID_CONTRAST, contrast.max().get<int32_t>() + 1); ctrls.set(V4L2_CID_SATURATION, saturation.min().get<int32_t>() + 1); ret = capture_->setControls(&ctrls); if (ret) { cerr << "Failed to set controls (out of range)" << endl; return TestFail; } if (ctrls.get(V4L2_CID_BRIGHTNESS) != brightness.min() || ctrls.get(V4L2_CID_CONTRAST) != contrast.max() || ctrls.get(V4L2_CID_SATURATION) != saturation.min().get<int32_t>() + 1) { cerr << "Controls not updated when set" << endl; return TestFail; } return TestPass; } }; TEST_REGISTER(V4L2ControlTest);