diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-05-25 02:20:55 +0200 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-06-19 03:06:33 +0200 |
commit | ce02ea29cda94f065d857ae00101e2fef5467a40 (patch) | |
tree | 0dda3d96451acd515629f73adb592ff273c279f3 /test/v4l2_subdevice | |
parent | be78ffbe9abbd0fa6aab7a76c4a56d655d7b7548 (diff) |
libcamera: v4l2_subdevice: Replace FormatEnum with ImageFormats
Replace all usage of FormatEnum with ImageFormats and completely
remove FormatEnum which is no longer needed.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/v4l2_subdevice')
-rw-r--r-- | test/v4l2_subdevice/list_formats.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/v4l2_subdevice/list_formats.cpp b/test/v4l2_subdevice/list_formats.cpp index 3f0edafc..067dc5ed 100644 --- a/test/v4l2_subdevice/list_formats.cpp +++ b/test/v4l2_subdevice/list_formats.cpp @@ -47,29 +47,29 @@ void ListFormatsTest::printFormats(unsigned int pad, int ListFormatsTest::run() { /* List all formats available on existing "Scaler" pads. */ - std::map<unsigned int, std::vector<SizeRange>> formats; + ImageFormats formats; formats = scaler_->formats(0); - if (formats.empty()) { + if (formats.isEmpty()) { cerr << "Failed to list formats on pad 0 of subdevice " << scaler_->entity()->name() << endl; return TestFail; } - for (auto it = formats.begin(); it != formats.end(); ++it) - printFormats(0, it->first, it->second); + for (unsigned int code : formats.formats()) + printFormats(0, code, formats.sizes(code)); formats = scaler_->formats(1); - if (formats.empty()) { + if (formats.isEmpty()) { cerr << "Failed to list formats on pad 1 of subdevice " << scaler_->entity()->name() << endl; return TestFail; } - for (auto it = formats.begin(); it != formats.end(); ++it) - printFormats(1, it->first, it->second); + for (unsigned int code : formats.formats()) + printFormats(1, code, formats.sizes(code)); /* List format on a non-existing pad, format vector shall be empty. */ formats = scaler_->formats(2); - if (!formats.empty()) { + if (!formats.isEmpty()) { cerr << "Listing formats on non-existing pad 2 of subdevice " << scaler_->entity()->name() << " should return an empty format list" << endl; |