diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-06-12 13:09:57 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2019-06-19 15:46:44 +0200 |
commit | 3a6c4bd146cc6647daf458bbc048bd861e702f62 (patch) | |
tree | fe44a23f524bd1d82b541985bddf83a275ae725a /test | |
parent | 20807a8c17e629b93d293ef0a0bdbd686ce84823 (diff) |
libcamera: Rename V4L2Device to V4L2VideoDevice
In preparation of creating a new V4L2Device base class, rename
V4L2Device to V4L2VideoDevice.
This is a project wide rename without any intended functional change.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/meson.build | 2 | ||||
-rw-r--r-- | test/v4l2_videodevice/buffer_sharing.cpp (renamed from test/v4l2_device/buffer_sharing.cpp) | 18 | ||||
-rw-r--r-- | test/v4l2_videodevice/capture_async.cpp (renamed from test/v4l2_device/capture_async.cpp) | 6 | ||||
-rw-r--r-- | test/v4l2_videodevice/double_open.cpp (renamed from test/v4l2_device/double_open.cpp) | 8 | ||||
-rw-r--r-- | test/v4l2_videodevice/formats.cpp (renamed from test/v4l2_device/formats.cpp) | 8 | ||||
-rw-r--r-- | test/v4l2_videodevice/meson.build (renamed from test/v4l2_device/meson.build) | 8 | ||||
-rw-r--r-- | test/v4l2_videodevice/request_buffers.cpp (renamed from test/v4l2_device/request_buffers.cpp) | 6 | ||||
-rw-r--r-- | test/v4l2_videodevice/stream_on_off.cpp (renamed from test/v4l2_device/stream_on_off.cpp) | 6 | ||||
-rw-r--r-- | test/v4l2_videodevice/v4l2_videodevice_test.cpp (renamed from test/v4l2_device/v4l2_device_test.cpp) | 8 | ||||
-rw-r--r-- | test/v4l2_videodevice/v4l2_videodevice_test.h (renamed from test/v4l2_device/v4l2_device_test.h) | 8 |
10 files changed, 39 insertions, 39 deletions
diff --git a/test/meson.build b/test/meson.build index 654e0089..c36ac247 100644 --- a/test/meson.build +++ b/test/meson.build @@ -5,8 +5,8 @@ subdir('ipa') subdir('media_device') subdir('pipeline') subdir('stream') -subdir('v4l2_device') subdir('v4l2_subdevice') +subdir('v4l2_videodevice') public_tests = [ ['event', 'event.cpp'], diff --git a/test/v4l2_device/buffer_sharing.cpp b/test/v4l2_videodevice/buffer_sharing.cpp index e63ddff8..1bc478fe 100644 --- a/test/v4l2_device/buffer_sharing.cpp +++ b/test/v4l2_videodevice/buffer_sharing.cpp @@ -4,8 +4,8 @@ * * libcamera V4L2 API tests * - * Validate the function of exporting buffers from a V4L2Device and - * the ability to import them to another V4L2Device instance. + * Validate the function of exporting buffers from a V4L2VideoDevice and + * the ability to import them to another V4L2VideoDevice instance. * Ensure that the Buffers can successfully be queued and dequeued * between both devices. */ @@ -17,19 +17,19 @@ #include <libcamera/event_dispatcher.h> #include <libcamera/timer.h> -#include "v4l2_device_test.h" +#include "v4l2_videodevice_test.h" -class BufferSharingTest : public V4L2DeviceTest +class BufferSharingTest : public V4L2VideoDeviceTest { public: BufferSharingTest() - : V4L2DeviceTest("vivid", "vivid-000-vid-cap"), + : V4L2VideoDeviceTest("vivid", "vivid-000-vid-cap"), output_(nullptr), framesCaptured_(0), framesOutput_(0) {} protected: int init() { - int ret = V4L2DeviceTest::init(); + int ret = V4L2VideoDeviceTest::init(); if (ret) return ret; @@ -38,7 +38,7 @@ protected: if (!entity) return TestSkip; - output_ = new V4L2Device(entity); + output_ = new V4L2VideoDevice(entity); if (!output_) { std::cout << "Failed to create output device" << std::endl; return TestFail; @@ -171,13 +171,13 @@ protected: delete output_; - V4L2DeviceTest::cleanup(); + V4L2VideoDeviceTest::cleanup(); } private: const unsigned int bufferCount = 4; - V4L2Device *output_; + V4L2VideoDevice *output_; unsigned int framesCaptured_; unsigned int framesOutput_; diff --git a/test/v4l2_device/capture_async.cpp b/test/v4l2_videodevice/capture_async.cpp index 69b1d5a1..cea4fffb 100644 --- a/test/v4l2_device/capture_async.cpp +++ b/test/v4l2_videodevice/capture_async.cpp @@ -12,13 +12,13 @@ #include <iostream> -#include "v4l2_device_test.h" +#include "v4l2_videodevice_test.h" -class CaptureAsyncTest : public V4L2DeviceTest +class CaptureAsyncTest : public V4L2VideoDeviceTest { public: CaptureAsyncTest() - : V4L2DeviceTest("vimc", "Raw Capture 0"), frames(0) {} + : V4L2VideoDeviceTest("vimc", "Raw Capture 0"), frames(0) {} void receiveBuffer(Buffer *buffer) { diff --git a/test/v4l2_device/double_open.cpp b/test/v4l2_videodevice/double_open.cpp index 53850620..5768d404 100644 --- a/test/v4l2_device/double_open.cpp +++ b/test/v4l2_videodevice/double_open.cpp @@ -7,15 +7,15 @@ #include <iostream> -#include "v4l2_device_test.h" +#include "v4l2_videodevice_test.h" namespace { -class DoubleOpen : public V4L2DeviceTest +class DoubleOpen : public V4L2VideoDeviceTest { public: DoubleOpen() - : V4L2DeviceTest("vimc", "Raw Capture 0") {} + : V4L2VideoDeviceTest("vimc", "Raw Capture 0") {} protected: int run() { @@ -23,7 +23,7 @@ protected: /* * Expect failure: The device has already been opened by the - * V4L2DeviceTest base class + * V4L2VideoDeviceTest base class */ ret = capture_->open(); if (!ret) { diff --git a/test/v4l2_device/formats.cpp b/test/v4l2_videodevice/formats.cpp index 6be045ff..ee7d357d 100644 --- a/test/v4l2_device/formats.cpp +++ b/test/v4l2_videodevice/formats.cpp @@ -8,18 +8,18 @@ #include <climits> #include <iostream> -#include "v4l2_device.h" +#include "v4l2_videodevice.h" -#include "v4l2_device_test.h" +#include "v4l2_videodevice_test.h" using namespace std; using namespace libcamera; -class Format : public V4L2DeviceTest +class Format : public V4L2VideoDeviceTest { public: Format() - : V4L2DeviceTest("vimc", "Raw Capture 0") {} + : V4L2VideoDeviceTest("vimc", "Raw Capture 0") {} protected: int run() { diff --git a/test/v4l2_device/meson.build b/test/v4l2_videodevice/meson.build index de540b1b..76be5e14 100644 --- a/test/v4l2_device/meson.build +++ b/test/v4l2_videodevice/meson.build @@ -1,6 +1,6 @@ # Tests are listed in order of complexity. # They are not alphabetically sorted. -v4l2_device_tests = [ +v4l2_videodevice_tests = [ [ 'double_open', 'double_open.cpp' ], [ 'formats', 'formats.cpp' ], [ 'request_buffers', 'request_buffers.cpp' ], @@ -9,10 +9,10 @@ v4l2_device_tests = [ [ 'buffer_sharing', 'buffer_sharing.cpp' ], ] -foreach t : v4l2_device_tests - exe = executable(t[0], [t[1], 'v4l2_device_test.cpp'], +foreach t : v4l2_videodevice_tests + exe = executable(t[0], [t[1], 'v4l2_videodevice_test.cpp'], dependencies : libcamera_dep, link_with : test_libraries, include_directories : test_includes_internal) - test(t[0], exe, suite : 'v4l2_device', is_parallel : false) + test(t[0], exe, suite : 'v4l2_videodevice', is_parallel : false) endforeach diff --git a/test/v4l2_device/request_buffers.cpp b/test/v4l2_videodevice/request_buffers.cpp index 7b7b06b2..c4aedf7b 100644 --- a/test/v4l2_device/request_buffers.cpp +++ b/test/v4l2_videodevice/request_buffers.cpp @@ -5,13 +5,13 @@ * libcamera V4L2 API tests */ -#include "v4l2_device_test.h" +#include "v4l2_videodevice_test.h" -class RequestBuffersTest : public V4L2DeviceTest +class RequestBuffersTest : public V4L2VideoDeviceTest { public: RequestBuffersTest() - : V4L2DeviceTest("vimc", "Raw Capture 0") {} + : V4L2VideoDeviceTest("vimc", "Raw Capture 0") {} protected: int run() diff --git a/test/v4l2_device/stream_on_off.cpp b/test/v4l2_videodevice/stream_on_off.cpp index b158b8e4..7664adc4 100644 --- a/test/v4l2_device/stream_on_off.cpp +++ b/test/v4l2_videodevice/stream_on_off.cpp @@ -5,13 +5,13 @@ * libcamera V4L2 API tests */ -#include "v4l2_device_test.h" +#include "v4l2_videodevice_test.h" -class StreamOnStreamOffTest : public V4L2DeviceTest +class StreamOnStreamOffTest : public V4L2VideoDeviceTest { public: StreamOnStreamOffTest() - : V4L2DeviceTest("vimc", "Raw Capture 0") {} + : V4L2VideoDeviceTest("vimc", "Raw Capture 0") {} protected: int run() { diff --git a/test/v4l2_device/v4l2_device_test.cpp b/test/v4l2_videodevice/v4l2_videodevice_test.cpp index baad48f8..b26d06ad 100644 --- a/test/v4l2_device/v4l2_device_test.cpp +++ b/test/v4l2_videodevice/v4l2_videodevice_test.cpp @@ -8,7 +8,7 @@ #include <iostream> #include <sys/stat.h> -#include "v4l2_device_test.h" +#include "v4l2_videodevice_test.h" #include "device_enumerator.h" #include "media_device.h" @@ -26,7 +26,7 @@ bool exists(const std::string &path) return false; } -int V4L2DeviceTest::init() +int V4L2VideoDeviceTest::init() { enumerator_ = DeviceEnumerator::create(); if (!enumerator_) { @@ -50,7 +50,7 @@ int V4L2DeviceTest::init() if (!entity) return TestSkip; - capture_ = new V4L2Device(entity); + capture_ = new V4L2VideoDevice(entity); if (!capture_) return TestFail; @@ -77,7 +77,7 @@ int V4L2DeviceTest::init() return TestPass; } -void V4L2DeviceTest::cleanup() +void V4L2VideoDeviceTest::cleanup() { capture_->streamOff(); capture_->releaseBuffers(); diff --git a/test/v4l2_device/v4l2_device_test.h b/test/v4l2_videodevice/v4l2_videodevice_test.h index 651c005f..3321b5a4 100644 --- a/test/v4l2_device/v4l2_device_test.h +++ b/test/v4l2_videodevice/v4l2_videodevice_test.h @@ -15,14 +15,14 @@ #include "device_enumerator.h" #include "media_device.h" -#include "v4l2_device.h" +#include "v4l2_videodevice.h" using namespace libcamera; -class V4L2DeviceTest : public Test +class V4L2VideoDeviceTest : public Test { public: - V4L2DeviceTest(const char *driver, const char *entity) + V4L2VideoDeviceTest(const char *driver, const char *entity) : driver_(driver), entity_(entity), capture_(nullptr) { } @@ -35,7 +35,7 @@ protected: std::string entity_; std::unique_ptr<DeviceEnumerator> enumerator_; std::shared_ptr<MediaDevice> media_; - V4L2Device *capture_; + V4L2VideoDevice *capture_; BufferPool pool_; }; |