Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
696bbe9
Take two for C++ bundle functionality
darbyjohnston May 5, 2026
6c51feb
Add basic tests
darbyjohnston May 7, 2026
eabcb30
Windows build fixes
darbyjohnston May 7, 2026
83b0c8a
Add tests
darbyjohnston May 7, 2026
33bc632
Add tests
darbyjohnston May 7, 2026
30a9b59
Add tests
darbyjohnston May 8, 2026
24a190e
Python fixes
darbyjohnston May 8, 2026
c56c0c7
Python linter fixes
darbyjohnston May 8, 2026
01d022b
Check result
darbyjohnston May 8, 2026
1097ddf
Fixes for miniz and image sequences
darbyjohnston May 18, 2026
8eef11c
Try anonymous namespace again
darbyjohnston May 21, 2026
589d425
Try minizip-ng again
darbyjohnston May 24, 2026
df36eed
Enable PIC
darbyjohnston May 24, 2026
c6f9095
Add 64-bit ZIP tests
darbyjohnston May 27, 2026
700ed1e
Add more tests
darbyjohnston May 27, 2026
2631e1b
Add documentation URL
darbyjohnston May 27, 2026
06748d5
Update src/opentimelineio/bundle.h
darbyjohnston May 27, 2026
80e7b44
Rename arguments
darbyjohnston May 27, 2026
bf9407f
Add dry run tests
darbyjohnston May 27, 2026
e33db5f
Add comment
darbyjohnston May 27, 2026
a606f26
Add comment
darbyjohnston May 27, 2026
3969349
Fix example
darbyjohnston May 27, 2026
fd40532
Add missing reference metadata
darbyjohnston May 28, 2026
4d558bd
Add more verbose errors
darbyjohnston May 28, 2026
5105849
Make errors more verbose
darbyjohnston May 28, 2026
aa15d9e
Update temp directory implementation
darbyjohnston May 28, 2026
90f5c86
Add zlib note
darbyjohnston Jun 7, 2026
95b8ccf
Add zip slip tests
darbyjohnston Jun 7, 2026
9f0cb7b
Add zip slip tests
darbyjohnston Jun 7, 2026
4664b77
Find ZLIB
darbyjohnston Jun 7, 2026
2b10356
Build fixes
darbyjohnston Jun 7, 2026
194fc74
Build fixes
darbyjohnston Jun 7, 2026
0bf483c
GitHub actions fix
darbyjohnston Jul 13, 2026
cae21b3
Try CMAKE_PREFIX_PATH
darbyjohnston Jul 13, 2026
775ec4f
More build fixes
darbyjohnston Jul 13, 2026
0b627a0
Use static vcpkg zlib
darbyjohnston Jul 13, 2026
d20d60e
Build path fixes
darbyjohnston Jul 13, 2026
5542083
More build fixes
darbyjohnston Jul 13, 2026
e5ff27e
More build fixes
darbyjohnston Jul 13, 2026
0d5251c
Use Windows 2022 runners
darbyjohnston Jul 13, 2026
9ea1210
Try static again
darbyjohnston Jul 13, 2026
5518a70
Try shared again
darbyjohnston Jul 13, 2026
f1dfb77
Fix copy step
darbyjohnston Jul 13, 2026
e01a604
Fix copy step
darbyjohnston Jul 13, 2026
20707a7
Fix path
darbyjohnston Jul 13, 2026
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
57 changes: 51 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-15]
# Pinned to windows-2022 because the June 2026 migration of
# windows-latest to Windows Server 2025 + Visual Studio 2026 +
# CMake 4.3 breaks the vcpkg-based ZLIB find_package path.
# windows-2022 is supported by GitHub through ~2028.
os: [ubuntu-latest, windows-2022, macos-15]
# Unfortunately the CMake test target is OS dependent so we set it as
# a variable here.
include:
- os: ubuntu-latest
OTIO_TEST_TARGET: test
- os: windows-latest
- os: windows-2022
OTIO_TEST_TARGET: RUN_TESTS
- os: macos-15
OTIO_TEST_TARGET: test
Expand All @@ -49,6 +53,15 @@ jobs:
if: matrix.os == env.GH_COV_OS && github.actor != env.GH_DEPENDABOT
run: |
sudo apt-get install lcov
- name: Install ZLIB (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install -y zlib1g-dev
- name: Install ZLIB (Windows)
if: runner.os == 'Windows'
run: |
vcpkg install zlib:x64-windows
echo "CMAKE_PREFIX_PATH=C:/vcpkg/installed/x64-windows" >> $env:GITHUB_ENV
echo "C:/vcpkg/installed/x64-windows/bin" >> $env:GITHUB_PATH
- name: Build
run: |
cmake -E make_directory ${{ env.OTIO_BUILD_DIR }}
Expand Down Expand Up @@ -90,13 +103,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-15]
# See note in cpp_build about pinning to windows-2022.
os: [ubuntu-latest, windows-2022, macos-15]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- { os: ubuntu-latest, shell: bash }
- { os: macos-15, shell: bash }
- { os: windows-latest, shell: pwsh }
- { os: windows-latest, shell: msys2, python-version: "mingw64" }
- { os: windows-2022, shell: pwsh }
- { os: windows-2022, shell: msys2, python-version: "mingw64" }
exclude:
- { os: macos-15, python-version: 3.9 }

