diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml
index 1b89c513b..56e04b646 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -7,7 +7,6 @@ jobs:
runs-on: ubuntu-latest
env:
- TLRENDER_MMAP: ON
TLRENDER_PYTHON: OFF
TLRENDER_GLFW: ON
TLRENDER_OCIO: ON
@@ -18,6 +17,8 @@ jobs:
TLRENDER_PNG: ON
TLRENDER_EXR: ON
TLRENDER_FFMPEG: ON
+ TLRENDER_USD: OFF
+ TLRENDER_NFD: OFF
TLRENDER_QT5: ON
TLRENDER_PROGRAMS: ON
TLRENDER_EXAMPLES: ON
@@ -29,30 +30,6 @@ jobs:
with:
submodules: recursive
- - name: Update
- run: sudo apt-get update
-
- - name: Install lcov
- if: env.TLRENDER_GCOV == 'ON'
- run: sudo apt-get install lcov
-
- - name: Install OpenGL dev
- run: sudo apt-get install xorg-dev libglu1-mesa-dev mesa-common-dev
-
- - name: Install ALSA dev
- run: sudo apt-get install libasound2-dev
-
- - name: Install PulseAudio dev
- run: sudo apt-get install libpulse-dev
-
- - name: Install Python dev
- if: env.TLRENDER_PYTHON == 'ON'
- run: sudo apt-get install python3.8-dev
-
- - name: Install Qt dev
- if: env.TLRENDER_QT5 == 'ON'
- 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
@@ -60,43 +37,19 @@ jobs:
echo "PYTHONPATH=$PWD/build/install/lib:$PYTHONPATH" >> $GITHUB_ENV
- name: Build tlRender
- run: |
- mkdir build
- cd build
- cmake ../etc/SuperBuild \
- -DCMAKE_BUILD_TYPE=Debug \
- -DCMAKE_INSTALL_PREFIX=$PWD/install \
- -DCMAKE_PREFIX_PATH=$PWD/install \
- -DTLRENDER_MMAP=$TLRENDER_MMAP \
- -DTLRENDER_PYTHON=$TLRENDER_PYTHON \
- -DTLRENDER_GLFW=$TLRENDER_GLFW \
- -DTLRENDER_OCIO=$TLRENDER_OCIO \
- -DTLRENDER_AUDIO=$TLRENDER_AUDIO \
- -DTLRENDER_JPEG=$TLRENDER_JPEG \
- -DTLRENDER_TIFF=$TLRENDER_TIFF \
- -DTLRENDER_STB=$TLRENDER_STB \
- -DTLRENDER_PNG=$TLRENDER_PNG \
- -DTLRENDER_EXR=$TLRENDER_EXR \
- -DTLRENDER_FFMPEG=$TLRENDER_FFMPEG \
- -DTLRENDER_QT5=$TLRENDER_QT5 \
- -DTLRENDER_PROGRAMS=$TLRENDER_PROGRAMS \
- -DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
- -DTLRENDER_TESTS=$TLRENDER_TESTS \
- -DTLRENDER_GCOV=$TLRENDER_GCOV
- cmake --build . -j 4 --config Debug
+ run: bash etc/Linux/linux-build-gha.sh Debug
- name: Run tests
run: |
cd build
cd tlRender/src/tlRender-build
- ctest --rerun-failed --output-on-failure
+ xvfb-run tests/tltest/tltest
- name: Code coverage
if: env.TLRENDER_GCOV == 'ON'
run: |
- cd build
- cd tlRender/src/tlRender-build
- sh ../../../../etc/Linux/lcov.sh
+ cd build/tlRender/src/tlRender-build
+ bash ../../../../etc/Linux/lcov.sh
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
@@ -108,9 +61,8 @@ jobs:
runs-on: ubuntu-latest
env:
- TLRENDER_MMAP: OFF
TLRENDER_PYTHON: OFF
- TLRENDER_GLFW: OFF
+ TLRENDER_GLFW: ON
TLRENDER_OCIO: OFF
TLRENDER_AUDIO: OFF
TLRENDER_JPEG: OFF
@@ -119,23 +71,15 @@ jobs:
TLRENDER_PNG: OFF
TLRENDER_EXR: OFF
TLRENDER_FFMPEG: OFF
+ TLRENDER_USD: OFF
TLRENDER_NFD: OFF
TLRENDER_QT5: OFF
- TLRENDER_PROGRAMS: ON
- TLRENDER_EXAMPLES: ON
TLRENDER_TESTS: ON
- TLRENDER_GCOV: OFF
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
-
- - name: Update
- run: sudo apt-get update
-
- - name: Install OpenGL dev
- run: sudo apt-get install xorg-dev libglu1-mesa-dev mesa-common-dev
- name: Setup environment
run: |
@@ -144,43 +88,18 @@ jobs:
echo "PYTHONPATH=$PWD/build/install/lib:$PYTHONPATH" >> $GITHUB_ENV
- name: Build tlRender
- run: |
- mkdir build
- cd build
- cmake ../etc/SuperBuild \
- -DCMAKE_BUILD_TYPE=Debug \
- -DCMAKE_INSTALL_PREFIX=$PWD/install \
- -DCMAKE_PREFIX_PATH=$PWD/install \
- -DTLRENDER_MMAP=$TLRENDER_MMAP \
- -DTLRENDER_PYTHON=$TLRENDER_PYTHON \
- -DTLRENDER_GLFW=$TLRENDER_GLFW \
- -DTLRENDER_OCIO=$TLRENDER_OCIO \
- -DTLRENDER_AUDIO=$TLRENDER_AUDIO \
- -DTLRENDER_JPEG=$TLRENDER_JPEG \
- -DTLRENDER_TIFF=$TLRENDER_TIFF \
- -DTLRENDER_STB=$TLRENDER_STB \
- -DTLRENDER_PNG=$TLRENDER_PNG \
- -DTLRENDER_EXR=$TLRENDER_EXR \
- -DTLRENDER_FFMPEG=$TLRENDER_FFMPEG \
- -DTLRENDER_NFD=$TLRENDER_NFD \
- -DTLRENDER_QT5=$TLRENDER_QT5 \
- -DTLRENDER_PROGRAMS=$TLRENDER_PROGRAMS \
- -DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
- -DTLRENDER_TESTS=$TLRENDER_TESTS \
- -DTLRENDER_GCOV=$TLRENDER_GCOV
- cmake --build . -j 4 --config Debug
+ run: bash etc/Linux/linux-build-gha.sh Debug
- name: Run tests
run: |
cd build
cd tlRender/src/tlRender-build
- ctest --rerun-failed --output-on-failure
+ xvfb-run tests/tltest/tltest
macos-build:
runs-on: macos-latest
env:
- TLRENDER_MMAP: ON
TLRENDER_PYTHON: OFF
TLRENDER_GLFW: ON
TLRENDER_OCIO: ON
@@ -191,6 +110,7 @@ jobs:
TLRENDER_PNG: ON
TLRENDER_EXR: ON
TLRENDER_FFMPEG: ON
+ TLRENDER_USD: OFF
TLRENDER_NFD: OFF
TLRENDER_QT5: OFF
TLRENDER_PROGRAMS: ON
@@ -214,31 +134,7 @@ jobs:
- name: Build tlRender
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 \
- -DCMAKE_PREFIX_PATH=$PWD/install \
- -DTLRENDER_MMAP=$TLRENDER_MMAP \
- -DTLRENDER_PYTHON=$TLRENDER_PYTHON \
- -DTLRENDER_GLFW=$TLRENDER_GLFW \
- -DTLRENDER_OCIO=$TLRENDER_OCIO \
- -DTLRENDER_AUDIO=$TLRENDER_AUDIO \
- -DTLRENDER_JPEG=$TLRENDER_JPEG \
- -DTLRENDER_TIFF=$TLRENDER_TIFF \
- -DTLRENDER_STB=$TLRENDER_STB \
- -DTLRENDER_PNG=$TLRENDER_PNG \
- -DTLRENDER_EXR=$TLRENDER_EXR \
- -DTLRENDER_FFMPEG=$TLRENDER_FFMPEG \
- -DTLRENDER_NFD=$TLRENDER_NFD \
- -DTLRENDER_QT5=$TLRENDER_QT5 \
- -DTLRENDER_PROGRAMS=$TLRENDER_PROGRAMS \
- -DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
- -DTLRENDER_TESTS=$TLRENDER_TESTS \
- -DTLRENDER_GCOV=$TLRENDER_GCOV \
- -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
- cmake --build . -j 4 --config Debug
+ bash etc/macOS/macos-build-gha.sh Debug
- name: Run tests
run: |
@@ -247,11 +143,11 @@ jobs:
cd tlRender/src/tlRender-build
tests/tltest/tltest
+
windows-build:
runs-on: windows-latest
env:
- TLRENDER_MMAP: ON
TLRENDER_PYTHON: OFF
TLRENDER_GLFW: ON
TLRENDER_OCIO: ON
@@ -262,12 +158,12 @@ jobs:
TLRENDER_PNG: ON
TLRENDER_EXR: ON
TLRENDER_FFMPEG: OFF
+ TLRENDER_USD: OFF
TLRENDER_NFD: OFF
TLRENDER_QT5: OFF
TLRENDER_PROGRAMS: ON
TLRENDER_EXAMPLES: ON
TLRENDER_TESTS: ON
- TLRENDER_GCOV: OFF
steps:
- uses: actions/checkout@v3
@@ -275,40 +171,10 @@ jobs:
submodules: recursive
- name: Setup environment
+ shell: cmd
run: |
- echo "$pwd\build\install\bin;$pwd\build\install\lib;$env:path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
+ echo "%CD%\build\install\bin;%CD%\build\install\lib" >> $GITHUB_PATH
- name: Build tlRender
- run: |
- mkdir build
- cd build
- cmake ..\etc\SuperBuild `
- -DCMAKE_BUILD_TYPE=Debug `
- -DCMAKE_INSTALL_PREFIX=install `
- -DCMAKE_PREFIX_PATH=install `
- -DTLRENDER_MMAP=${{ env.TLRENDER_MMAP }} `
- -DTLRENDER_PYTHON=${{ env.TLRENDER_PYTHON }} `
- -DTLRENDER_GLFW=${{ env.TLRENDER_GLFW }} `
- -DTLRENDER_OCIO=${{ env.TLRENDER_OCIO }} `
- -DTLRENDER_AUDIO=${{ env.TLRENDER_AUDIO }} `
- -DTLRENDER_JPEG=${{ env.TLRENDER_JPEG }} `
- -DTLRENDER_TIFF=${{ env.TLRENDER_TIFF }} `
- -DTLRENDER_STB=${{ env.TLRENDER_STB }} `
- -DTLRENDER_PNG=${{ env.TLRENDER_PNG }} `
- -DTLRENDER_EXR=${{ env.TLRENDER_EXR }} `
- -DTLRENDER_FFMPEG=${{ env.TLRENDER_FFMPEG }} `
- -DTLRENDER_NFD=${{ env.TLRENDER_NFD }} `
- -DTLRENDER_QT5=${{ env.TLRENDER_QT5 }} `
- -DTLRENDER_PROGRAMS=${{ env.TLRENDER_PROGRAMS }} `
- -DTLRENDER_EXAMPLES=${{ env.TLRENDER_EXAMPLES }} `
- -DTLRENDER_TESTS=${{ env.TLRENDER_TESTS }} `
- -DTLRENDER_GCOV=${{ env.TLRENDER_GCOV }}
- cmake --build . -j 4 --config Debug
-
- - name: Run tests
- run: |
- cd build
- cd tlRender\src\tlRender-build
- tests\tltest\Debug\tltest
- #ctest --rerun-failed --output-on-failure
-
+ shell: cmd
+ run: etc\Windows\windows-build-gha.bat Debug
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 27e488c37..c064718b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,7 +24,6 @@ project(
#-------------------------------------------------------------------------------
# Build options
-set(TLRENDER_MMAP TRUE CACHE BOOL "Enable memory-mapped file I/O")
set(TLRENDER_PYTHON FALSE CACHE BOOL "Enable Python support (for OTIO Python adapters)")
set(TLRENDER_API "GL_4_1" CACHE STRING "Graphics API (GL_4_1, GL_4_1_Debug, GLES_2)")
set(TLRENDER_GLFW TRUE CACHE BOOL "Enable support for GLFW")
@@ -60,9 +59,6 @@ set(TLRENDER_GPROF FALSE CACHE BOOL "Enable gprof code profiling")
list(PREPEND CMAKE_MODULE_PATH
${PROJECT_SOURCE_DIR}/cmake/Modules)
-if(TLRENDER_MMAP)
- add_definitions(-DTLRENDER_MMAP)
-endif()
if(TLRENDER_PYTHON)
add_definitions(-DTLRENDER_PYTHON)
endif()
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/cmake/Modules/FindLibRaw.cmake b/cmake/Modules/FindLibRaw.cmake
index 2ef1b17f0..50e02a750 100644
--- a/cmake/Modules/FindLibRaw.cmake
+++ b/cmake/Modules/FindLibRaw.cmake
@@ -2,6 +2,7 @@
#
# This module defines the following variables:
#
+# * LibRaw_FOUND
# * LibRaw_INCLUDE_DIRS
# * LibRaw_LIBRARIES
#
diff --git a/cmake/Modules/FindNFD.cmake b/cmake/Modules/FindNFD.cmake
index d97d37fe8..14238bffe 100644
--- a/cmake/Modules/FindNFD.cmake
+++ b/cmake/Modules/FindNFD.cmake
@@ -42,7 +42,7 @@ set(NFD_LINK_LIBRARIES)
if(WIN32)
list(APPEND NFD_LINK_LIBRARIES ole32 uuid shell32)
elseif(APPLE)
- list(APPEND NFD_LINK_LIBRARIES "-framework AppKit" "-framework UniformTypeIdentifiers")
+ list(APPEND NFD_LINK_LIBRARIES "-framework AppKit")
else()
list(APPEND NFD_LINK_LIBRARIES ${GTK3_LINK_LIBRARIES})
endif()
diff --git a/cmake/Modules/FindtlRender.cmake b/cmake/Modules/FindtlRender.cmake
index a1cfc9368..e7c99e5ff 100644
--- a/cmake/Modules/FindtlRender.cmake
+++ b/cmake/Modules/FindtlRender.cmake
@@ -25,16 +25,26 @@ set(tlRender_VERSION 0.0.1)
find_package(Imath REQUIRED)
find_package(nlohmann_json REQUIRED)
find_package(Freetype REQUIRED)
-find_package(OpenColorIO REQUIRED)
find_package(OTIO REQUIRED)
-find_package(RtAudio REQUIRED)
+find_package(PNG REQUIRED)
find_package(glfw3 REQUIRED)
+find_package(RtAudio)
find_package(libjpeg-turbo)
-find_package(TIFF)
-find_package(PNG)
-find_package(OpenEXR)
-find_package(FFmpeg)
find_package(LibRaw)
+find_package(TIFF)
+
+#
+# These may be installed in cmake or not installed if the setting is off
+#
+if(TLRENDER_OCIO)
+ find_package(OpenColorIO REQUIRED)
+endif()
+if(TLRENDER_EXR)
+ find_package(OpenEXR)
+endif()
+if(TLRENDER_FFMPEG)
+ find_package(FFmpeg)
+endif()
find_path(tlRender_INCLUDE_DIR NAMES tlCore/Util.h PATH_SUFFIXES tlRender)
set(tlRender_INCLUDE_DIRS
@@ -43,15 +53,28 @@ set(tlRender_INCLUDE_DIRS
${nlohmann_json_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
${OTIO_INCLUDE_DIRS}
- ${RtAudio_INCLUDE_DIRS}
${libjpeg-turbo_INCLUDE_DIRS}
- ${TIFF_INCLUDE_DIRS}
- ${PNG_INCLUDE_DIRS}
- ${OpenEXR_INCLUDE_DIRS}
- ${FFmpeg_INCLUDE_DIRS}
- ${LibRaw_INCLUDE_DIRS}
${glfw3_INCLUDE_DIRS})
+if(RtAudio_FOUND)
+ list(APPEND tlRender_INCLUDE_DIRS ${RtAudio_INCLUDE_DIRS})
+endif()
+if(TIFF_FOUND)
+ list(APPEND tlRender_INCLUDE_DIRS ${TIFF_INCLUDE_DIRS})
+endif()
+if(PNG_FOUND)
+ list(APPEND tlRender_INCLUDE_DIRS ${PNG_INCLUDE_DIRS})
+endif()
+if(OpenEXR_FOUND)
+ list(APPEND tlRender_INCLUDE_DIRS ${OpenEXR_INCLUDE_DIRS})
+endif()
+if(FFmpeg_FOUND)
+ list(APPEND tlRender_INCLUDE_DIRS ${FFmpeg_INCLUDE_DIRS})
+endif()
+if(LibRaw_FOUND)
+ list(APPEND tlRender_INCLUDE_DIRS ${LibRaw_INCLUDE_DIRS})
+endif()
+
if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
find_library(tlRender_tlCore_LIBRARY NAMES tlCore)
find_library(tlRender_tlIO_LIBRARY NAMES tlIO)
@@ -108,6 +131,31 @@ mark_as_advanced(
tlRender_tlGL_LIBRARY
tlRender_glad_LIBRARY)
+set(tlRender_tlCore_LIBRARIES "OTIO;Imath::Imath;Freetype::Freetype;nlohmann_json::nlohmann_json" )
+if (OpenColorIO_FOUND)
+ list(APPEND tlRender_tlCore_LIBRARIES OpenColorIO::OpenColorIO)
+endif()
+if (RtAudio_FOUND)
+ list(APPEND tlRender_tlCore_LIBRARIES RtAudio)
+endif()
+set(tlRender_tlIO_LIBRARIES libjpeg-turbo::turbojpeg-static )
+if (PNG_FOUND)
+ list(APPEND tlRender_tlIO_LIBRARIES PNG)
+endif()
+if (TIFF_FOUND)
+ list(APPEND tlRender_tlIO_LIBRARIES TIFF)
+endif()
+if (OpenEXR_FOUND)
+ list(APPEND tlRender_tlIO_LIBRARIES OpenEXR::OpenEXR)
+endif()
+if (FFmpeg_FOUND)
+ list(APPEND tlRender_tlIO_LIBRARIES FFmpeg)
+endif()
+if (LibRaw_FOUND)
+ list(APPEND tlRender_tlIO_LIBRARIES LibRaw)
+endif()
+
+
set(tlRender_COMPILE_DEFINITIONS tlRender_FOUND)
if(tlRender_FOUND AND NOT TARGET tlRender::tlCore)
@@ -116,7 +164,7 @@ if(tlRender_FOUND AND NOT TARGET tlRender::tlCore)
IMPORTED_LOCATION "${tlRender_tlCore_LIBRARY}"
INTERFACE_COMPILE_DEFINITIONS "${tlRender_COMPILE_DEFINITIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${tlRender_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "OTIO;OpenColorIO::OpenColorIO;Imath::Imath;RtAudio;Freetype::Freetype;nlohmann_json::nlohmann_json")
+ INTERFACE_LINK_LIBRARIES "${tlRender_tlCore_LIBRARIES}")
endif()
if(tlRender_FOUND AND NOT TARGET tlRender::tlIO)
add_library(tlRender::tlIO UNKNOWN IMPORTED)
@@ -124,7 +172,7 @@ if(tlRender_FOUND AND NOT TARGET tlRender::tlIO)
IMPORTED_LOCATION "${tlRender_tlIO_LIBRARY}"
INTERFACE_COMPILE_DEFINITIONS "${tlRender_COMPILE_DEFINITIONS}"
INTERFACE_INCLUDE_DIRECTORIES "${tlRender_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES "libjpeg-turbo::turbojpeg-static;TIFF;PNG;OpenEXR::OpenEXR;FFmpeg;LibRaw")
+ INTERFACE_LINK_LIBRARIES "${tlRender_tlIO_LIBRARIES}")
endif()
if(tlRender_FOUND AND NOT TARGET tlRender::tlTimeline)
add_library(tlRender::tlTimeline UNKNOWN IMPORTED)
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/Linux/lcov.sh b/etc/Linux/lcov.sh
index f96faa055..470a9030e 100644
--- a/etc/Linux/lcov.sh
+++ b/etc/Linux/lcov.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-lcov -c -b . -d . -o coverage.info
+lcov -c -b . -d . -o coverage.info --exclude deps
lcov -r coverage.info '*/usr/*' -o coverage_filtered.info
lcov -r coverage_filtered.info '*/install/*' -o coverage_filtered.info
lcov -r coverage_filtered.info '*/tests/*' -o coverage_filtered.info
diff --git a/etc/Linux/linux-build-gha.sh b/etc/Linux/linux-build-gha.sh
new file mode 100644
index 000000000..21ebd6eda
--- /dev/null
+++ b/etc/Linux/linux-build-gha.sh
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+set -x
+
+BUILD_TYPE=$1
+
+# Update packages
+sudo apt-get update
+
+# Install lcov
+if [[ $TLRENDER_GCOV = "ON" ]]
+then
+ sudo apt-get install lcov
+fi
+
+# Install OpenGL support
+sudo apt-get install xorg-dev libglu1-mesa-dev mesa-common-dev mesa-utils xvfb
+xvfb-run glxinfo
+
+# Install ALSA and PulseAudio support
+if [[ $TLRENDER_AUDIO = "ON" ]]
+then
+ sudo apt-get install libasound2-dev
+ sudo apt-get install libpulse-dev
+fi
+
+# Install Python support
+if [[ $TLRENDER_PYTHON = "ON" ]]
+then
+ sudo apt-get install python3.8-dev
+fi
+
+# Install Qt support
+if [[ $TLRENDER_QT5 = "ON" ]]
+then
+ sudo apt-get install qtdeclarative5-dev libqt5quick5 qtbase5-dev libqt5svg5-dev qtchooser qt5-qmake qtbase5-dev-tools
+fi
+
+# Build tlRender
+mkdir build
+cd build
+cmake ../etc/SuperBuild \
+ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
+ -DCMAKE_INSTALL_PREFIX=$PWD/install \
+ -DCMAKE_PREFIX_PATH=$PWD/install \
+ -DTLRENDER_PYTHON=$TLRENDER_PYTHON \
+ -DTLRENDER_GLFW=$TLRENDER_GLFW \
+ -DTLRENDER_OCIO=$TLRENDER_OCIO \
+ -DTLRENDER_AUDIO=$TLRENDER_AUDIO \
+ -DTLRENDER_JPEG=$TLRENDER_JPEG \
+ -DTLRENDER_TIFF=$TLRENDER_TIFF \
+ -DTLRENDER_STB=$TLRENDER_STB \
+ -DTLRENDER_PNG=$TLRENDER_PNG \
+ -DTLRENDER_EXR=$TLRENDER_EXR \
+ -DTLRENDER_FFMPEG=$TLRENDER_FFMPEG \
+ -DTLRENDER_USD=$TLRENDER_USD \
+ -DTLRENDER_QT5=$TLRENDER_QT5 \
+ -DTLRENDER_PROGRAMS=$TLRENDER_PROGRAMS \
+ -DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
+ -DTLRENDER_TESTS=$TLRENDER_TESTS \
+ -DTLRENDER_GCOV=$TLRENDER_GCOV
+cmake --build . -j 4 --config $BUILD_TYPE
diff --git a/etc/SuperBuild/CMakeLists.txt b/etc/SuperBuild/CMakeLists.txt
index 95744de88..e3b4bac16 100644
--- a/etc/SuperBuild/CMakeLists.txt
+++ b/etc/SuperBuild/CMakeLists.txt
@@ -8,7 +8,6 @@ endif()
project(tlRender-SuperBuild)
# Build options.
-set(TLRENDER_MMAP TRUE CACHE BOOL "Enable memory-mapped file I/O")
set(TLRENDER_PYTHON FALSE CACHE BOOL "Enable Python support (for OTIO Python adapters)")
set(TLRENDER_API "GL_4_1" CACHE STRING "Graphics API (GL_4_1, GL_4_1_Debug, GLES_2)")
set(TLRENDER_GLFW TRUE CACHE BOOL "Enable support for GLFW")
@@ -48,7 +47,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)
@@ -138,7 +141,7 @@ if(TLRENDER_RAW)
if(UNIX)
list(APPEND TLRENDER_EXTERNAL_DEPS LCMS2)
endif()
- list(APPEND TLRENDER_EXTERNAL_DEPS LibRaw)
+ list(APPEND TLRENDER_EXTERNAL_DEPS jasper LibRaw)
endif()
if(TLRENDER_NFD)
list(APPEND TLRENDER_EXTERNAL_DEPS NFD)
diff --git a/etc/SuperBuild/LibRaw-patch/CMakeLists.txt b/etc/SuperBuild/LibRaw-patch/CMakeLists.txt
index 758814930..305ecbe3c 100644
--- a/etc/SuperBuild/LibRaw-patch/CMakeLists.txt
+++ b/etc/SuperBuild/LibRaw-patch/CMakeLists.txt
@@ -625,6 +625,9 @@ if (LIBRAW_INSTALL)
if(NOT BUILD_SHARED_LIBS AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
message("ClangCl does not support pdb generation with static libraries")
elseif(MSVC)
+ #
+ # @bug: this would fail compilation on Windows.
+ #
# install(FILES ${PROJECT_BINARY_DIR}/raw.pdb ${PROJECT_BINARY_DIR}/raw_r.pdb
# DESTINATION ${CMAKE_INSTALL_LIBDIR}
# CONFIGURATIONS Debug RelWithDebInfo
diff --git a/etc/SuperBuild/LibRaw-patch/FindLCMS2.cmake b/etc/SuperBuild/LibRaw-patch/FindLCMS2.cmake
new file mode 100644
index 000000000..2e47801b0
--- /dev/null
+++ b/etc/SuperBuild/LibRaw-patch/FindLCMS2.cmake
@@ -0,0 +1,73 @@
+# - Find LCMS2
+# Find the LCMS2 includes and library
+# This module defines
+# LCMS2_INCLUDE_DIR, where to find lcms.h
+# LCMS2_LIBRARIES, the libraries needed to use LCMS2.
+# LCMS2_VERSION, The value of LCMS_VERSION defined in lcms.h
+# LCMS2_FOUND, If false, do not try to use LCMS2.
+
+
+# Copyright (c) 2008, Adrian Page,
+# Copyright (c) 2009, Cyrille Berger,
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying LICENSE file.
+
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+if(NOT WIN32)
+ find_package(PkgConfig)
+ pkg_check_modules(PC_LCMS2 lcms2)
+ set(LCMS2_DEFINITIONS ${PC_LCMS2_CFLAGS_OTHER})
+endif(NOT WIN32)
+
+find_path(LCMS2_INCLUDE_DIR lcms2.h
+ PATHS
+ ${PC_LCMS2_INCLUDEDIR}
+ ${PC_LCMS2_INCLUDE_DIRS}
+ PATH_SUFFIXES lcms2 liblcms2
+)
+
+find_library(LCMS2_LIBRARIES NAMES lcms2 liblcms2 lcms-2 liblcms-2
+ PATHS
+ ${PC_LCMS2_LIBDIR}
+ ${PC_LCMS2_LIBRARY_DIRS}
+ PATH_SUFFIXES lcms2
+)
+
+if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
+ set(LCMS2_FOUND TRUE)
+else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
+ set(LCMS2_FOUND FALSE)
+endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES)
+
+if(LCMS2_FOUND)
+ file(READ ${LCMS2_INCLUDE_DIR}/lcms2.h LCMS2_VERSION_CONTENT)
+ string(REGEX MATCH "#[ ]*define[ ]*LCMS_VERSION[ ]*[0-9]*\n" LCMS2_VERSION_MATCH ${LCMS2_VERSION_CONTENT})
+ if(LCMS2_VERSION_MATCH)
+ string(REGEX REPLACE "#[ ]*define[ ]*LCMS_VERSION[ ]*([0-9]*)\n" "\\1" LCMS2_VERSION ${LCMS2_VERSION_MATCH})
+ message(STATUS "Found lcms version integer ${LCMS_VERSION}")
+ if(NOT LCMS2_FIND_QUIETLY)
+ string(SUBSTRING ${LCMS2_VERSION} 0 1 LCMS2_MAJOR_VERSION)
+ string(SUBSTRING ${LCMS2_VERSION} 1 2 LCMS2_MINOR_VERSION)
+ message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARIES}")
+ endif(NOT LCMS2_FIND_QUIETLY)
+ else(LCMS2_VERSION_MATCH)
+ if(NOT LCMS2_FIND_QUIETLY)
+ message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARIES}")
+ endif(NOT LCMS2_FIND_QUIETLY)
+ set(LCMS2_VERSION NOTFOUND)
+ endif(LCMS2_VERSION_MATCH)
+else(LCMS2_FOUND)
+ if(NOT LCMS2_FIND_QUIETLY)
+ if(LCMS2_FIND_REQUIRED)
+ message(FATAL_ERROR "Required package lcms2 NOT found")
+ else(LCMS2_FIND_REQUIRED)
+ message(STATUS "lcms2 NOT found")
+ endif(LCMS2_FIND_REQUIRED)
+ endif(NOT LCMS2_FIND_QUIETLY)
+endif(LCMS2_FOUND)
+
+mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARIES LCMS2_VERSION)
+
diff --git a/etc/SuperBuild/cmake/Modules/BuildFFmpeg.cmake b/etc/SuperBuild/cmake/Modules/BuildFFmpeg.cmake
index 4a18113ff..2b7cb0178 100644
--- a/etc/SuperBuild/cmake/Modules/BuildFFmpeg.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildFFmpeg.cmake
@@ -19,26 +19,6 @@ else()
list(APPEND FFmpeg_OBJCFLAGS "--extra-objcflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
list(APPEND FFmpeg_LDFLAGS "--extra-ldflags=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()
- if(TLRENDER_VPX)
- list(APPEND FFmpeg_CONFIGURE_ARGS
- --enable-libvpx)
- #
- # Make sure we pick the static libvpx we compiled, not the system one
- #
- list(APPEND FFmpeg_LDFLAGS
- --extra-ldflags="${CMAKE_INSTALL_PREFIX}/lib/libvpx.a")
- list(APPEND FFmpeg_DEPS VPX)
- endif()
- if(TLRENDER_X264)
- list(APPEND FFmpeg_CONFIGURE_ARGS
- --enable-libx264)
- #
- # Make sure we pick the static libx264 we compiled, not the system one
- #
- list(APPEND FFmpeg_LDFLAGS
- --extra-ldflags="${CMAKE_INSTALL_PREFIX}/lib/libx264.a")
- list(APPEND FFmpeg_DEPS X264)
- endif()
if(FFmpeg_DEBUG)
list(APPEND FFmpeg_CFLAGS "--extra-cflags=-g")
list(APPEND FFmpeg_CXXFLAGS "--extra-cxxflags=-g")
@@ -93,6 +73,26 @@ else()
--disable-libxcb-shape
--disable-xlib)
endif()
+ if(TLRENDER_VPX)
+ list(APPEND FFmpeg_CONFIGURE_ARGS
+ --enable-libvpx)
+ #
+ # Make sure we pick the static libvpx we compiled, not the system one
+ #
+ list(APPEND FFmpeg_LDFLAGS
+ --extra-ldflags="${CMAKE_INSTALL_PREFIX}/lib/libvpx.a")
+ list(APPEND FFmpeg_DEPS VPX)
+ endif()
+ if(TLRENDER_X264)
+ list(APPEND FFmpeg_CONFIGURE_ARGS
+ --enable-libx264 --enable-gpl)
+ #
+ # Make sure we pick the static libx264 we compiled, not the system one
+ #
+ list(APPEND FFmpeg_LDFLAGS
+ --extra-ldflags="${CMAKE_INSTALL_PREFIX}/lib/libx264.a")
+ list(APPEND FFmpeg_DEPS X264)
+ endif()
if(FFmpeg_SHARED_LIBS)
list(APPEND FFmpeg_CONFIGURE_ARGS
--disable-static
diff --git a/etc/SuperBuild/cmake/Modules/BuildLibRaw.cmake b/etc/SuperBuild/cmake/Modules/BuildLibRaw.cmake
index 3054c266a..6ad0f1ce3 100644
--- a/etc/SuperBuild/cmake/Modules/BuildLibRaw.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildLibRaw.cmake
@@ -26,19 +26,24 @@ set(LibRaw_ARGS
-DBUILD_SHARED_LIBS=ON
-DBUILD_STATIC_LIBS=OFF
-DENABLE_OPENMP=ON
- -DENABKE_JASPER=OFF
+ -DENABLE_JASPER=ON
-DENABLE_LCMS=ON
+ -DENABLE_X3FTOOLS=ON
-DENABLE_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
)
+#
+# This copies the .cmake files from Libraw-cmake. Two files need patching thou.
+#
set(LibRaw_PATCH
${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/LibRaw-patch/CMakeLists.txt &&
- ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/LibRaw_cmake/src/LibRaw_cmake/cmake /cmake
+ ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/LibRaw_cmake/src/LibRaw_cmake/cmake /cmake &&
+ ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/LibRaw-patch/FindLCMS2.cmake /cmake/modules
)
-set(LibRaw_DEPS LibRaw_cmake ZLIB)
+set(LibRaw_DEPS LibRaw_cmake jasper ZLIB)
if(TLRENDER_JPEG)
list(APPEND LibRaw_DEPS libjpeg-turbo)
endif()
diff --git a/etc/SuperBuild/cmake/Modules/BuildNFD.cmake b/etc/SuperBuild/cmake/Modules/BuildNFD.cmake
index ea12e2477..9b178ae21 100644
--- a/etc/SuperBuild/cmake/Modules/BuildNFD.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildNFD.cmake
@@ -5,6 +5,7 @@ set(NFD_GIT_TAG "v1.0.3")
set(NFD_ARGS
${TLRENDER_EXTERNAL_ARGS}
+ -DNFD_USE_ALLOWEDCONTENTTYPES_IF_AVAILABLE=OFF
-DNFD_BUILD_TESTS=OFF)
ExternalProject_Add(
diff --git a/etc/SuperBuild/cmake/Modules/BuildUSD.cmake b/etc/SuperBuild/cmake/Modules/BuildUSD.cmake
index be4dc6e61..1f822e666 100644
--- a/etc/SuperBuild/cmake/Modules/BuildUSD.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildUSD.cmake
@@ -34,15 +34,6 @@ list(APPEND USD_ARGS --verbose)
set(USD_INSTALL_COMMAND )
-if(WIN32)
- # \todo On Windows the USD cmake build system installs the "*.dll" files
- # and "usd" directory into "lib", however it seems like they need to be
- # in "bin" instead.
- cmake_path(CONVERT ${CMAKE_INSTALL_PREFIX} TO_NATIVE_PATH_LIST cmake_install)
- set(USD_INSTALL_COMMAND
- ${CMAKE_COMMAND} -E copy_directory ${CMAKE_INSTALL_PREFIX}/lib/usd ${CMAKE_INSTALL_PREFIX}/bin/usd
- COMMAND copy "${cmake_install}\\lib\\*.dll" "${cmake_install}\\bin")
-endif()
ExternalProject_Add(
USD
diff --git a/etc/SuperBuild/cmake/Modules/Buildjasper.cmake b/etc/SuperBuild/cmake/Modules/Buildjasper.cmake
new file mode 100644
index 000000000..8ddeb5921
--- /dev/null
+++ b/etc/SuperBuild/cmake/Modules/Buildjasper.cmake
@@ -0,0 +1,30 @@
+include(ExternalProject)
+
+
+set(jasper_GIT_REPOSITORY "https://github.com/jasper-software/jasper.git")
+set(jasper_GIT_TAG version-4.0.0)
+
+set(jasper_ARGS
+ ${TLRENDER_EXTERNAL_ARGS}
+ -DBUILD_SHARED_LIBS=OFF
+ -DJAS_ENABLE_SHARED=OFF
+ -DJAS_ENABLE_PROGRAMS=OFF
+ -DJAS_ENABLE_DOC=OFF
+ -DJAS_ENABLE_OPENGL=OFF
+)
+
+
+set(jasper_DEPS )
+if(TLRENDER_JPEG)
+ list(APPEND jasper_DEPS libjpeg-turbo)
+endif()
+
+ExternalProject_Add(
+ jasper
+ PREFIX ${CMAKE_CURRENT_BINARY_DIR}/jasper
+ GIT_REPOSITORY ${jasper_GIT_REPOSITORY}
+ GIT_TAG ${jasper_GIT_TAG}
+ DEPENDS ${jasper_DEPS}
+ LIST_SEPARATOR |
+ CMAKE_ARGS ${jasper_ARGS}
+)
diff --git a/etc/SuperBuild/cmake/Modules/BuildtlRender.cmake b/etc/SuperBuild/cmake/Modules/BuildtlRender.cmake
index c70b6941d..df2656c02 100644
--- a/etc/SuperBuild/cmake/Modules/BuildtlRender.cmake
+++ b/etc/SuperBuild/cmake/Modules/BuildtlRender.cmake
@@ -2,7 +2,6 @@ include(ExternalProject)
set(tlRender_ARGS
${TLRENDER_EXTERNAL_ARGS}
- -DTLRENDER_MMAP=${TLRENDER_MMAP}
-DTLRENDER_PYTHON=${TLRENDER_PYTHON}
-DTLRENDER_API=${TLRENDER_API}
-DTLRENDER_GLFW=${TLRENDER_GLFW}
diff --git a/etc/Windows/windows-build-gha.bat b/etc/Windows/windows-build-gha.bat
new file mode 100644
index 000000000..966e2fefb
--- /dev/null
+++ b/etc/Windows/windows-build-gha.bat
@@ -0,0 +1,25 @@
+set BUILD_TYPE=%1
+
+mkdir build
+cd build
+cmake ..\etc\SuperBuild ^
+ -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
+ -DCMAKE_INSTALL_PREFIX=install ^
+ -DCMAKE_PREFIX_PATH=install ^
+ -DTLRENDER_PYTHON=%TLRENDER_PYTHON% ^
+ -DTLRENDER_GLFW=%TLRENDER_GLFW% ^
+ -DTLRENDER_OCIO=%TLRENDER_OCIO% ^
+ -DTLRENDER_AUDIO=%TLRENDER_AUDIO% ^
+ -DTLRENDER_JPEG=%TLRENDER_JPEG% ^
+ -DTLRENDER_TIFF=%TLRENDER_TIFF% ^
+ -DTLRENDER_STB=%TLRENDER_STB% ^
+ -DTLRENDER_PNG=%TLRENDER_PNG% ^
+ -DTLRENDER_EXR=%TLRENDER_EXR% ^
+ -DTLRENDER_FFMPEG=%TLRENDER_FFMPEG% ^
+ -DTLRENDER_NFD=%TLRENDER_NFD% ^
+ -DTLRENDER_QT5=%TLRENDER_QT5% ^
+ -DTLRENDER_PROGRAMS=%TLRENDER_PROGRAMS% ^
+ -DTLRENDER_EXAMPLES=%TLRENDER_EXAMPLES% ^
+ -DTLRENDER_TESTS=%TLRENDER_TESTS% ^
+ -DTLRENDER_GCOV=%TLRENDER_GCOV%
+cmake --build . -j 4 --config %BUILD_TYPE%
diff --git a/etc/macOS/macos-build-gha.sh b/etc/macOS/macos-build-gha.sh
new file mode 100644
index 000000000..f473e7512
--- /dev/null
+++ b/etc/macOS/macos-build-gha.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -x
+
+BUILD_TYPE=$1
+
+mkdir build
+cd build
+cmake ../etc/SuperBuild \
+ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
+ -DCMAKE_INSTALL_PREFIX=$PWD/install \
+ -DCMAKE_PREFIX_PATH=$PWD/install \
+ -DTLRENDER_PYTHON=$TLRENDER_PYTHON \
+ -DTLRENDER_GLFW=$TLRENDER_GLFW \
+ -DTLRENDER_OCIO=$TLRENDER_OCIO \
+ -DTLRENDER_AUDIO=$TLRENDER_AUDIO \
+ -DTLRENDER_JPEG=$TLRENDER_JPEG \
+ -DTLRENDER_TIFF=$TLRENDER_TIFF \
+ -DTLRENDER_STB=$TLRENDER_STB \
+ -DTLRENDER_PNG=$TLRENDER_PNG \
+ -DTLRENDER_EXR=$TLRENDER_EXR \
+ -DTLRENDER_FFMPEG=$TLRENDER_FFMPEG \
+ -DTLRENDER_USD=$TLRENDER_USD \
+ -DTLRENDER_NFD=$TLRENDER_NFD \
+ -DTLRENDER_QT5=$TLRENDER_QT5 \
+ -DTLRENDER_PROGRAMS=$TLRENDER_PROGRAMS \
+ -DTLRENDER_EXAMPLES=$TLRENDER_EXAMPLES \
+ -DTLRENDER_TESTS=$TLRENDER_TESTS \
+ -DTLRENDER_GCOV=$TLRENDER_GCOV \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
+cmake --build . -j 4 --config $BUILD_TYPE
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index ab8e9bbde..b761d60bd 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -4,7 +4,6 @@ if(TLRENDER_GLFW)
add_subdirectory(widgets-gl)
endif()
if(TLRENDER_QT6 OR TLRENDER_QT5 AND NOT "${TLRENDER_API}" STREQUAL "GLES_2")
- add_subdirectory(filmstrip-qtwidget)
add_subdirectory(panorama-qtwidget)
add_subdirectory(simple-qtquick)
add_subdirectory(simple-qtwidget)
diff --git a/examples/filmstrip-qtwidget/App.cpp b/examples/filmstrip-qtwidget/App.cpp
deleted file mode 100644
index 2e25d00dd..000000000
--- a/examples/filmstrip-qtwidget/App.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// SPDX-License-Identifier: BSD-3-Clause
-// Copyright (c) 2021-2023 Darby Johnston
-// All rights reserved.
-
-#include "App.h"
-
-#include
-#include
-#include
-
-namespace tl
-{
- namespace examples
- {
- namespace filmstrip_qtwidget
- {
- App::App(
- int& argc,
- char** argv,
- const std::shared_ptr& context) :
- QApplication(argc, argv)
- {
- IApp::_init(
- app::convert(argc, argv),
- context,
- "filmstrip-qwidget",
- "Example using the filmstrip widget.",
- {
- app::CmdLineValueArg::create(
- _input,
- "input",
- "The input timeline.",
- true)
- });
- const int exitCode = getExit();
- if (exitCode != 0)
- {
- exit(exitCode);
- return;
- }
-
- // Initialize Qt.
- setOrganizationName("tlRender");
- setApplicationName("filmstrip-qwidget");
- setStyle("Fusion");
-
- // Create the context object.
- _contextObject.reset(new qt::ContextObject(context, this));
-
- // Create the main window.
- _mainWindow.reset(new MainWindow(_input, _context));
- _mainWindow->show();
- }
-
- App::~App()
- {}
- }
- }
-}
diff --git a/examples/filmstrip-qtwidget/App.h b/examples/filmstrip-qtwidget/App.h
deleted file mode 100644
index 487eae76a..000000000
--- a/examples/filmstrip-qtwidget/App.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// SPDX-License-Identifier: BSD-3-Clause
-// Copyright (c) 2021-2023 Darby Johnston
-// All rights reserved.
-
-#pragma once
-
-#include "MainWindow.h"
-
-#include
-
-#include
-
-#include
-
-namespace tl
-{
- namespace examples
- {
- //! Example using the filmstrip widget.
- namespace filmstrip_qtwidget
- {
- //! Application.
- class App : public QApplication, public app::IApp
- {
- Q_OBJECT
-
- public:
- App(
- int& argc,
- char** argv,
- const std::shared_ptr&);
-
- virtual ~App();
-
- private:
- std::string _input;
- QScopedPointer _contextObject;
- QScopedPointer _mainWindow;
- };
- }
- }
-}
diff --git a/examples/filmstrip-qtwidget/CMakeLists.txt b/examples/filmstrip-qtwidget/CMakeLists.txt
deleted file mode 100644
index 7f5452f3c..000000000
--- a/examples/filmstrip-qtwidget/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-set(HEADERS
- App.h
- MainWindow.h)
-
-set(SOURCE
- App.cpp
- MainWindow.cpp
- main.cpp)
-
-add_executable(filmstrip-qtwidget ${SOURCE} ${HEADERS})
-target_link_libraries(filmstrip-qtwidget tlQtWidget tlApp)
-set_target_properties(filmstrip-qtwidget PROPERTIES FOLDER examples)
diff --git a/examples/filmstrip-qtwidget/MainWindow.cpp b/examples/filmstrip-qtwidget/MainWindow.cpp
deleted file mode 100644
index 70244faef..000000000
--- a/examples/filmstrip-qtwidget/MainWindow.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-// SPDX-License-Identifier: BSD-3-Clause
-// Copyright (c) 2021-2023 Darby Johnston
-// All rights reserved.
-
-#include "MainWindow.h"
-
-#include "App.h"
-
-#include
-
-#include
-
-#include
-#include
-#include
-#include
-
-namespace tl
-{
- namespace examples
- {
- namespace filmstrip_qtwidget
- {
- MainWindow::MainWindow(
- const std::string& input,
- const std::shared_ptr& context,
- QWidget* parent) :
- QMainWindow(parent),
- _context(context)
- {
- setAcceptDrops(true);
-
- _thumbnailObject = new qt::TimelineThumbnailObject(context, this);
-
- _filmstripWidget = new qtwidget::FilmstripWidget(_thumbnailObject);
- _filmstripWidget->setRowCount(5);
- setCentralWidget(_filmstripWidget);
-
- if (!input.empty())
- {
- _open(input);
- }
-
- resize(1280, 720);
- }
-
- MainWindow::~MainWindow()
- {}
-
- void MainWindow::dragEnterEvent(QDragEnterEvent* event)
- {
- const QMimeData* mimeData = event->mimeData();
- if (mimeData->hasUrls())
- {
- event->acceptProposedAction();
- }
- }
-
- void MainWindow::dragMoveEvent(QDragMoveEvent* event)
- {
- const QMimeData* mimeData = event->mimeData();
- if (mimeData->hasUrls())
- {
- event->acceptProposedAction();
- }
- }
-
- void MainWindow::dragLeaveEvent(QDragLeaveEvent* event)
- {
- event->accept();
- }
-
- void MainWindow::dropEvent(QDropEvent* event)
- {
- const QMimeData* mimeData = event->mimeData();
- if (mimeData->hasUrls())
- {
- const auto urlList = mimeData->urls();
- for (int i = 0; i < urlList.size(); ++i)
- {
- _open(urlList[i].toLocalFile().toUtf8().data());
- }
- }
- }
-
- void MainWindow::_open(const std::string& fileName)
- {
- try
- {
- auto timeline = timeline::Timeline::create(
- file::Path(fileName),
- _context);
- _filmstripWidget->setTimeline(timeline);
- }
- catch (const std::exception& e)
- {
- QMessageBox dialog;
- dialog.setText(e.what());
- dialog.exec();
- }
- }
- }
- }
-}
diff --git a/examples/filmstrip-qtwidget/MainWindow.h b/examples/filmstrip-qtwidget/MainWindow.h
deleted file mode 100644
index 204e5ffbf..000000000
--- a/examples/filmstrip-qtwidget/MainWindow.h
+++ /dev/null
@@ -1,49 +0,0 @@
-// SPDX-License-Identifier: BSD-3-Clause
-// Copyright (c) 2021-2023 Darby Johnston
-// All rights reserved.
-
-#pragma once
-
-#include
-
-#include
-
-#include
-
-namespace tl
-{
- namespace examples
- {
- namespace filmstrip_qtwidget
- {
- //! Main window.
- class MainWindow : public QMainWindow
- {
- Q_OBJECT
-
- public:
- MainWindow(
- const std::string& input,
- const std::shared_ptr&,
- QWidget* parent = nullptr);
-
- virtual ~MainWindow();
-
- protected:
- void dragEnterEvent(QDragEnterEvent*) override;
- void dragMoveEvent(QDragMoveEvent*) override;
- void dragLeaveEvent(QDragLeaveEvent*) override;
- void dropEvent(QDropEvent*) override;
-
- private:
- void _open(const std::string&);
-
- std::shared_ptr _context;
- std::string _input;
- std::shared_ptr _timeline;
- qt::TimelineThumbnailObject* _thumbnailObject = nullptr;
- qtwidget::FilmstripWidget* _filmstripWidget = nullptr;
- };
- }
- }
-}
diff --git a/examples/filmstrip-qtwidget/main.cpp b/examples/filmstrip-qtwidget/main.cpp
deleted file mode 100644
index 27045497a..000000000
--- a/examples/filmstrip-qtwidget/main.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// SPDX-License-Identifier: BSD-3-Clause
-// Copyright (c) 2021-2023 Darby Johnston
-// All rights reserved.
-
-#include "App.h"
-
-#include
-
-#include
-
-#include
-
-int main(int argc, char* argv[])
-{
- int r = 1;
- try
- {
- auto context = tl::system::Context::create();
- tl::qtwidget::init(
- tl::qt::DefaultSurfaceFormat::OpenGL_4_1_CoreProfile,
- context);
-#if (QT_VERSION < QT_VERSION_CHECK(6, 5, 0))
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-#endif
- tl::examples::filmstrip_qtwidget::App app(argc, argv, context);
- if (0 == app.getExit())
- {
- r = app.exec();
- }
- }
- catch(const std::exception& e)
- {
- std::cerr << "ERROR: " << e.what() << std::endl;
- }
- return r;
-}
diff --git a/examples/panorama-qtwidget/PanoramaTimelineViewport.cpp b/examples/panorama-qtwidget/PanoramaTimelineViewport.cpp
index 05f46205f..a402039c5 100644
--- a/examples/panorama-qtwidget/PanoramaTimelineViewport.cpp
+++ b/examples/panorama-qtwidget/PanoramaTimelineViewport.cpp
@@ -92,7 +92,7 @@ namespace tl
try
{
// Create the sphere mesh.
- _sphereMesh = geom::createSphere(10.F, 100, 100);
+ _sphereMesh = geom::sphere(10.F, 100, 100);
auto vboData = convert(
_sphereMesh,
gl::VBOType::Pos3_F32_UV_U16,
diff --git a/examples/panorama-qtwidget/main.cpp b/examples/panorama-qtwidget/main.cpp
index 846a673af..4d3d3d6bf 100644
--- a/examples/panorama-qtwidget/main.cpp
+++ b/examples/panorama-qtwidget/main.cpp
@@ -42,9 +42,7 @@ int main(int argc, char* argv[])
new tl::qt::ContextObject(context));
// Create the timeline.
- auto timeline = tl::timeline::Timeline::create(
- tl::file::Path(argv[1]),
- context);
+ auto timeline = tl::timeline::Timeline::create(argv[1], context);
// Create the timeline player.
QScopedPointer timelinePlayer(
diff --git a/examples/render-gl/App.cpp b/examples/render-gl/App.cpp
index e3f695d43..58082cf99 100644
--- a/examples/render-gl/App.cpp
+++ b/examples/render-gl/App.cpp
@@ -123,9 +123,7 @@ namespace tl
if (0 == _exit)
{
// Read the timelines.
- auto timeline = timeline::Timeline::create(
- file::Path(_input),
- _context);
+ auto timeline = timeline::Timeline::create(_input, _context);
auto player = timeline::Player::create(timeline, _context);
_players.push_back(player);
auto ioInfo = player->getIOInfo();
@@ -137,7 +135,7 @@ namespace tl
if (!_options.compareFileName.empty())
{
timeline = timeline::Timeline::create(
- file::Path(_options.compareFileName),
+ _options.compareFileName,
_context);
player = timeline::Player::create(timeline, _context);
player->setExternalTime(_players[0]);
diff --git a/examples/simple-qtquick/App.cpp b/examples/simple-qtquick/App.cpp
index 937fa0c5b..34c17ff0a 100644
--- a/examples/simple-qtquick/App.cpp
+++ b/examples/simple-qtquick/App.cpp
@@ -53,7 +53,7 @@ namespace tl
_timeObject.reset(new qt::TimeObject(_timeUnitsModel, this));
// Open the input file.
- auto timeline = timeline::Timeline::create(file::Path(_input), context);
+ auto timeline = timeline::Timeline::create(_input, context);
auto player = timeline::Player::create(timeline, context);
_timelinePlayer.reset(new qt::TimelinePlayer(player, context));
diff --git a/examples/simple-qtwidget/simple-qtwidget.cpp b/examples/simple-qtwidget/simple-qtwidget.cpp
index de3d06841..b567f7088 100644
--- a/examples/simple-qtwidget/simple-qtwidget.cpp
+++ b/examples/simple-qtwidget/simple-qtwidget.cpp
@@ -41,8 +41,7 @@ int main(int argc, char* argv[])
new tl::qt::ContextObject(context));
// Create the timeline.
- auto timeline = tl::timeline::Timeline::create(
- tl::file::Path(argv[1]), context);
+ auto timeline = tl::timeline::Timeline::create(argv[1], context);
// Create the timeline player.
QSharedPointer timelinePlayer(
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/examples/widgets-gl/DragAndDrop.cpp b/examples/widgets-gl/DragAndDrop.cpp
index 2bdcb41c5..e2ce88de0 100644
--- a/examples/widgets-gl/DragAndDrop.cpp
+++ b/examples/widgets-gl/DragAndDrop.cpp
@@ -96,7 +96,9 @@ namespace tl
_sizeHint = p.label->getSizeHint();
}
- void DragAndDropWidget::drawEvent(const math::Box2i& drawRect, const ui::DrawEvent& event)
+ void DragAndDropWidget::drawEvent(
+ const math::Box2i& drawRect,
+ const ui::DrawEvent& event)
{
IWidget::drawEvent(drawRect, event);
TLRENDER_P();
diff --git a/examples/widgets-gl/ScrollAreas.cpp b/examples/widgets-gl/ScrollAreas.cpp
index 44e5390d6..8e3f795b3 100644
--- a/examples/widgets-gl/ScrollAreas.cpp
+++ b/examples/widgets-gl/ScrollAreas.cpp
@@ -73,12 +73,9 @@ namespace tl
_sizeHint.h = p.cellCount.y * p.cellSize;
}
- void ScrollAreasWidget::clipEvent(
- const math::Box2i& clipRect,
- bool clipped,
- const ui::ClipEvent& event)
+ void ScrollAreasWidget::clipEvent(const math::Box2i& clipRect, bool clipped)
{
- IWidget::clipEvent(clipRect, clipped, event);
+ IWidget::clipEvent(clipRect, clipped);
TLRENDER_P();
if (clipped)
{
diff --git a/examples/widgets-gl/ScrollAreas.h b/examples/widgets-gl/ScrollAreas.h
index 9681752f2..1886bb3e3 100644
--- a/examples/widgets-gl/ScrollAreas.h
+++ b/examples/widgets-gl/ScrollAreas.h
@@ -32,13 +32,8 @@ namespace tl
const std::shared_ptr& parent = nullptr);
void sizeHintEvent(const ui::SizeHintEvent&) override;
- void clipEvent(
- const math::Box2i&,
- bool,
- const ui::ClipEvent&) override;
- void drawEvent(
- const math::Box2i&,
- const ui::DrawEvent&) override;
+ void clipEvent(const math::Box2i&, bool) override;
+ void drawEvent(const math::Box2i&, const ui::DrawEvent&) override;
private:
TLRENDER_PRIVATE();
diff --git a/lib/tlApp/CmdLine.h b/lib/tlApp/CmdLine.h
index b83a299b7..2d1c08b5e 100644
--- a/lib/tlApp/CmdLine.h
+++ b/lib/tlApp/CmdLine.h
@@ -103,7 +103,8 @@ namespace tl
ICmdLineArg(
const std::string& name,
const std::string& help,
- bool optional);
+ bool optional,
+ bool unused = false);
public:
virtual ~ICmdLineArg() = 0;
@@ -119,11 +120,15 @@ namespace tl
//! Get whether this argument is optional.
bool isOptional() const;
+
+ //! Get whether this argument is for unused arguments.
+ bool isUnused() const;
protected:
std::string _name;
std::string _help;
bool _optional = false;
+ bool _unused = false;
};
//! Command line value argument.
@@ -135,7 +140,8 @@ namespace tl
T& value,
const std::string& name,
const std::string& help,
- bool optional);
+ bool optional,
+ bool unused = false);
public:
//! Create a new command line argument.
@@ -143,7 +149,8 @@ namespace tl
T& value,
const std::string& name,
const std::string& help,
- bool optional = false);
+ bool optional = false,
+ bool unused = false);
void parse(std::vector& args) override;
diff --git a/lib/tlApp/CmdLineInline.h b/lib/tlApp/CmdLineInline.h
index 35de8d153..5154263a7 100644
--- a/lib/tlApp/CmdLineInline.h
+++ b/lib/tlApp/CmdLineInline.h
@@ -6,6 +6,7 @@
#include
#include
+#include
namespace tl
{
@@ -112,10 +113,12 @@ namespace tl
inline ICmdLineArg::ICmdLineArg(
const std::string& name,
const std::string& help,
- bool optional) :
+ bool optional,
+ bool unused) :
_name(name),
_help(help),
- _optional(optional)
+ _optional(optional),
+ _unused(unused)
{}
inline ICmdLineArg::~ICmdLineArg()
@@ -136,13 +139,19 @@ namespace tl
return _optional;
}
+ inline bool ICmdLineArg::isUnused() const
+ {
+ return _unused;
+ }
+
template
inline CmdLineValueArg::CmdLineValueArg(
T& value,
const std::string& name,
const std::string& help,
- bool optional) :
- ICmdLineArg(name, help, optional),
+ bool optional,
+ bool unused) :
+ ICmdLineArg(name, help, optional, unused),
_value(value)
{}
@@ -151,9 +160,10 @@ namespace tl
T& value,
const std::string& name,
const std::string& help,
- bool optional)
+ bool optional,
+ bool unused)
{
- return std::shared_ptr >(new CmdLineValueArg(value, name, help, optional));
+ return std::shared_ptr >(new CmdLineValueArg(value, name, help, optional, unused));
}
template
diff --git a/lib/tlApp/IApp.cpp b/lib/tlApp/IApp.cpp
index 4e487bebf..2024319ae 100644
--- a/lib/tlApp/IApp.cpp
+++ b/lib/tlApp/IApp.cpp
@@ -115,6 +115,11 @@ namespace tl
return _exit;
}
+ const std::vector IApp::getUnusedArgs() const
+ {
+ return _unusedArgs;
+ }
+
void IApp::_log(const std::string& value, log::Type type)
{
_context->log(_p->cmdLine.name, value, type);
@@ -151,11 +156,16 @@ namespace tl
arg(e.what()));
}
}
+ bool unusedArgs = false;
size_t requiredArgs = 0;
size_t optionalArgs = 0;
for (const auto& i : p.cmdLine.args)
{
- if (!i->isOptional())
+ if (i->isUnused())
+ {
+ unusedArgs = true;
+ }
+ else if (!i->isOptional())
{
++requiredArgs;
}
@@ -165,8 +175,8 @@ namespace tl
}
}
if (p.cmdLine.argv.size() < requiredArgs ||
- p.cmdLine.argv.size() > requiredArgs + optionalArgs ||
- _options.help)
+ (p.cmdLine.argv.size() > requiredArgs + optionalArgs &&
+ !unusedArgs) || _options.help)
{
_printCmdLineHelp();
return 1;
@@ -175,9 +185,17 @@ namespace tl
{
try
{
- if (!(p.cmdLine.argv.empty() && i->isOptional()))
+ if (!p.cmdLine.argv.empty())
{
- i->parse(p.cmdLine.argv);
+ if(i->isUnused())
+ {
+ _unusedArgs = p.cmdLine.argv;
+ break;
+ }
+ if (i->isOptional())
+ {
+ i->parse(p.cmdLine.argv);
+ }
}
}
catch (const std::exception& e)
@@ -199,23 +217,26 @@ namespace tl
{
std::stringstream ss;
ss << " " + p.cmdLine.name;
+ if (p.cmdLine.options.size())
+ {
+ ss << " [options]...";
+ }
if (p.cmdLine.args.size())
{
std::vector args;
for (const auto& i : p.cmdLine.args)
{
const bool optional = i->isOptional();
+ const bool unused = i->isUnused();
args.push_back(
(optional ? "[" : "(") +
string::toLower(i->getName()) +
(optional ? "]" : ")"));
+ if (unused)
+ args.push_back("...");
}
ss << " " << string::join(args, " ");
}
- if (p.cmdLine.options.size())
- {
- ss << " [option],...";
- }
_print(ss.str());
_printNewline();
}
diff --git a/lib/tlApp/IApp.h b/lib/tlApp/IApp.h
index 3919ffc5b..dc3292435 100644
--- a/lib/tlApp/IApp.h
+++ b/lib/tlApp/IApp.h
@@ -62,6 +62,9 @@ namespace tl
//! Get the exit code.
int getExit() const;
+ //! Get unused arguments
+ const std::vector getUnusedArgs() const;
+
protected:
void _log(const std::string&, log::Type = log::Type::Message);
@@ -69,6 +72,7 @@ namespace tl
void _printNewline();
void _printError(const std::string&);
+ std::vector _unusedArgs;
std::shared_ptr _context;
Options _options;
int _exit = 0;
diff --git a/lib/tlBakeApp/App.cpp b/lib/tlBakeApp/App.cpp
index f188d5d4e..b2dffa321 100644
--- a/lib/tlBakeApp/App.cpp
+++ b/lib/tlBakeApp/App.cpp
@@ -253,7 +253,7 @@ namespace tl
static_cast(gl::GLFWWindowOptions::MakeCurrent));
// Read the timeline.
- _timeline = timeline::Timeline::create(file::Path(_input), _context);
+ _timeline = timeline::Timeline::create(_input, _context);
_timeRange = _timeline->getTimeRange();
_print(string::Format("Timeline range: {0}-{1}").
arg(_timeRange.start_time().value()).
@@ -285,7 +285,7 @@ namespace tl
// Create the renderer.
_render = timeline::GLRender::create(_context);
gl::OffscreenBufferOptions offscreenBufferOptions;
- offscreenBufferOptions.colorType = gl::OffscreenColorDefault;
+ offscreenBufferOptions.colorType = gl::offscreenColorDefault;
_buffer = gl::OffscreenBuffer::create(_renderSize, offscreenBufferOptions);
// Create the writer.
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/Audio.cpp b/lib/tlCore/Audio.cpp
index 4cdd8e7ab..3d3795d1a 100644
--- a/lib/tlCore/Audio.cpp
+++ b/lib/tlCore/Audio.cpp
@@ -459,7 +459,7 @@ namespace tl
return out;
}
- void copy(std::list >& in, uint8_t* out, size_t sampleCount)
+ void move(std::list >& in, uint8_t* out, size_t sampleCount)
{
size_t size = 0;
while (!in.empty() && (size + in.front()->getSampleCount() <= sampleCount))
diff --git a/lib/tlCore/Audio.h b/lib/tlCore/Audio.h
index 98fb6ea30..d41b47cea 100644
--- a/lib/tlCore/Audio.h
+++ b/lib/tlCore/Audio.h
@@ -216,8 +216,8 @@ namespace tl
//! Get the total sample count from a list of audio data.
size_t getSampleCount(const std::list >&);
- //! Copy audio data.
- void copy(
+ //! Move audio data.
+ void move(
std::list >& in,
uint8_t* out,
size_t byteCount);
diff --git a/lib/tlCore/AudioConvert.cpp b/lib/tlCore/AudioResample.cpp
similarity index 88%
rename from lib/tlCore/AudioConvert.cpp
rename to lib/tlCore/AudioResample.cpp
index 4c4b84b92..bc3b5c95b 100644
--- a/lib/tlCore/AudioConvert.cpp
+++ b/lib/tlCore/AudioResample.cpp
@@ -2,7 +2,7 @@
// Copyright (c) 2021-2023 Darby Johnston
// All rights reserved.
-#include
+#include
#if defined(TLRENDER_FFMPEG)
extern "C"
@@ -35,7 +35,7 @@ namespace tl
}
- struct AudioConvert::Private
+ struct AudioResample::Private
{
audio::Info inputInfo;
audio::Info outputInfo;
@@ -44,7 +44,7 @@ namespace tl
#endif // TLRENDER_FFMPEG
};
- void AudioConvert::_init(
+ void AudioResample::_init(
const audio::Info& inputInfo,
const audio::Info& outputInfo)
{
@@ -78,11 +78,11 @@ namespace tl
#endif // TLRENDER_FFMPEG
}
- AudioConvert::AudioConvert() :
+ AudioResample::AudioResample() :
_p(new Private())
{}
- AudioConvert::~AudioConvert()
+ AudioResample::~AudioResample()
{
TLRENDER_P();
#if defined(TLRENDER_FFMPEG)
@@ -93,26 +93,26 @@ namespace tl
#endif // TLRENDER_FFMPEG
}
- std::shared_ptr AudioConvert::create(
+ std::shared_ptr AudioResample::create(
const audio::Info& inputInfo,
const audio::Info& outputInfo)
{
- auto out = std::shared_ptr(new AudioConvert);
+ auto out = std::shared_ptr(new AudioResample);
out->_init(inputInfo, outputInfo);
return out;
}
- const audio::Info& AudioConvert::getInputInfo() const
+ const audio::Info& AudioResample::getInputInfo() const
{
return _p->inputInfo;
}
- const audio::Info& AudioConvert::getOutputInfo() const
+ const audio::Info& AudioResample::getOutputInfo() const
{
return _p->outputInfo;
}
- std::shared_ptr