Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions bindings/python/test_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ def run_logger(self, variables, body=''):
if _key not in _seen:
_dll_handles.append(os.add_dll_directory(_directory))
_seen.add(_key)
_project_dlls = []
if os.name == 'nt':
import ctypes
# Select this build's project DLLs before Python can find installed copies.
for _variable, _name in (
('OPENSHOT_TEST_AUDIO_DLL_DIR', 'libopenshot-audio.dll'),
('OPENSHOT_TEST_DLL_DIR', 'libopenshot.dll')):
_directory = os.environ.get(_variable)
if _directory:
_project_dlls.append(ctypes.WinDLL(os.path.abspath(os.path.join(_directory, _name))))
import openshot
logger = openshot.Logger.Instance()
assert openshot.ZmqLogger is openshot.Logger
Expand Down
5 changes: 5 additions & 0 deletions src/OpenShotVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@
// SPDX-License-Identifier: LGPL-3.0-or-later

#include "OpenShotVersion.h"
#include <OpenShotAudioVersion.h>

namespace openshot {
std::string GetAudioVersion() {
return openshot_audio::GetVersion();
}

OpenShotVersion GetVersion() {
return openshot::Version;
}
Expand Down
3 changes: 3 additions & 0 deletions src/OpenShotVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ namespace openshot

/// Get the current version number of libopenshot (major, minor, and build number)
openshot::OpenShotVersion GetVersion();

/// Full version of the loaded libopenshot-audio, including development suffixes.
std::string GetAudioVersion();
}

#endif // OPENSHOT_VERSION_H
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ target_link_libraries(openshot-benchmark openshot)
### TEST SOURCE FILES
###
set(OPENSHOT_TESTS
OpenShotVersion
GpuMetrics
AdaptivePreroll
AudioDeviceManager
Expand Down
19 changes: 19 additions & 0 deletions tests/OpenShotVersion.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* @file
* @brief Verify that libopenshot reports the loaded audio library version.
* @author OpenShot Studios, LLC
*/

// SPDX-FileCopyrightText: 2026 OpenShot Studios, LLC
// SPDX-License-Identifier: LGPL-3.0-or-later

#include "openshot_catch.h"
#include "OpenShotVersion.h"
#include <OpenShotAudioVersion.h>
#include <string>

TEST_CASE("Audio version identifies the loaded library", "[version]") {
const std::string audio_version = openshot_audio::GetVersion();
REQUIRE_FALSE(audio_version.empty());
CHECK(openshot::GetAudioVersion() == audio_version);
}
Loading