Expand All @@ -122,6 +136,7 @@ jobs:
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-zlib
make
git
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -134,6 +149,15 @@ jobs:
run: |
echo 'OTIO_CXX_DEBUG_BUILD=1' >> $GITHUB_ENV
sudo apt-get install lcov
- name: Install ZLIB (Linux)
if: runner.os == 'Linux' && matrix.python-version != 'mingw64'
run: sudo apt-get install -y zlib1g-dev
- name: Install ZLIB (Windows)
if: runner.os == 'Windows' && matrix.python-version != 'mingw64'
run: |
vcpkg install zlib:x64-windows
echo "CMAKE_PREFIX_PATH=C:/vcpkg/installed/x64-windows" >> $env:GITHUB_ENV
echo "C:/vcpkg/installed/x64-windows/bin" >> $env:GITHUB_PATH
- name: Install python build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel "flake8>=3.5" check-manifest
Expand All @@ -146,6 +170,23 @@ jobs:
- name: Build and Install
run: |
pip install .[dev] -v --break-system-packages
# Python 3.8+ ignores PATH when resolving DLL dependencies of .pyd
# files, so zlib1.dll from vcpkg's bin is not findable at import
# time even though it is on PATH for the C++ tests. Copy it next
# to the installed _otio.pyd, which IS a directory Python's
# restricted DLL search checks.
# (In package_wheels, cibuildwheel does this via delvewheel.)
- name: Copy ZLIB DLL next to _otio.pyd (Windows)
if: runner.os == 'Windows' && matrix.python-version != 'mingw64'
run: |
$target = python -c "import sysconfig, os; print(os.path.join(sysconfig.get_paths()['purelib'], 'opentimelineio'))"
$sourceDir = "C:/vcpkg/installed/x64-windows/bin"
Write-Host "Target: $target"
Write-Host "Contents of ${sourceDir}:"
Get-ChildItem $sourceDir -ErrorAction SilentlyContinue | ForEach-Object { Write-Host " $($_.Name)" }
Copy-Item "$sourceDir/*.dll" "$target/" -ErrorAction Stop
Write-Host "DLLs now in ${target}:"
Get-ChildItem "$target/*.dll" | ForEach-Object { Write-Host " $($_.Name)" }
- name: Run tests w/ python coverage
run: make ci-postbuild
# (only on GH_COV_OS and GH_COV_PY)
Expand All @@ -168,11 +209,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# See note in cpp_build about pinning to windows-2022.
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
windows-latest,
windows-2022,
macos-15,
]
python-build: ["cp39", "cp310", "cp311", "cp312", "cp313"]
Expand All @@ -186,6 +228,9 @@ jobs:
env:
CIBW_BUILD: ${{ matrix.python-build }}*
CIBW_SKIP: "*musllinux*"
CIBW_BEFORE_BUILD_LINUX: "yum install -y zlib-devel"
CIBW_BEFORE_BUILD_WINDOWS: "vcpkg install zlib:x64-windows"
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_PREFIX_PATH=C:/vcpkg/installed/x64-windows PATH="C:/vcpkg/installed/x64-windows/bin;$PATH"'
CIBW_ARCHS_LINUX: native
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "src/deps/Imath"]
path = src/deps/Imath
url = https://github.com/AcademySoftwareFoundation/Imath
[submodule "src/deps/minizip-ng"]
path = src/deps/minizip-ng
url = https://github.com/zlib-ng/minizip-ng.git
14 changes: 13 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ option(OTIO_INSTALL_COMMANDLINE_TOOLS "Install the OTIO command line tools" ON)
option(OTIO_FIND_IMATH "Find Imath using find_package" OFF)
option(OTIO_FIND_PYBIND11 "Find pybind11 using find_package" OFF)
option(OTIO_FIND_RAPIDJSON "Find RapidJSON using find_package" OFF)
option(OTIO_FIND_MINIZIP_NG "Find minizip-ng using find_package" OFF)
set(OTIO_PYTHON_INSTALL_DIR "" CACHE STRING "Python installation dir (such as the site-packages dir)")

