summaryrefslogtreecommitdiff
path: root/test/utils.cpp
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2020-10-02 19:22:24 +0200
committerJacopo Mondi <jacopo@jmondi.org>2020-10-07 16:07:43 +0200
commit5cf64b26a24d1430eed9523ca5899bdd3faf203b (patch)
tree1055799fd073bc7dc246d945cc4c645f9822b8c2 /test/utils.cpp
parent5fbda0dfda8dbf85022356e117fff47b184461f6 (diff)
android: camera_stream: Break out CameraStream
Break CameraStream out of the CameraDevice class. No functional changes, only the code is moved. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'test/utils.cpp')
0 files changed, 0 insertions, 0 deletions
">#include "libcamera/internal/media_device.h" #include "libcamera/internal/v4l2_subdevice.h" #include "v4l2_subdevice_test.h" using namespace std; using namespace libcamera; /* * This test runs on vimc media device. For a description of vimc, in the * context of libcamera testing, please refer to * 'test/media_device/media_device_link_test.cpp' file. * * If the vimc module is not loaded, the test gets skipped. */ int V4L2SubdeviceTest::init() { enumerator_ = DeviceEnumerator::create(); if (!enumerator_) { cerr << "Failed to create device enumerator" << endl; return TestFail; } if (enumerator_->enumerate()) { cerr << "Failed to enumerate media devices" << endl; return TestFail; } DeviceMatch dm("vimc"); media_ = enumerator_->search(dm); if (!media_) { cerr << "Unable to find \'vimc\' media device node" << endl; return TestSkip; } MediaEntity *videoEntity = media_->getEntityByName("Scaler"); if (!videoEntity) { cerr << "Unable to find media entity 'Scaler'" << endl; return TestFail; } scaler_ = new V4L2Subdevice(videoEntity); if (scaler_->open()) { cerr << "Unable to open video subdevice " << scaler_->entity()->deviceNode() << endl; return TestSkip; } return 0; } void V4L2SubdeviceTest::cleanup() { delete scaler_; }