diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml
index 40a7a0569..b62a8feae 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -54,15 +54,15 @@ jobs:
run: sudo apt-get install qtdeclarative5-dev libqt5quick5 qtbase5-dev libqt5svg5-dev qtchooser qt5-qmake qtbase5-dev-tools
- name: Setup environment
- run: >
- echo "$PWD/build/install/bin" >> $GITHUB_PATH &&
- echo "LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV &&
+ run: |
+ echo "$PWD/build/install/bin" >> $GITHUB_PATH
+ echo "LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PWD/build/install/lib:$PYTHONPATH" >> $GITHUB_ENV
- name: Build tlRender
- run: >
- mkdir build &&
- cd build &&
+ run: |
+ mkdir build
+ cd build
cmake ../etc/SuperBuild \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
@@ -82,20 +82,20 @@ jobs:
-DTLRENDER_PROGRAMS=$TLRENDER_PROGRAMS \
-DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
-DTLRENDER_TESTS=$TLRENDER_TESTS \
- -DTLRENDER_GCOV=$TLRENDER_GCOV &&
+ -DTLRENDER_GCOV=$TLRENDER_GCOV
cmake --build . -j 4 --config Debug
- name: Run tests
- run: >
- cd build &&
- cd tlRender/src/tlRender-build &&
+ run: |
+ cd build
+ cd tlRender/src/tlRender-build
ctest --rerun-failed --output-on-failure
- name: Code coverage
if: env.TLRENDER_GCOV == 'ON'
- run: >
- cd build &&
- cd tlRender/src/tlRender-build &&
+ run: |
+ cd build
+ cd tlRender/src/tlRender-build
sh ../../../../etc/Linux/lcov.sh
- name: Upload coverage to Codecov
@@ -138,15 +138,15 @@ jobs:
run: sudo apt-get install xorg-dev libglu1-mesa-dev mesa-common-dev
- name: Setup environment
- run: >
- echo "$PWD/build/install/bin" >> $GITHUB_PATH &&
- echo "LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV &&
+ run: |
+ echo "$PWD/build/install/bin" >> $GITHUB_PATH
+ echo "LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PWD/build/install/lib:$PYTHONPATH" >> $GITHUB_ENV
- name: Build tlRender
- run: >
- mkdir build &&
- cd build &&
+ run: |
+ mkdir build
+ cd build
cmake ../etc/SuperBuild \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
@@ -167,13 +167,13 @@ jobs:
-DTLRENDER_PROGRAMS=$TLRENDER_PROGRAMS \
-DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
-DTLRENDER_TESTS=$TLRENDER_TESTS \
- -DTLRENDER_GCOV=$TLRENDER_GCOV &&
+ -DTLRENDER_GCOV=$TLRENDER_GCOV
cmake --build . -j 4 --config Debug
- name: Run tests
- run: >
- cd build &&
- cd tlRender/src/tlRender-build &&
+ run: |
+ cd build
+ cd tlRender/src/tlRender-build
ctest --rerun-failed --output-on-failure
linux-package:
@@ -202,28 +202,28 @@ jobs:
run: sudo apt-get install libpulse-dev
- name: Setup environment
- run: >
- echo "$PWD/build/install/bin" >> $GITHUB_PATH &&
- echo "LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV &&
+ run: |
+ echo "$PWD/build/install/bin" >> $GITHUB_PATH
+ echo "LD_LIBRARY_PATH=$PWD/build/install/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PWD/build/install/lib:$PYTHONPATH" >> $GITHUB_ENV
- name: Build tlRender
- run: >
- mkdir build &&
- cd build &&
+ run: |
+ mkdir build
+ cd build
cmake ../etc/SuperBuild \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
-DCMAKE_PREFIX_PATH=$PWD/install \
-DTLRENDER_USD=$TLRENDER_USD \
-DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
- -DTLRENDER_TESTS=$TLRENDER_TESTS &&
+ -DTLRENDER_TESTS=$TLRENDER_TESTS
cmake --build . -j 4 --config Release
- name: Package
- run: >
- cd build &&
- cd tlRender/src/tlRender-build &&
+ run: |
+ cd build
+ cd tlRender/src/tlRender-build
cmake --build . -j 4 --config Release --target package
- uses: actions/upload-artifact@v3
@@ -261,16 +261,16 @@ jobs:
# \bug DYLD_LIBRARY_PATH is not being set here?
- name: Setup environment
- run: >
- echo "$PWD/build/install/bin" >> $GITHUB_PATH &&
- echo "DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV &&
+ run: |
+ echo "$PWD/build/install/bin" >> $GITHUB_PATH
+ echo "DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PWD/build/install/lib:$PYTHONPATH" >> $GITHUB_ENV
- name: Build tlRender
- run: >
- export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH &&
- mkdir build &&
- cd build &&
+ run: |
+ export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
+ mkdir build
+ cd build
cmake ../etc/SuperBuild \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
@@ -292,14 +292,14 @@ jobs:
-DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
-DTLRENDER_TESTS=$TLRENDER_TESTS \
-DTLRENDER_GCOV=$TLRENDER_GCOV \
- -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} &&
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
cmake --build . -j 4 --config Debug
- name: Run tests
- run: >
- export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH &&
- cd build &&
- cd tlRender/src/tlRender-build &&
+ run: |
+ export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
+ cd build
+ cd tlRender/src/tlRender-build
tests/tltest/tltest
macos-package:
@@ -318,16 +318,16 @@ jobs:
# \bug DYLD_LIBRARY_PATH is not being set here?
- name: Setup environment
- run: >
- echo "$PWD/build/install/bin" >> $GITHUB_PATH &&
- echo "DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV &&
+ run: |
+ echo "$PWD/build/install/bin" >> $GITHUB_PATH
+ echo "DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PYTHONPATH=$PWD/build/install/lib:$PYTHONPATH" >> $GITHUB_ENV
- name: Build tlRender
- run: >
- export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH &&
- mkdir build &&
- cd build &&
+ run: |
+ export DYLD_LIBRARY_PATH=$PWD/build/install/lib:$DYLD_LIBRARY_PATH
+ mkdir build
+ cd build
cmake ../etc/SuperBuild \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
@@ -335,13 +335,13 @@ jobs:
-DTLRENDER_USD=$TLRENDER_USD \
-DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
-DTLRENDER_TESTS=$TLRENDER_TESTS \
- -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} &&
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
cmake --build . -j 4 --config Release
- name: Package
- run: >
- cd build &&
- cd tlRender/src/tlRender-build &&
+ run: |
+ cd build
+ cd tlRender/src/tlRender-build
cmake --build . -j 4 --config Release --target package
- uses: actions/upload-artifact@v3
@@ -377,13 +377,13 @@ jobs:
submodules: recursive
- name: Setup environment
- run: >
+ run: |
echo "$pwd\build\install\bin;$pwd\build\install\lib;$env:path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Build tlRender
- run: >
- mkdir build &&
- cd build &&
+ run: |
+ mkdir build
+ cd build
cmake ..\etc\SuperBuild `
-DCMAKE_BUILD_TYPE=Debug `
-DCMAKE_INSTALL_PREFIX=install `
@@ -404,23 +404,26 @@ jobs:
-DTLRENDER_PROGRAMS=${{ env.TLRENDER_PROGRAMS }} `
-DTLRENDER_EXAMPLES=${{ env.TLRENDER_EXAMPLES }} `
-DTLRENDER_TESTS=${{ env.TLRENDER_TESTS }} `
- -DTLRENDER_GCOV=${{ env.TLRENDER_GCOV }} &&
+ -DTLRENDER_GCOV=${{ env.TLRENDER_GCOV }}
cmake --build . -j 4 --config Debug
- name: Run tests
- run: >
- cd build &&
- cd tlRender\src\tlRender-build &&
+ run: |
+ cd build
+ cd tlRender\src\tlRender-build
tests\tltest\Debug\tltest
#ctest --rerun-failed --output-on-failure
windows-package:
- runs-on: windows-2019
+ runs-on: windows-latest
+ #runs-on: windows-2019
- # \bug How can we build FFmpeg on Windows?
+ # \todo How can we build FFmpeg on Windows?
+ # \todo USD has errors in the boost build with windows-latest
+ # \todo USD has errors in the MaterialX build with windows-2019
env:
TLRENDER_FFMPEG: OFF
- TLRENDER_USD: ON
+ TLRENDER_USD: OFF
TLRENDER_EXAMPLES: OFF
TLRENDER_TESTS: OFF
@@ -430,12 +433,12 @@ jobs:
submodules: recursive
- name: Setup environment
+ shell: cmd
run: |
echo "%CD%\build\install\bin;%CD%\build\install\lib" >> $GITHUB_PATH
- name: Build tlRender
shell: cmd
- continue-on-error: true
run: |
mkdir build
cd build
@@ -448,15 +451,9 @@ jobs:
-DTLRENDER_EXAMPLES=${{ env.TLRENDER_EXAMPLES }} ^
-DTLRENDER_TESTS=${{ env.TLRENDER_TESTS }}
cmake --build . -j 4 --config Release
-
- - name: Debugging
- shell: bash
- run: |
- cd build
- find . -name bootstrap.log
- find . -name bootstrap.log | xargs cat
- name: Package
+ shell: cmd
run: |
cd build
cd tlRender\src\tlRender-build
diff --git a/CMakeGraphVizOptions.cmake b/CMakeGraphVizOptions.cmake
new file mode 100644
index 000000000..a82aaa6c3
--- /dev/null
+++ b/CMakeGraphVizOptions.cmake
@@ -0,0 +1,9 @@
+# Example:
+# > cmake --graphviz=tlRenderLibraries.dot -S ..\..\..\..\tlRender -DTLRENDER_TESTS=OFF
+# > dot tlRenderLibraries.dot -Tpng > tlRenderLibraries.png
+
+set(GRAPHVIZ_GRAPH_HEADER "node [ fontsize = 24 ];")
+set(GRAPHVIZ_EXECUTABLES FALSE)
+set(GRAPHVIZ_INTERFACE_LIBS FALSE)
+set(GRAPHVIZ_EXTERNAL_LIBS FALSE)
+set(GRAPHVIZ_IGNORE_TARGETS glad tlPlay tlApp tlGLApp tlBakeApp tlResourceApp tlPlayGLApp tlPlayQtApp)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9261082f6..900ad0021 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -138,7 +138,7 @@ find_package(nlohmann_json REQUIRED)
find_package(ZLIB REQUIRED)
find_package(minizip REQUIRED)
find_package(OTIO REQUIRED)
-find_package(freetype)
+find_package(Freetype)
# GLFW dependency
if(TLRENDER_GLFW)
diff --git a/README.md b/README.md
index 0a9cbb3c7..0304a2c8b 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ integrating the library with Qt and OpenGL applications.
The library is written in C++ and uses the CMake build system.
-![tlplay](etc/Images/tlplay-gl-screenshot1.png)
+![tlplay-gl](etc/Images/tlplay-gl-screenshot1.png)
This screenshot shows an example playback application built with the tlRender
user interface library. Two files are being compared with an A/B "wipe", a USD
@@ -22,12 +22,12 @@ animation and a rendered movie.
"Spring" content: © Blender Foundation | cloud.blender.org/spring
Currently supported:
-* Movie files (H264, MP4, etc.)
-* Image file sequences (Cineon, DPX, JPEG, OpenEXR, PNG, PPM, TIFF)
+* Movie files (.mp4, .mov, ...)
+* Image file sequences (.cin, .dpx, .exr, .jpg, .png, .tiff, ...)
* Multi-channel audio
-* Color management with OpenColorIO v2.2
+* Color management with OpenColorIO
* A/B comparison
-* .otioz file bundles
+* OpenTimelineIO .otioz file bundles
Work in progress:
* USD support
@@ -42,16 +42,29 @@ To do:
* Python bindings
Contents:
+* [Libraries](#Libraries)
* [Dependencies](#dependencies)
* [Building](#building)
* [Building Dependencies](#build-dependencies)
- * [CMake build options](#cmake-build-options)
* [Building on Linux](#building-on-linux)
* [Building on macOS](#building-on-macos)
* [Building FFmpeg on Windows](#building-ffmpeg-on-windows)
* [Building on Windows](#building-on-windows)
+# Libraries
+
+tlRender is composed of multiple libraries:
+
+
+
+| Libraries | Description |
+| ---------------------------------------- | ------------------------ |
+| tlCore, tlGL, tlIO, tlTimelime, tlDevice | Core libraries |
+| tlUI, tlTimelineIO | User interface libraries |
+| tlQt, tlQtWidget, tlQtQuick | Qt integration libraries |
+
+
# Dependencies
Required dependencies:
@@ -83,34 +96,6 @@ Optional dependencies:
A CMake super build script is provided to build the dependencies from source,
except for Qt. Qt should be installed separately.
-## CMake build options
-
-| Name | Description | Default |
-| ----------------- | ------------------------------------------------- | --------- |
-| TLRENDER_MMAP | Enable memory-mapped file I/O | TRUE |
-| TLRENDER_PYTHON | Enable Python support (for OTIO Python adapters) | FALSE |
-| TLRENDER_GLFW | Enable support for GLFW | TRUE |
-| TLRENDER_OCIO | Enable support for OpenColorIO | TRUE |
-| TLRENDER_AUDIO | Enable support for audio | TRUE |
-| TLRENDER_JPEG | Enable support for JPEG | TRUE |
-| TLRENDER_TIFF | Enable support for TIFF | TRUE |
-| TLRENDER_STB | Enable support for STB I/O (TGA, BMP, PSD) | TRUE |
-| TLRENDER_PNG | Enable support for PNG | TRUE |
-| TLRENDER_EXR | Enable support for OpenEXR | TRUE |
-| TLRENDER_FFMPEG | Enable support for FFmpeg | TRUE |
-| TLRENDER_USD | Enable support for USD | FALSE |
-| TLRENDER_BMD | Enable support for Blackmagic Design devices | FALSE |
-| TLRENDER_BMD_SDK | Full path to the Blackmagic Design SDK | "" |
-| TLRENDER_NFD | Enable support for native file dialogs | OS Dependent |
-| TLRENDER_QT6 | Enable support for Qt6 | FALSE |
-| TLRENDER_QT5 | Enable support for Qt5 | FALSE |
-| TLRENDER_PROGRAMS | Build programs | TRUE |
-| TLRENDER_EXAMPLES | Build examples | TRUE |
-| TLRENDER_TESTS | Build tests | TRUE |
-| TLRENDER_GCOV | Enable gcov code coverage | FALSE |
-| TLRENDER_GPROF | Enable gprof code profiling | FALSE |
-| TLRENDER_GL_DEBUG | Enable OpenGL debugging | FALSE |
-
## Building on Linux
Clone the repository:
diff --git a/bin/tlplay-qt/CMakeLists.txt b/bin/tlplay-qt/CMakeLists.txt
index e9dc7aef3..7adfecfb5 100644
--- a/bin/tlplay-qt/CMakeLists.txt
+++ b/bin/tlplay-qt/CMakeLists.txt
@@ -1,7 +1,20 @@
-add_executable(tlplay-qt main.cpp)
+add_executable(tlplay-qt WIN32 main.cpp)
target_link_libraries(tlplay-qt tlPlayQtApp)
set_target_properties(tlplay-qt PROPERTIES FOLDER bin)
install(
TARGETS tlplay-qt
RUNTIME DESTINATION bin)
+
+if(WIN32)
+ add_executable(tlplay-qt. main.cpp)
+ target_link_libraries(tlplay-qt. tlPlayQtApp)
+ set_target_properties(
+ tlplay-qt. PROPERTIES
+ SUFFIX com
+ FOLDER bin)
+ install(
+ TARGETS tlplay-qt.
+ RUNTIME DESTINATION bin)
+endif()
+
diff --git a/bin/tlplay-qt/main.cpp b/bin/tlplay-qt/main.cpp
index adf3e707f..bf02f60e1 100644
--- a/bin/tlplay-qt/main.cpp
+++ b/bin/tlplay-qt/main.cpp
@@ -8,6 +8,14 @@
#include
+#if defined(_WINDOWS)
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif // WIN32_LEAN_AND_MEAN
+#include
+#include
+#endif // _WINDOWS
+
int main(int argc, char* argv[])
{
int r = 1;
@@ -32,3 +40,11 @@ int main(int argc, char* argv[])
}
return r;
}
+
+#if defined(_WINDOWS)
+int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, PWSTR, int)
+{
+ return main(__argc, __argv);
+}
+#endif // _WINDOWS
+
diff --git a/etc/Images/tlRenderLibraries.dot b/etc/Images/tlRenderLibraries.dot
new file mode 100644
index 000000000..c213d5366
--- /dev/null
+++ b/etc/Images/tlRenderLibraries.dot
@@ -0,0 +1,24 @@
+digraph "tlRender" {
+ pad = 0.5
+ node [ fontsize = 16, style = filled, fontname = NotoSans, fontcolor = black, margin = "0.5,0.25" ];
+ "node0" [ label = "tlTimeline", shape = rectangle, fillcolor = lightblue ];
+ "node1" [ label = "tlIO", shape = rectangle, fillcolor = lightblue ];
+ "node2" [ label = "tlGL", shape = rectangle, fillcolor = lightblue ];
+ "node3" [ label = "tlCore", shape = rectangle, fillcolor = lightblue ];
+ "node2" -> "node3" // tlGL -> tlCore
+ "node1" -> "node2" // tlIO -> tlGL
+ "node0" -> "node1" // tlTimeline -> tlIO
+ "node4" [ label = "tlQtWidget", shape = rectangle, fillcolor = lightgreen ];
+ "node5" [ label = "tlQt", shape = rectangle, fillcolor = lightgreen ];
+ "node6" [ label = "tlDevice", shape = rectangle, fillcolor = lightblue ];
+ "node6" -> "node0" // tlDevice -> tlTimeline
+ "node5" -> "node6" // tlQt -> tlDevice
+ "node4" -> "node5" // tlQtWidget -> tlQt
+ "node7" [ label = "tlTimelineUI", shape = rectangle, fillcolor = orange ];
+ "node8" [ label = "tlUI", shape = rectangle, fillcolor = orange ];
+ "node8" -> "node0" // tlUI -> tlTimeline
+ "node7" -> "node8" // tlTimelineUI -> tlUI
+ "node4" -> "node7" // tlQtWidget -> tlTimelineUI
+ "node9" [ label = "tlQtQuick", shape = rectangle, fillcolor = lightgreen ];
+ "node9" -> "node5" // tlQtQuick -> tlQt
+}
diff --git a/etc/Images/tlRenderLibraries.png b/etc/Images/tlRenderLibraries.png
new file mode 100644
index 000000000..1b44241f4
Binary files /dev/null and b/etc/Images/tlRenderLibraries.png differ
diff --git a/etc/SuperBuild/CMakeLists.txt b/etc/SuperBuild/CMakeLists.txt
index 860eff1f2..a63434be5 100644
--- a/etc/SuperBuild/CMakeLists.txt
+++ b/etc/SuperBuild/CMakeLists.txt
@@ -43,7 +43,11 @@ list(PREPEND CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/../../cmake/Modules
${PROJECT_SOURCE_DIR}/cmake/Modules)
if(NOT CMAKE_CXX_STANDARD)
- set(CMAKE_CXX_STANDARD 14)
+ if(TLRENDER_QT6)
+ set(CMAKE_CXX_STANDARD 17)
+ else()
+ set(CMAKE_CXX_STANDARD 14)
+ endif()
endif()
if(NOT BUILD_SHARED_LIBS)
set(BUILD_SHARED_LIBS OFF)
diff --git a/etc/SuperBuild/cmake/Modules/BuildImath.cmake b/etc/SuperBuild/cmake/Modules/BuildImath.cmake
index d1d3b8eb9..1ec434ece 100644
--- a/etc/SuperBuild/cmake/Modules/BuildImath.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildImath.cmake
@@ -1,7 +1,7 @@
include(ExternalProject)
set(Imath_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/Imath.git")
-set(Imath_GIT_TAG "v3.1.7")
+set(Imath_GIT_TAG "v3.1.9")
set(Imath_ARGS
${TLRENDER_EXTERNAL_ARGS}
diff --git a/etc/SuperBuild/cmake/Modules/BuildOpenColorIO.cmake b/etc/SuperBuild/cmake/Modules/BuildOpenColorIO.cmake
index 8417e61d9..b159b03fb 100644
--- a/etc/SuperBuild/cmake/Modules/BuildOpenColorIO.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildOpenColorIO.cmake
@@ -1,7 +1,7 @@
include(ExternalProject)
set(OpenColorIO_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/OpenColorIO.git")
-set(OpenColorIO_GIT_TAG "v2.2.1")
+set(OpenColorIO_GIT_TAG "v2.3.0")
set(OpenColorIO_ARGS
${TLRENDER_EXTERNAL_ARGS}
diff --git a/etc/SuperBuild/cmake/Modules/BuildOpenEXR.cmake b/etc/SuperBuild/cmake/Modules/BuildOpenEXR.cmake
index ce9d5eb82..de450232d 100644
--- a/etc/SuperBuild/cmake/Modules/BuildOpenEXR.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildOpenEXR.cmake
@@ -1,13 +1,18 @@
include(ExternalProject)
set(OpenEXR_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/openexr.git")
-set(OpenEXR_GIT_TAG "v3.1.7")
+set(OpenEXR_GIT_TAG "v3.2.0")
+# \bug Disable OpenEXR threading to work around a crash at shutdown in the
+# OpenEXR thread pool. Note that we already set the OpenEXR global thread
+# count to zero since we load frames in parallel.
set(OpenEXR_ARGS
${TLRENDER_EXTERNAL_ARGS}
-DOPENEXR_BUILD_TOOLS=OFF
-DOPENEXR_INSTALL_EXAMPLES=OFF
- -DBUILD_TESTING=OFF)
+ -DBUILD_TESTING=OFF
+ -DOPENEXR_ENABLE_THREADING=OFF
+ -DOPENEXR_FORCE_INTERNAL_DEFLATE=ON)
ExternalProject_Add(
OpenEXR
diff --git a/etc/SuperBuild/cmake/Modules/Buildminizip-ng.cmake b/etc/SuperBuild/cmake/Modules/Buildminizip-ng.cmake
index 5379518f4..2b6e8f102 100644
--- a/etc/SuperBuild/cmake/Modules/Buildminizip-ng.cmake
+++ b/etc/SuperBuild/cmake/Modules/Buildminizip-ng.cmake
@@ -1,7 +1,7 @@
include(ExternalProject)
set(minizip-ng_GIT_REPOSITORY "https://github.com/zlib-ng/minizip-ng.git")
-set(minizip-ng_GIT_TAG "3.0.9")
+set(minizip-ng_GIT_TAG "3.0.7")
set(minizip-ng_ARGS
-DMZ_BZIP2=OFF
diff --git a/etc/SuperBuild/tests/OpenColorIOTest/CMakeLists.txt b/etc/SuperBuild/tests/OpenColorIOTest/CMakeLists.txt
index b5c756100..7ad39e900 100644
--- a/etc/SuperBuild/tests/OpenColorIOTest/CMakeLists.txt
+++ b/etc/SuperBuild/tests/OpenColorIOTest/CMakeLists.txt
@@ -1,8 +1,10 @@
+find_package(ZLIB REQUIRED)
+find_package(minizip REQUIRED)
find_package(OpenColorIO REQUIRED)
set(source main.cpp)
add_executable(OpenColorIOTest ${header} ${source})
-target_link_libraries(OpenColorIOTest OpenColorIO::OpenColorIO)
+target_link_libraries(OpenColorIOTest OpenColorIO::OpenColorIO MINIZIP::minizip ZLIB)
add_test(OpenColorIOTest OpenColorIOTest)
diff --git a/examples/test-patterns/CMakeLists.txt b/examples/test-patterns/CMakeLists.txt
index 47050497b..0e923a9e4 100644
--- a/examples/test-patterns/CMakeLists.txt
+++ b/examples/test-patterns/CMakeLists.txt
@@ -8,5 +8,5 @@ set(SOURCE
main.cpp)
add_executable(test-patterns ${SOURCE} ${HEADERS})
-target_link_libraries(test-patterns tlApp tlGL)
+target_link_libraries(test-patterns tlApp)
set_target_properties(test-patterns PROPERTIES FOLDER examples)
diff --git a/lib/tlBakeApp/CMakeLists.txt b/lib/tlBakeApp/CMakeLists.txt
index 24b169a69..e637053f0 100644
--- a/lib/tlBakeApp/CMakeLists.txt
+++ b/lib/tlBakeApp/CMakeLists.txt
@@ -4,7 +4,7 @@ set(HEADERS
set(SOURCE
App.cpp)
-set(LIBRARIES tlApp tlGL)
+set(LIBRARIES tlApp)
add_library(tlBakeApp ${HEADERS} ${SOURCE})
target_link_libraries(tlBakeApp ${LIBRARIES})
diff --git a/lib/tlCore/FileInfo.cpp b/lib/tlCore/FileInfo.cpp
index b6a5cb592..cec66b6ea 100644
--- a/lib/tlCore/FileInfo.cpp
+++ b/lib/tlCore/FileInfo.cpp
@@ -103,7 +103,9 @@ namespace tl
const Path p(path, fileName);
const FileInfo f(p);
bool sequence = false;
- if (options.sequence && !p.getNumber().empty())
+ if (options.sequence &&
+ !p.getNumber().empty() &&
+ f.getType() != Type::Directory)
{
for (auto& i : out)
{
@@ -157,6 +159,7 @@ namespace tl
return a.getTime() < b.getTime();
};
break;
+ default: break;
}
if (sort)
{
diff --git a/lib/tlCore/Path.cpp b/lib/tlCore/Path.cpp
index 6ec6a530f..4f4ba4ca8 100644
--- a/lib/tlCore/Path.cpp
+++ b/lib/tlCore/Path.cpp
@@ -5,6 +5,7 @@
#include
#include
+#include
#include
#include
@@ -51,8 +52,9 @@ namespace tl
(j - i) <= options.maxNumberDigits)
{
_number = value.substr(i, j - i);
- const int number = std::atoi(_number.c_str());
- _sequence = math::IntRange(number, number);
+ _numberValue = std::atoi(_number.c_str());
+ _numberDigits = math::digits(_numberValue);
+ _sequence = math::IntRange(_numberValue, _numberValue);
if (_number.size() > 1 && '0' == _number[0])
{
_padding = _number.size();
@@ -137,6 +139,15 @@ namespace tl
_sequence = value;
}
+ bool Path::sequence(const Path& value) const
+ {
+ return
+ _directory == value._directory &&
+ _baseName == value._baseName &&
+ (_padding == value._padding || _padding == value._numberDigits) &&
+ _extension == value._extension;
+ }
+
std::string Path::getSequenceString() const
{
std::string out;
diff --git a/lib/tlCore/Path.h b/lib/tlCore/Path.h
index c25075394..4cc309874 100644
--- a/lib/tlCore/Path.h
+++ b/lib/tlCore/Path.h
@@ -100,6 +100,8 @@ namespace tl
std::string _directory;
std::string _baseName;
std::string _number;
+ int _numberValue = 0;
+ int _numberDigits = 0;
math::IntRange _sequence;
uint8_t _padding = 0;
std::string _extension;
diff --git a/lib/tlCore/PathInline.h b/lib/tlCore/PathInline.h
index 2778f7bea..80c7cd348 100644
--- a/lib/tlCore/PathInline.h
+++ b/lib/tlCore/PathInline.h
@@ -53,15 +53,6 @@ namespace tl
return _sequence.getMin() != _sequence.getMax();
}
- inline bool Path::sequence(const Path& value) const
- {
- return
- _directory == value._directory &&
- _baseName == value._baseName &&
- _padding == value._padding &&
- _extension == value._extension;
- }
-
inline const std::string& Path::getExtension() const
{
return _extension;
diff --git a/lib/tlDevice/Init.cpp b/lib/tlDevice/Init.cpp
index 64e065cfa..c6c3717f1 100644
--- a/lib/tlDevice/Init.cpp
+++ b/lib/tlDevice/Init.cpp
@@ -8,6 +8,8 @@
#include
#endif // TLRENDER_BMD
+#include
+
#include
namespace tl
@@ -16,6 +18,7 @@ namespace tl
{
void init(const std::shared_ptr& context)
{
+ timeline::init(context);
#if defined(TLRENDER_BMD)
if (!context->getSystem())
{
diff --git a/lib/tlGL/OffscreenBuffer.cpp b/lib/tlGL/OffscreenBuffer.cpp
index f608c2602..b61e63035 100644
--- a/lib/tlGL/OffscreenBuffer.cpp
+++ b/lib/tlGL/OffscreenBuffer.cpp
@@ -281,7 +281,9 @@ namespace tl
{
glFramebufferRenderbuffer(
GL_FRAMEBUFFER,
- GL_DEPTH_ATTACHMENT,
+ p.options.stencil != OffscreenStencil::None ?
+ GL_DEPTH_STENCIL_ATTACHMENT :
+ GL_DEPTH_ATTACHMENT,
GL_RENDERBUFFER,
p.depthStencilID);
}
diff --git a/lib/tlGLApp/CMakeLists.txt b/lib/tlGLApp/CMakeLists.txt
index 870bc0349..3913f7004 100644
--- a/lib/tlGLApp/CMakeLists.txt
+++ b/lib/tlGLApp/CMakeLists.txt
@@ -4,7 +4,7 @@ set(HEADERS
set(SOURCE
IApp.cpp)
-set(LIBRARIES tlApp tlUI tlTimeline)
+set(LIBRARIES tlApp tlUI)
add_library(tlGLApp ${HEADERS} ${SOURCE})
target_link_libraries(tlGLApp ${LIBRARIES})
diff --git a/lib/tlIO/SequenceIORead.cpp b/lib/tlIO/SequenceIORead.cpp
index 5a0692607..62623a985 100644
--- a/lib/tlIO/SequenceIORead.cpp
+++ b/lib/tlIO/SequenceIORead.cpp
@@ -247,24 +247,24 @@ namespace tl
[this, seq, fileName, time, layer]
{
VideoData out;
- try
- {
- const int64_t frame = time.value();
- if (!seq || (seq && frame >= _startFrame && frame <= _endFrame))
+ try
{
- const int64_t memoryIndex = seq ? (frame - _startFrame) : 0;
- out = _readVideo(
- fileName,
- memoryIndex >= 0 && memoryIndex < _memory.size() ? &_memory[memoryIndex] : nullptr,
- time,
- layer);
+ const int64_t frame = time.value();
+ if (!seq || (seq && frame >= _startFrame && frame <= _endFrame))
+ {
+ const int64_t memoryIndex = seq ? (frame - _startFrame) : 0;
+ out = _readVideo(
+ fileName,
+ memoryIndex >= 0 && memoryIndex < _memory.size() ? &_memory[memoryIndex] : nullptr,
+ time,
+ layer);
+ }
}
- }
- catch (const std::exception&)
- {
- //! \todo How should this be handled?
- }
- return out;
+ catch (const std::exception&)
+ {
+ //! \todo How should this be handled?
+ }
+ return out;
});
p.thread.videoRequestsInProgress.push_back(request);
}
diff --git a/lib/tlQt/CMakeLists.txt b/lib/tlQt/CMakeLists.txt
index 317974d34..028a0471c 100644
--- a/lib/tlQt/CMakeLists.txt
+++ b/lib/tlQt/CMakeLists.txt
@@ -26,7 +26,7 @@ if(TLRENDER_QT6)
elseif(TLRENDER_QT5)
list(APPEND LIBRARIES Qt5::Gui)
endif()
-list(APPEND LIBRARIES tlGL tlDevice)
+list(APPEND LIBRARIES tlDevice)
add_library(tlQt ${HEADERS} ${PRIVATE_HEADERS} ${SOURCE})
target_link_libraries(tlQt ${LIBRARIES})
diff --git a/lib/tlQt/Init.cpp b/lib/tlQt/Init.cpp
index 69940d664..96f0f9193 100644
--- a/lib/tlQt/Init.cpp
+++ b/lib/tlQt/Init.cpp
@@ -7,8 +7,6 @@
#include
#include
-#include
-
#include
#include
@@ -24,7 +22,6 @@ namespace tl
DefaultSurfaceFormat defaultSurfaceFormat,
const std::shared_ptr& context)
{
- timeline::init(context);
device::init(context);
if (!context->getSystem())
{
diff --git a/lib/tlTimeline/Edit.cpp b/lib/tlTimeline/Edit.cpp
index f66655060..1af8aa7bc 100644
--- a/lib/tlTimeline/Edit.cpp
+++ b/lib/tlTimeline/Edit.cpp
@@ -70,71 +70,6 @@ namespace tl
}
}
- otio::SerializableObject::Retainer getAssociatedClip(
- const otio::SerializableObject::Retainer& clip)
- {
- otio::SerializableObject::Retainer out;
- const auto timeRangeOpt = clip->trimmed_range_in_parent();
- if (timeRangeOpt.has_value())
- {
- const otime::TimeRange timeRange = timeRangeOpt.value();
- if (auto track = dynamic_cast(clip->parent()))
- {
- if (otio::Track::Kind::video == track->kind())
- {
- if (auto nextTrack = otio::dynamic_retainer_cast(getNextSibling(track)))
- {
- if (otio::Track::Kind::audio == nextTrack->kind())
- {
- for (const auto& child : nextTrack->children())
- {
- if (auto audioClip = otio::dynamic_retainer_cast(child))
- {
- const auto audioTimeRangeOpt = audioClip->trimmed_range_in_parent();
- if (audioTimeRangeOpt.has_value())
- {
- const otime::TimeRange audioTimeRange = audioTimeRangeOpt.value();
- if (audioTimeRange == timeRange)
- {
- out = audioClip;
- break;
- }
- }
- }
- }
- }
- }
- }
- else if (otio::Track::Kind::audio == track->kind())
- {
- if (auto prevTrack = otio::dynamic_retainer_cast(getPrevSibling(track)))
- {
- if (otio::Track::Kind::video == prevTrack->kind())
- {
- for (const auto& child : prevTrack->children())
- {
- if (auto videoClip = otio::dynamic_retainer_cast(child))
- {
- const auto videoTimeRangeOpt = videoClip->trimmed_range_in_parent();
- if (videoTimeRangeOpt.has_value())
- {
- const otime::TimeRange videoTimeRange = videoTimeRangeOpt.value();
- if (videoTimeRange == timeRange)
- {
- out = videoClip;
- break;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return out;
- }
-
otio::SerializableObject::Retainer insert(
const otio::SerializableObject::Retainer& timeline,
const std::vector& inserts)
diff --git a/lib/tlTimeline/Edit.h b/lib/tlTimeline/Edit.h
index 9eeaf2903..6fe07cc15 100644
--- a/lib/tlTimeline/Edit.h
+++ b/lib/tlTimeline/Edit.h
@@ -13,10 +13,6 @@ namespace tl
{
namespace timeline
{
- //! Find an associated audio or video clip on an adjacent track.
- otio::SerializableObject::Retainer getAssociatedClip(
- const otio::SerializableObject::Retainer&);
-
//! Insert data.
struct InsertData
{
diff --git a/lib/tlTimeline/GLRender.cpp b/lib/tlTimeline/GLRender.cpp
index cdb889b04..d4f334a81 100644
--- a/lib/tlTimeline/GLRender.cpp
+++ b/lib/tlTimeline/GLRender.cpp
@@ -822,8 +822,17 @@ namespace tl
unsigned width = 0;
unsigned height = 0;
OCIO::GpuShaderDesc::TextureType channel = OCIO::GpuShaderDesc::TEXTURE_RGB_CHANNEL;
+ OCIO::GpuShaderCreator::TextureDimensions dimensions = OCIO::GpuShaderDesc::TEXTURE_1D;
OCIO::Interpolation interpolation = OCIO::INTERP_LINEAR;
- p.colorConfigData->shaderDesc->getTexture(i, textureName, samplerName, width, height, channel, interpolation);
+ p.colorConfigData->shaderDesc->getTexture(
+ i,
+ textureName,
+ samplerName,
+ width,
+ height,
+ channel,
+ dimensions,
+ interpolation);
if (!textureName ||
!*textureName ||
!samplerName ||
@@ -851,17 +860,18 @@ namespace tl
format = GL_RED;
}
glGenTextures(1, &textureId);
- if (height > 1)
- {
- glBindTexture(GL_TEXTURE_2D, textureId);
- setTextureParameters(GL_TEXTURE_2D, interpolation);
- glTexImage2D(GL_TEXTURE_2D, 0, internalformat, width, height, 0, format, GL_FLOAT, values);
- }
- else
+ switch (dimensions)
{
+ case OCIO::GpuShaderDesc::TEXTURE_1D:
glBindTexture(GL_TEXTURE_1D, textureId);
setTextureParameters(GL_TEXTURE_1D, interpolation);
glTexImage1D(GL_TEXTURE_1D, 0, internalformat, width, 0, format, GL_FLOAT, values);
+ break;
+ case OCIO::GpuShaderDesc::TEXTURE_2D:
+ glBindTexture(GL_TEXTURE_2D, textureId);
+ setTextureParameters(GL_TEXTURE_2D, interpolation);
+ glTexImage2D(GL_TEXTURE_2D, 0, internalformat, width, height, 0, format, GL_FLOAT, values);
+ break;
}
p.colorConfigData->textures.push_back(OCIOTexture(
textureId,
@@ -977,8 +987,16 @@ namespace tl
unsigned width = 0;
unsigned height = 0;
OCIO::GpuShaderDesc::TextureType channel = OCIO::GpuShaderDesc::TEXTURE_RGB_CHANNEL;
+ OCIO::GpuShaderDesc::TextureDimensions dimensions = OCIO::GpuShaderDesc::TEXTURE_1D;
OCIO::Interpolation interpolation = OCIO::INTERP_LINEAR;
- p.lutData->shaderDesc->getTexture(i, textureName, samplerName, width, height, channel, interpolation);
+ p.lutData->shaderDesc->getTexture(
+ i, textureName,
+ samplerName,
+ width,
+ height,
+ channel,
+ dimensions,
+ interpolation);
if (!textureName ||
!*textureName ||
!samplerName ||
@@ -1006,17 +1024,18 @@ namespace tl
format = GL_RED;
}
glGenTextures(1, &textureId);
- if (height > 1)
- {
- glBindTexture(GL_TEXTURE_2D, textureId);
- setTextureParameters(GL_TEXTURE_2D, interpolation);
- glTexImage2D(GL_TEXTURE_2D, 0, internalformat, width, height, 0, format, GL_FLOAT, values);
- }
- else
+ switch (dimensions)
{
+ case OCIO::GpuShaderDesc::TEXTURE_1D:
glBindTexture(GL_TEXTURE_1D, textureId);
setTextureParameters(GL_TEXTURE_1D, interpolation);
glTexImage1D(GL_TEXTURE_1D, 0, internalformat, width, 0, format, GL_FLOAT, values);
+ break;
+ case OCIO::GpuShaderDesc::TEXTURE_2D:
+ glBindTexture(GL_TEXTURE_2D, textureId);
+ setTextureParameters(GL_TEXTURE_2D, interpolation);
+ glTexImage2D(GL_TEXTURE_2D, 0, internalformat, width, height, 0, format, GL_FLOAT, values);
+ break;
}
p.lutData->textures.push_back(OCIOTexture(
textureId,
diff --git a/lib/tlTimelineUI/CMakeLists.txt b/lib/tlTimelineUI/CMakeLists.txt
index 72a7fd9af..3ad743273 100644
--- a/lib/tlTimelineUI/CMakeLists.txt
+++ b/lib/tlTimelineUI/CMakeLists.txt
@@ -24,7 +24,7 @@ set(SOURCE
VideoClipItem.cpp)
add_library(tlTimelineUI ${HEADERS} ${HEADERS_PRIVATE} ${SOURCE})
-target_link_libraries(tlTimelineUI PUBLIC tlUI tlTimeline PRIVATE ${LIBRARIES_PRIVATE})
+target_link_libraries(tlTimelineUI PUBLIC tlUI PRIVATE ${LIBRARIES_PRIVATE})
set_target_properties(tlTimelineUI PROPERTIES FOLDER lib)
set_target_properties(tlTimelineUI PROPERTIES PUBLIC_HEADER "${HEADERS}")
diff --git a/lib/tlTimelineUI/TimelineItem.cpp b/lib/tlTimelineUI/TimelineItem.cpp
index 7a2419aad..05d0888e1 100644
--- a/lib/tlTimelineUI/TimelineItem.cpp
+++ b/lib/tlTimelineUI/TimelineItem.cpp
@@ -84,7 +84,7 @@ namespace tl
{
int index = -1;
int track = -1;
- math::Box2i geometry;
+ math::Box2i mouse;
math::Box2i draw;
};
struct MouseData
@@ -105,7 +105,10 @@ namespace tl
int& index,
int& trackIndex) const;
- std::vector getDropTargets(int index, int track);
+ std::vector getDropTargets(
+ const math::Box2i& geometry,
+ int index,
+ int track);
};
void TimelineItem::_init(
@@ -400,23 +403,19 @@ namespace tl
math::Box2i(g.min.x, y, g.w(), h),
event.style->getColorRole(ui::ColorRole::Border));
+ _drawInOutPoints(drawRect, event);
+ _drawTimeTicks(drawRect, event);
+ _drawCacheInfo(drawRect, event);
+ _drawCurrentTime(drawRect, event);
+
if (p.mouse.currentDropTarget >= 0 &&
p.mouse.currentDropTarget < p.mouse.dropTargets.size())
{
const auto& dt = p.mouse.dropTargets[p.mouse.currentDropTarget];
- event.render->drawMesh(
- ui::border(dt.draw, p.size.border),
- math::Vector2i(),
- event.style->getColorRole(ui::ColorRole::Border));
event.render->drawRect(
- dt.draw.margin(-p.size.border),
+ dt.draw,
event.style->getColorRole(ui::ColorRole::Green));
}
-
- _drawInOutPoints(drawRect, event);
- _drawTimeTicks(drawRect, event);
- _drawCacheInfo(drawRect, event);
- _drawCurrentTime(drawRect, event);
}
void TimelineItem::mouseMoveEvent(ui::MouseMoveEvent& event)
@@ -443,7 +442,7 @@ namespace tl
int dropTarget = -1;
for (size_t i = 0; i < p.mouse.dropTargets.size(); ++i)
{
- if (p.mouse.dropTargets[i].geometry.contains(event.pos))
+ if (p.mouse.dropTargets[i].mouse.contains(event.pos))
{
dropTarget = i;
break;
@@ -492,7 +491,7 @@ namespace tl
p.mouse.mode = Private::MouseMode::Item;
p.mouse.items.push_back(
std::make_shared(item, j, i));
- p.mouse.dropTargets = p.getDropTargets(j, i);
+ p.mouse.dropTargets = p.getDropTargets(g, j, i);
moveToFront(item);
if (_options.editAssociatedClips)
{
@@ -656,7 +655,6 @@ namespace tl
{
TLRENDER_P();
- const int handle = event.style->getSizeRole(ui::SizeRole::Handle, event.displayScale);
const math::Box2i& g = _geometry;
const std::string labelMax = _data->timeUnitsModel->getLabel(_timeRange.duration());
@@ -666,7 +664,7 @@ namespace tl
const int w = _sizeHint.w;
const float duration = _timeRange.duration().rescaled_to(1.0).value();
const int frameTick = 1.0 / _timeRange.duration().value() * w;
- if (frameTick >= handle)
+ if (frameTick >= p.size.handle)
{
geom::TriangleMesh2 mesh;
size_t i = 1;
@@ -1023,7 +1021,10 @@ namespace tl
return out;
}
- std::vector TimelineItem::Private::getDropTargets(int index, int trackIndex)
+ std::vector TimelineItem::Private::getDropTargets(
+ const math::Box2i& geometry,
+ int index,
+ int trackIndex)
{
std::vector out;
if (trackIndex >= 0 && trackIndex < tracks.size())
@@ -1044,16 +1045,16 @@ namespace tl
MouseItemDropTarget dt;
dt.index = i;
dt.track = trackIndex;
- dt.geometry = math::Box2i(
- g.min.x - g.h() / 2,
- g.min.y,
- g.h(),
- g.h());
- dt.draw = math::Box2i(
+ dt.mouse = math::Box2i(
g.min.x - size.handle,
g.min.y,
size.handle * 2,
g.h());
+ dt.draw = math::Box2i(
+ g.min.x - size.border * 2,
+ size.scrollPos.y + geometry.min.y,
+ size.border * 4,
+ geometry.h());
out.push_back(dt);
}
if (!track.items.empty() && index < (track.items.size() - 1))
@@ -1061,16 +1062,16 @@ namespace tl
MouseItemDropTarget dt;
dt.index = i;
dt.track = trackIndex;
- dt.geometry = math::Box2i(
- g.max.x - g.h() / 2,
- g.min.y,
- g.h(),
- g.h());
- dt.draw = math::Box2i(
+ dt.mouse = math::Box2i(
g.max.x - size.handle,
g.min.y,
size.handle * 2,
g.h());
+ dt.draw = math::Box2i(
+ g.max.x - size.border * 2,
+ size.scrollPos.y + geometry.min.y,
+ size.border * 4,
+ geometry.h());
out.push_back(dt);
}
}
diff --git a/lib/tlUI/CMakeLists.txt b/lib/tlUI/CMakeLists.txt
index eb4cd8335..9bd599c3f 100644
--- a/lib/tlUI/CMakeLists.txt
+++ b/lib/tlUI/CMakeLists.txt
@@ -155,7 +155,7 @@ if(TLRENDER_NFD)
endif()
add_library(tlUI ${HEADERS} ${HEADERS_PRIVATE} ${SOURCE})
-target_link_libraries(tlUI PUBLIC tlIO PRIVATE ${LIBRARIES_PRIVATE})
+target_link_libraries(tlUI PUBLIC tlTimeline PRIVATE ${LIBRARIES_PRIVATE})
set_target_properties(tlUI PROPERTIES FOLDER lib)
set_target_properties(tlUI PROPERTIES PUBLIC_HEADER "${HEADERS}")
diff --git a/lib/tlUI/ThumbnailSystem.cpp b/lib/tlUI/ThumbnailSystem.cpp
index 1b52f8176..226602708 100644
--- a/lib/tlUI/ThumbnailSystem.cpp
+++ b/lib/tlUI/ThumbnailSystem.cpp
@@ -79,6 +79,7 @@ namespace tl
memory::LRUCache > thumbnailCache;
memory::LRUCache > waveformCache;
memory::LRUCache > ioCache;
+ std::chrono::steady_clock::time_point logTimer;
std::condition_variable cv;
std::thread thread;
std::atomic running;
@@ -495,6 +496,7 @@ namespace tl
}
std::shared_ptr buffer;
io::Options ioOptions;
+ p.thread.logTimer = std::chrono::steady_clock::now();
while (p.thread.running)
{
// Check requests.
@@ -727,6 +729,45 @@ namespace tl
}
request->promise.set_value(mesh);
}
+
+ // Logging.
+ {
+ const auto now = std::chrono::steady_clock::now();
+ const std::chrono::duration diff = now - p.thread.logTimer;
+ if (diff.count() > 10.F)
+ {
+ p.thread.logTimer = now;
+ size_t infoRequests = 0;
+ size_t thumbnailRequests = 0;
+ size_t waveformRequests = 0;
+ {
+ std::unique_lock lock(p.mutex.mutex);
+ infoRequests = p.mutex.infoRequests.size();
+ thumbnailRequests = p.mutex.thumbnailRequests.size();
+ waveformRequests = p.mutex.waveformRequests.size();
+ }
+ _log(string::Format(
+ "\n"
+ " Info requests: {0}\n"
+ " Thumbnail requests: {1}\n"
+ " Waveform requests: {2}\n"
+ " Info cache: {3}, {4}%\n"
+ " Thumbnail cache: {5}, {6}%\n"
+ " Waveform cache: {7}, {8}%\n"
+ " I/O cache: {9}, {10}%").
+ arg(infoRequests).
+ arg(thumbnailRequests).
+ arg(waveformRequests).
+ arg(p.thread.infoCache.getSize()).
+ arg(p.thread.infoCache.getPercentage()).
+ arg(p.thread.thumbnailCache.getSize()).
+ arg(p.thread.thumbnailCache.getPercentage()).
+ arg(p.thread.infoCache.getSize()).
+ arg(p.thread.infoCache.getPercentage()).
+ arg(p.thread.ioCache.getSize()).
+ arg(p.thread.ioCache.getPercentage()));
+ }
+ }
}
}
diff --git a/tests/tlCoreTest/PathTest.cpp b/tests/tlCoreTest/PathTest.cpp
index 8d9f3fb8f..5e1f5e244 100644
--- a/tests/tlCoreTest/PathTest.cpp
+++ b/tests/tlCoreTest/PathTest.cpp
@@ -117,6 +117,10 @@ namespace tl
TLRENDER_ASSERT(!p.sequence(Path("render.101.exr")));
TLRENDER_ASSERT("0001-0100" == p.getSequenceString());
}
+ {
+ Path path("render.00000.exr");
+ TLRENDER_ASSERT(path.sequence(Path("render.10000.exr")));
+ }
{
TLRENDER_ASSERT(Path("/").isAbsolute());
TLRENDER_ASSERT(Path("/tmp").isAbsolute());
diff --git a/tests/tlTimelineTest/EditTest.cpp b/tests/tlTimelineTest/EditTest.cpp
index 5cfb6e13c..c52fdf18a 100644
--- a/tests/tlTimelineTest/EditTest.cpp
+++ b/tests/tlTimelineTest/EditTest.cpp
@@ -50,7 +50,6 @@ namespace tl
void EditTest::run()
{
_insert();
- _util();
}
void EditTest::_insert()
@@ -239,61 +238,5 @@ namespace tl
TLRENDER_ASSERT("Video 0" == getChild(otioTimeline3, 0, 0)->name());
}
}
-
- void EditTest::_util()
- {
- {
- otio::SerializableObject::Retainer otioTimeline(new otio::Timeline);
- auto otioTrack = new otio::Track("Video", otio::nullopt, otio::Track::Kind::video);
- otioTimeline->tracks()->append_child(otioTrack);
- otioTrack->append_child(new otio::Clip(
- "Video",
- nullptr,
- otime::TimeRange(
- otime::RationalTime(0.0, 24.0),
- otime::RationalTime(24.0, 24.0))));
- otioTrack = new otio::Track(
- "Audio",
- otio::nullopt,
- otio::Track::Kind::audio);
- otioTimeline->tracks()->append_child(otioTrack);
- otioTrack->append_child(new otio::Clip(
- "Audio",
- nullptr,
- otime::TimeRange(
- otime::RationalTime(0.0, 48000.0),
- otime::RationalTime(48000.0, 48000.0))));
-
- TLRENDER_ASSERT(
- timeline::getAssociatedClip(getClip(otioTimeline, 0, 0)).value ==
- getClip(otioTimeline, 1, 0).value);
- }
- {
- otio::SerializableObject::Retainer otioTimeline(new otio::Timeline);
- auto otioTrack = new otio::Track("Video", otio::nullopt, otio::Track::Kind::video);
- otioTimeline->tracks()->append_child(otioTrack);
- otioTrack->append_child(new otio::Clip(
- "Video",
- nullptr,
- otime::TimeRange(
- otime::RationalTime(0.0, 24.0),
- otime::RationalTime(24.0, 24.0))));
- otioTrack = new otio::Track(
- "Audio",
- otio::nullopt,
- otio::Track::Kind::audio);
- otioTimeline->tracks()->append_child(otioTrack);
- otioTrack->append_child(new otio::Clip(
- "Audio",
- nullptr,
- otime::TimeRange(
- otime::RationalTime(0.0, 48000.0),
- otime::RationalTime(2 * 48000.0, 48000.0))));
-
- TLRENDER_ASSERT(
- timeline::getAssociatedClip(getClip(otioTimeline, 0, 0)).value !=
- getClip(otioTimeline, 1, 0).value);
- }
- }
}
}
diff --git a/tests/tlTimelineTest/EditTest.h b/tests/tlTimelineTest/EditTest.h
index 7637a373a..7a6830dab 100644
--- a/tests/tlTimelineTest/EditTest.h
+++ b/tests/tlTimelineTest/EditTest.h
@@ -22,7 +22,6 @@ namespace tl
private:
void _insert();
- void _util();
};
}
}
diff --git a/tests/tltest/main.cpp b/tests/tltest/main.cpp
index 16c4fa20a..b75d8d3aa 100644
--- a/tests/tltest/main.cpp
+++ b/tests/tltest/main.cpp
@@ -113,8 +113,7 @@ int main(int argc, char* argv[])
std::vector > tests;
if (0)
{
- tests.push_back(app_tests::AppTest::create(context));
- tests.push_back(app_tests::CmdLineTest::create(context));
+ tests.push_back(core_tests::PathTest::create(context));
}
else
{