# Build options
Expand Down Expand Up @@ -270,7 +271,6 @@ else()
endif()

#----- RapidJSON

if(OTIO_FIND_RAPIDJSON)
find_package(RapidJSON CONFIG REQUIRED)
if (RapidJSON_FOUND)
Expand All @@ -280,6 +280,18 @@ else()
message(STATUS "Using src/deps/rapidjson by default")
endif()

#----- minizip-ng
if(OTIO_FIND_MINIZIP_NG)
find_package(minizip-ng REQUIRED)
if (minizip-ng_FOUND)
message(STATUS "Found minizip-ng at ${minizip-ng_CONFIG}")
endif()
else()
message(STATUS "Using src/deps/minizip-ng by default")
# Note that minizip-ng also requires zlib.
find_package(ZLIB REQUIRED)
endif()

# set up the internally hosted dependencies
add_subdirectory(src/deps)

Expand Down
2 changes: 2 additions & 0 deletions docs/tutorials/otio-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ into a single directory named with a suffix of .otiod.
- write_to_file:
- input_otio
- filepath
- relative_media_base_dir
- media_policy
- dryrun

Expand Down Expand Up @@ -182,6 +183,7 @@ read on unix and windows platforms.
- write_to_file:
- input_otio
- filepath
- relative_media_base_dir
- media_policy
- dryrun

Expand Down
17 changes: 10 additions & 7 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ include_directories(${PROJECT_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}/../src
${PYTHON_INCLUDE_DIRS})

list(APPEND examples conform)
list(APPEND examples flatten_video_tracks)
list(APPEND examples summarize_timing)
list(APPEND examples io_perf_test)
list(APPEND examples upgrade_downgrade_example)
set(examples
bundle
conform
flatten_video_tracks
summarize_timing
io_perf_test
upgrade_downgrade_example)
if(OTIO_PYTHON_INSTALL)
list(APPEND examples python_adapters_child_process)
list(APPEND examples python_adapters_embed)
list(APPEND examples
python_adapters_child_process
python_adapters_embed)
endif()
foreach(example ${examples})
add_executable(${example} ${example}.cpp util.h util.cpp)
Expand Down
62 changes: 62 additions & 0 deletions examples/bundle.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Contributors to the OpenTimelineIO project

// Example for converting an .otio file into a bundle.

#include "util.h"

#include <opentimelineio/bundle.h>

#include <filesystem>

using namespace OTIO_NS;

int
main(int argc, char** argv)
{
if (argc != 3) {
std::cout << "Usage: bundle (input.otio) (output.otioz|output.otiod)" << std::endl;
return 1;
}
const std::string input = examples::normalize_path(argv[1]);
const std::string output = examples::normalize_path(argv[2]);

// Read the timeline
ErrorStatus error_status;
SerializableObject::Retainer<Timeline> timeline(dynamic_cast<Timeline*>(
Timeline::from_json_file(input, &error_status)));
if (!timeline || is_error(error_status)) {
examples::print_error(error_status);
return 1;
}

// Write the bundle
bundle::WriteOptions options;
options.relative_media_base_dir =
std::filesystem::u8path(input).parent_path().u8string();
auto const ext = std::filesystem::u8path(output).extension().u8string();
if (".otiod" == ext)
{
if (!bundle::write_otiod(
timeline,
output,
options,
&error_status)) {
examples::print_error(error_status);
return 1;
}
}
else
{
if (!bundle::write_otioz(
timeline,
output,
options,
&error_status)) {
examples::print_error(error_status);
return 1;
}
}

return 0;
}
20 changes: 20 additions & 0 deletions src/deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ if(NOT OTIO_FIND_RAPIDJSON)
set(DEPS_SUBMODULES ${DEPS_SUBMODULES} rapidjson)
endif()

