From d878f5679a0ae389dadc4a6e3e33ee504f7d859c Mon Sep 17 00:00:00 2001 From: Alan Liddell Date: Fri, 2 Jun 2023 11:51:43 -0400 Subject: [PATCH] Nontrivial chunking support (#6) Submodule updates. Don't merge before [core-libs/#2](https://github.com/acquire-project/acquire-core-libs/pull/2), [driver-common/#4](https://github.com/acquire-project/acquire-driver-common/pull/4), and [video-runtime/#2](https://github.com/acquire-project/acquire-video-runtime/pull/2). --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ CMakeLists.txt | 3 ++- cmake/cpack.cmake | 5 ----- cmake/git-versioning.cmake | 30 ++++++++++++++++++++++++++++++ src/acquire-core-libs | 2 +- tests/acquire-driver-common | 2 +- tests/acquire-video-runtime | 2 +- tests/one-video-stream.cpp | 9 ++------- 8 files changed, 63 insertions(+), 16 deletions(-) create mode 100644 CHANGELOG.md delete mode 100644 cmake/cpack.cmake create mode 100644 cmake/git-versioning.cmake diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..cfc71b9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,26 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.1.3](https://github.com/acquire-project/acquire-driver-hdcam/compare/v0.1.2...v0.1.3) - 2023-06-02 + +### Added + +- Nightly releases. + +### Changes + +- Updates call to `storage_properties_init` for the new function signature. + +## [0.1.2](https://github.com/acquire-project/acquire-driver-hdcam/compare/v0.1.1...v0.1.2) - 2023-05-12 + +### Fixed + +- Fixes a bug where `acquire_abort` hangs for a max_frame_count of anything other than 0. + +## 0.1.1 - 2023-05-11 diff --git a/CMakeLists.txt b/CMakeLists.txt index e6b21f3..27fd3a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ cmake_policy(SET CMP0079 NEW) # allows use with targets in other directories enable_testing() include(cmake/aq_require.cmake) +include(cmake/git-versioning.cmake) include(cmake/ide.cmake) include(cmake/install-prefix.cmake) include(cmake/hdcam.cmake) @@ -15,4 +16,4 @@ set(CMAKE_CXX_STANDARD 20) add_subdirectory(src) add_subdirectory(tests) -include(cmake/cpack.cmake) +include(CPack) diff --git a/cmake/cpack.cmake b/cmake/cpack.cmake deleted file mode 100644 index 5a49a51..0000000 --- a/cmake/cpack.cmake +++ /dev/null @@ -1,5 +0,0 @@ -SET(CPACK_PACKAGE_VERSION_MAJOR 0) -SET(CPACK_PACKAGE_VERSION_MINOR 1) -SET(CPACK_PACKAGE_VERSION_PATCH 2) - -include(CPack) diff --git a/cmake/git-versioning.cmake b/cmake/git-versioning.cmake new file mode 100644 index 0000000..60581f8 --- /dev/null +++ b/cmake/git-versioning.cmake @@ -0,0 +1,30 @@ +find_program(GIT git) +set(GIT_TAG "v0") +set(GIT_HASH "") + +if(GIT) + execute_process(COMMAND ${GIT} describe --tags --abbrev=0 + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE _GIT_TAG + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + execute_process(COMMAND ${GIT} describe --always + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE GIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_QUIET + ) + + string(FIND "${_GIT_TAG}" "fatal" find_result) + + if(${find_result} EQUAL -1) + set(GIT_TAG "${_GIT_TAG}") + endif() +endif() + +# Output +add_definitions(-DGIT_TAG=${GIT_TAG}) +add_definitions(-DGIT_HASH=${GIT_HASH}) +set(CPACK_PACKAGE_VERSION ${GIT_TAG}) +message(STATUS "Version ${GIT_TAG} ${GIT_HASH}") diff --git a/src/acquire-core-libs b/src/acquire-core-libs index 6b8fb65..f2dabad 160000 --- a/src/acquire-core-libs +++ b/src/acquire-core-libs @@ -1 +1 @@ -Subproject commit 6b8fb65f76a44c69e57917525345652c2b83f74c +Subproject commit f2dabadcb0ed4b72b67d73aa430589d15050f4b6 diff --git a/tests/acquire-driver-common b/tests/acquire-driver-common index 7419f82..58d2f8a 160000 --- a/tests/acquire-driver-common +++ b/tests/acquire-driver-common @@ -1 +1 @@ -Subproject commit 7419f8251abc062cc62224a4d3564776e9f3ab99 +Subproject commit 58d2f8a907f6b14a955d6c0473239b51c9c1e2fd diff --git a/tests/acquire-video-runtime b/tests/acquire-video-runtime index 0479673..05a9ae1 160000 --- a/tests/acquire-video-runtime +++ b/tests/acquire-video-runtime @@ -1 +1 @@ -Subproject commit 0479673fa755531d594a1def765e97faacfaf449 +Subproject commit 05a9ae1e53cf1025ccec345f4773a4a12fc053f8 diff --git a/tests/one-video-stream.cpp b/tests/one-video-stream.cpp index 5ca55d4..c3db4ff 100644 --- a/tests/one-video-stream.cpp +++ b/tests/one-video-stream.cpp @@ -66,13 +66,8 @@ main() SIZED("tiff") - 1, &props.video[0].storage.identifier)); - storage_properties_init(&props.video[0].storage.settings, - 0, - SIZED("out.tif"), - 0, - 0, - { 0 }, - 0); + storage_properties_init( + &props.video[0].storage.settings, 0, SIZED("out.tif"), 0, 0, { 0 }); OK(acquire_configure(runtime, &props));