summaryrefslogtreecommitdiff
path: root/Documentation/meson.build
AgeCommit message (Expand)Author
2020-09-24Documentation: Move all dependencies into featuresRicardo Ribalda
2020-09-24Documentation: Search for dot binaryRicardo Ribalda
2020-08-20Documentation: Guides: Pipeline Handler Writer's GuideChris Chinchilla
2020-08-20Documentation: Guides: Application Writer's GuideChris Chinchilla
2020-08-20Documentation: Guides: Developer's Guide to libcameraChris Chinchilla
2020-05-18meson: Rename variables storing headers listsLaurent Pinchart
2020-05-13licenses: License all meson files under CC0-1.0Laurent Pinchart
2020-01-31Documentation: Add linkcheck targetKieran Bingham
2019-11-20ipa: Switch to the plain C APIJacopo Mondi
2019-09-15libcamera: Move ipa includes to the same level as libcameraLaurent Pinchart
2019-08-16readme: Move index page content to READMEKieran Bingham
2019-07-09libcamera: Rework automatic version generation to avoid rebuildsLaurent Pinchart
2019-07-04Documentation: Wrap extended doc_install_dir lineKieran Bingham
2019-07-04libcamera: Auto generate version informationKieran Bingham
2019-05-23meson: Fix coding style in meson.build filesLaurent Pinchart
2019-04-28Documentation: Drop install directive for DoxyfileNiklas Söderlund
2019-01-14Documentation: quieten sphinx-build outputKieran Bingham
2018-12-14Documentation: Add architecture documentationLaurent Pinchart
2018-12-13Documentation: Add coding style documentJacopo Mondi
2018-12-12Documentation: Generate source code documentation using DoxygenLaurent Pinchart
2018-12-12Documentation: Don't hardcode install directoryLaurent Pinchart
2018-12-11Documentation: Set install_dir in custom_target()Laurent Pinchart
2018-11-28Documentation: Introduce sphinx documentationKieran Bingham
= new FrameBufferAllocator(camera_); StreamConfiguration &cfg = config_->at(0); if (camera_->acquire()) { cout << "Failed to acquire the camera" << endl; return TestFail; } if (camera_->configure(config_.get())) { cout << "Failed to set default configuration" << endl; return TestFail; } stream_ = cfg.stream(); int ret = allocator_->allocate(stream_); if (ret < 0) return TestFail; return TestPass; } void cleanup() override { delete allocator_; } int run() override { const std::unique_ptr<FrameBuffer> &buffer = allocator_->buffers(stream_).front(); std::vector<MappedBuffer> maps; MappedFrameBuffer map(buffer.get(), PROT_READ); if (!map.isValid()) { cout << "Failed to successfully map buffer" << endl; return TestFail; } /* Make sure we can move it. */ maps.emplace_back(std::move(map)); /* But copying is prevented, it would cause double-unmap. */ // MappedFrameBuffer map_copy = map; /* Local map should be invalid (after move). */ if (map.isValid()) { cout << "Post-move map should not be valid" << endl; return TestFail; } /* Test for multiple successful maps on the same buffer. */ MappedFrameBuffer write_map(buffer.get(), PROT_WRITE); if (!write_map.isValid()) { cout << "Failed to map write buffer" << endl; return TestFail; } MappedFrameBuffer rw_map(buffer.get(), PROT_READ | PROT_WRITE); if (!rw_map.isValid()) { cout << "Failed to map RW buffer" << endl; return TestFail; } return TestPass; } private: std::unique_ptr<CameraConfiguration> config_; FrameBufferAllocator *allocator_; Stream *stream_; }; } /* namespace */ TEST_REGISTER(MappedBufferTest)