if(NOT OTIO_FIND_MINIZIP_NG)
set(DEPS_SUBMODULES ${DEPS_SUBMODULES} minizip-ng)
endif()

foreach(submodule IN LISTS DEPS_SUBMODULES)
file(GLOB SUBMOD_CONTENTS "${submodule}/*")
list(LENGTH SUBMOD_CONTENTS SUBMOD_CONTENT_LEN)
Expand Down Expand Up @@ -60,3 +64,19 @@ if(NOT OTIO_FIND_IMATH)
endif()
endif()

if(NOT OTIO_FIND_MINIZIP_NG)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(MZ_BZIP2 OFF)
set(MZ_LZMA OFF)
set(MZ_PPMD OFF)
set(MZ_ZSTD OFF)
set(MZ_LIBCOMP OFF)
set(MZ_PKCRYPT OFF)
set(MZ_WZAES OFF)
set(MZ_OPENSSL OFF)
set(MZ_LIBBSD OFF)
set(MZ_ICONV OFF)
set(MZ_FETCH_LIBS OFF)
set(SKIP_INSTALL_ALL ON)
add_subdirectory(minizip-ng)
endif()
1 change: 1 addition & 0 deletions src/deps/minizip-ng
Submodule minizip-ng added at d69cb0
22 changes: 19 additions & 3 deletions src/opentimelineio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
set(OPENTIMELINEIO_HEADER_FILES
anyDictionary.h
anyVector.h
bundle.h
color.h
clip.h
composable.h
Expand Down Expand Up @@ -41,6 +42,7 @@ set(OPENTIMELINEIO_HEADER_FILES
version.h)

add_library(opentimelineio ${OTIO_SHARED_OR_STATIC_LIB}
bundle.cpp
color.cpp
clip.cpp
composable.cpp
Expand Down Expand Up @@ -90,9 +92,9 @@ else()
PRIVATE "${PROJECT_SOURCE_DIR}/src/deps/rapidjson/include")
endif()


target_link_libraries(opentimelineio
PUBLIC opentime Imath::Imath)
target_link_libraries(opentimelineio
PUBLIC opentime Imath::Imath
PRIVATE MINIZIP::minizip)

set_target_properties(opentimelineio PROPERTIES
DEBUG_POSTFIX "${OTIO_DEBUG_POSTFIX}"
Expand Down Expand Up @@ -134,6 +136,20 @@ if(OTIO_CXX_INSTALL)

set(OPENTIMELINEIO_INCLUDES ${OTIO_RESOLVED_CXX_INSTALL_DIR}/include)

if(NOT OTIO_FIND_MINIZIP_NG)
install(TARGETS minizip
EXPORT OpenTimelineIOTargets
ARCHIVE DESTINATION "${OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR}"
LIBRARY DESTINATION "${OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR}"
RUNTIME DESTINATION "${OTIO_RESOLVED_CXX_DYLIB_INSTALL_DIR}")
endif()

set(OTIO_CONFIG_DEPENDENCIES "")
string(APPEND OTIO_CONFIG_DEPENDENCIES "find_dependency(ZLIB)\n")
if(OTIO_FIND_MINIZIP_NG)
string(APPEND OTIO_CONFIG_DEPENDENCIES "find_dependency(minizip-ng)\n")
endif()

install(TARGETS opentimelineio
EXPORT OpenTimelineIOTargets
INCLUDES DESTINATION "${OPENTIMELINEIO_INCLUDES}"
Expand Down
1 change: 1 addition & 0 deletions src/opentimelineio/OpenTimelineIOConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
include(CMakeFindDependencyMacro)
find_dependency(OpenTime)
find_dependency(Imath)
@OTIO_CONFIG_DEPENDENCIES@

include("${CMAKE_CURRENT_LIST_DIR}/OpenTimelineIOTargets.cmake")
Loading
Loading