diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml
index 371e299..9031a31 100644
--- a/.github/workflows/ci-workflow.yml
+++ b/.github/workflows/ci-workflow.yml
@@ -10,6 +10,9 @@ jobs:
linux-build:
runs-on: ubuntu-latest
+ env:
+ FFMPEG_MINIMAL: ON
+
steps:
- uses: actions/checkout@v4
with:
@@ -35,6 +38,9 @@ jobs:
linux-package:
runs-on: ubuntu-latest
+ env:
+ FFMPEG_MINIMAL: ON
+
steps:
- uses: actions/checkout@v4
with:
@@ -73,6 +79,9 @@ jobs:
macos-13-build:
runs-on: macos-13
+ env:
+ FFMPEG_MINIMAL: ON
+
steps:
- uses: actions/checkout@v4
with:
@@ -97,6 +106,9 @@ jobs:
macos-build:
runs-on: macos-latest
+ env:
+ FFMPEG_MINIMAL: ON
+
steps:
- uses: actions/checkout@v4
with:
@@ -121,6 +133,9 @@ jobs:
macos-package:
runs-on: macos-latest
+ env:
+ FFMPEG_MINIMAL: ON
+
steps:
- uses: actions/checkout@v4
with:
@@ -158,6 +173,9 @@ jobs:
windows-build:
runs-on: windows-latest
+ env:
+ FFMPEG_MINIMAL: ON
+
steps:
- uses: actions/checkout@v4
with:
@@ -188,6 +206,9 @@ jobs:
windows-package:
runs-on: windows-latest
+ env:
+ FFMPEG_MINIMAL: ON
+
steps:
- uses: actions/checkout@v4
with:
diff --git a/cmake/SuperBuild/BuildFFmpeg.cmake b/cmake/SuperBuild/BuildFFmpeg.cmake
index 955d90e..0ab8904 100644
--- a/cmake/SuperBuild/BuildFFmpeg.cmake
+++ b/cmake/SuperBuild/BuildFFmpeg.cmake
@@ -82,8 +82,10 @@ set(FFmpeg_CONFIGURE_ARGS
--disable-cuda-llvm
--disable-cuvid
--disable-d3d11va
+ --disable-d3d12va
--disable-dxva2
--disable-ffnvcodec
+ --disable-mediafoundation
--disable-nvdec
--disable-nvenc
--disable-v4l2-m2m
diff --git a/data/Gap.otio b/data/Gap.otio
index 9eeef9a..4dbcb89 100644
--- a/data/Gap.otio
+++ b/data/Gap.otio
@@ -25,7 +25,7 @@
"value": 0
}
},
- "target_url": "Letter_A.png"
+ "target_url": "Letter_A.svg"
},
"source_range": {
"OTIO_SCHEMA": "TimeRange.1",
@@ -76,7 +76,7 @@
"value": 0
}
},
- "target_url": "Letter_C.png"
+ "target_url": "Letter_C.svg"
},
"source_range": {
"OTIO_SCHEMA": "TimeRange.1",
diff --git a/data/toucan.svg b/data/toucan.svg
new file mode 100644
index 0000000..b343552
--- /dev/null
+++ b/data/toucan.svg
@@ -0,0 +1,78 @@
+
+
+
+
diff --git a/legal/LICENSE_FFmpeg.txt b/legal/LICENSE_FFmpeg.txt
new file mode 100644
index 0000000..ba65b05
--- /dev/null
+++ b/legal/LICENSE_FFmpeg.txt
@@ -0,0 +1,120 @@
+# License
+
+Most files in FFmpeg are under the GNU Lesser General Public License version 2.1
+or later (LGPL v2.1+). Read the file `COPYING.LGPLv2.1` for details. Some other
+files have MIT/X11/BSD-style licenses. In combination the LGPL v2.1+ applies to
+FFmpeg.
+
+Some optional parts of FFmpeg are licensed under the GNU General Public License
+version 2 or later (GPL v2+). See the file `COPYING.GPLv2` for details. None of
+these parts are used by default, you have to explicitly pass `--enable-gpl` to
+configure to activate them. In this case, FFmpeg's license changes to GPL v2+.
+
+Specifically, the GPL parts of FFmpeg are:
+
+- libpostproc
+- optional x86 optimization in the files
+ - `libavcodec/x86/flac_dsp_gpl.asm`
+ - `libavcodec/x86/idct_mmx.c`
+ - `libavfilter/x86/vf_removegrain.asm`
+- the following building and testing tools
+ - `compat/solaris/make_sunver.pl`
+ - `doc/t2h.pm`
+ - `doc/texi2pod.pl`
+ - `libswresample/swresample-test.c`
+ - `tests/checkasm/*`
+ - `tests/tiny_ssim.c`
+- the following filters in libavfilter:
+ - `vf_blackframe.c`
+ - `vf_boxblur.c`
+ - `vf_colormatrix.c`
+ - `vf_cover_rect.c`
+ - `vf_cropdetect.c`
+ - `vf_delogo.c`
+ - `vf_eq.c`
+ - `vf_find_rect.c`
+ - `vf_fspp.c`
+ - `vf_geq.c`
+ - `vf_histeq.c`
+ - `vf_hqdn3d.c`
+ - `vf_interlace.c`
+ - `vf_kerndeint.c`
+ - `vf_mcdeint.c`
+ - `vf_mpdecimate.c`
+ - `vf_owdenoise.c`
+ - `vf_perspective.c`
+ - `vf_phase.c`
+ - `vf_pp.c`
+ - `vf_pp7.c`
+ - `vf_pullup.c`
+ - `vf_repeatfields.c`
+ - `vf_sab.c`
+ - `vf_smartblur.c`
+ - `vf_spp.c`
+ - `vf_stereo3d.c`
+ - `vf_super2xsai.c`
+ - `vf_tinterlace.c`
+ - `vf_uspp.c`
+ - `vsrc_mptestsrc.c`
+
+Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then
+the configure parameter `--enable-version3` will activate this licensing option
+for you. Read the file `COPYING.LGPLv3` or, if you have enabled GPL parts,
+`COPYING.GPLv3` to learn the exact legal terms that apply in this case.
+
+There are a handful of files under other licensing terms, namely:
+
+* The files `libavcodec/jfdctfst.c`, `libavcodec/jfdctint_template.c` and
+ `libavcodec/jrevdct.c` are taken from libjpeg, see the top of the files for
+ licensing details. Specifically note that you must credit the IJG in the
+ documentation accompanying your program if you only distribute executables.
+ You must also indicate any changes including additions and deletions to
+ those three files in the documentation.
+* `tests/reference.pnm` is under the expat license.
+
+
+## External libraries
+
+FFmpeg can be combined with a number of external libraries, which sometimes
+affect the licensing of binaries resulting from the combination.
+
+### Compatible libraries
+
+The following libraries are under GPL:
+- frei0r
+- libcdio
+- librubberband
+- libvidstab
+- libx264
+- libx265
+- libxavs
+- libxvid
+
+When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
+passing `--enable-gpl` to configure.
+
+The OpenCORE and VisualOn libraries are under the Apache License 2.0. That
+license is incompatible with the LGPL v2.1 and the GPL v2, but not with
+version 3 of those licenses. So to combine these libraries with FFmpeg, the
+license version needs to be upgraded by passing `--enable-version3` to configure.
+
+### Incompatible libraries
+
+There are certain libraries you can combine with FFmpeg whose licenses are not
+compatible with the GPL and/or the LGPL. If you wish to enable these
+libraries, even in circumstances that their license may be incompatible, pass
+`--enable-nonfree` to configure. But note that if you enable any of these
+libraries the resulting binary will be under a complex license mix that is
+more restrictive than the LGPL and that may result in additional obligations.
+It is possible that these restrictions cause the resulting binary to be
+unredistributable.
+
+The Fraunhofer FDK AAC and OpenSSL libraries are under licenses which are
+incompatible with the GPLv2 and v3. To the best of our knowledge, they are
+compatible with the LGPL.
+
+The NVENC library, while its header file is licensed under the compatible MIT
+license, requires a proprietary binary blob at run time, and is deemed to be
+incompatible with the GPL. We are not certain if it is compatible with the
+LGPL, but we require `--enable-nonfree` even with LGPL configurations in case
+it is not.
diff --git a/legal/LICENSE_feather-tk.txt b/legal/LICENSE_feather-tk.txt
new file mode 100644
index 0000000..f1e3a99
--- /dev/null
+++ b/legal/LICENSE_feather-tk.txt
@@ -0,0 +1,27 @@
+Copyright (c) 2024-2025 Darby Johnston
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions, and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions, and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+* Neither the names of the copyright holders nor the names of any
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/legal/LICENSE_lunasvg.txt b/legal/LICENSE_lunasvg.txt
new file mode 100644
index 0000000..0c17a4b
--- /dev/null
+++ b/legal/LICENSE_lunasvg.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020-2024 Samuel Ugochukwu
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/lib/toucanRender/CMakeLists.txt b/lib/toucanRender/CMakeLists.txt
index 710e691..a27d40f 100644
--- a/lib/toucanRender/CMakeLists.txt
+++ b/lib/toucanRender/CMakeLists.txt
@@ -48,6 +48,7 @@ set(LIBS_PUBLIC
ftk::feather-tk-core
OTIO::opentimelineio
OTIO::opentime
+ lunasvg::lunasvg
OpenImageIO::OpenImageIO
MINIZIP::minizip)
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
diff --git a/lib/toucanRender/ImageGraph.cpp b/lib/toucanRender/ImageGraph.cpp
index 92d718e..e6646b5 100644
--- a/lib/toucanRender/ImageGraph.cpp
+++ b/lib/toucanRender/ImageGraph.cpp
@@ -64,6 +64,10 @@ namespace toucan
{
read = std::make_shared(path, nullptr, mem);
}
+ else if (SVGReadNode::hasExtension(path.extension().string()))
+ {
+ read = std::make_shared(path, nullptr, mem);
+ }
else
{
read = std::make_shared(path, nullptr, mem);
@@ -358,6 +362,10 @@ namespace toucan
{
read = std::make_shared(path, externalRef, mem);
}
+ else if (SVGReadNode::hasExtension(path.extension().string()))
+ {
+ read = std::make_shared(path, externalRef, mem);
+ }
else
{
read = std::make_shared(path, externalRef, mem);
diff --git a/lib/toucanRender/Read.cpp b/lib/toucanRender/Read.cpp
index 7885033..c0b1ba5 100644
--- a/lib/toucanRender/Read.cpp
+++ b/lib/toucanRender/Read.cpp
@@ -122,6 +122,86 @@ namespace toucan
return i != extensions.end();
}
+ SVGReadNode::SVGReadNode(
+ const std::filesystem::path& path,
+ const OTIO_NS::MediaReference* ref,
+ const MemoryReference& memoryReference,
+ const std::vector >& inputs) :
+ IReadNode(ref, "SVGRead", inputs),
+ _path(path)
+ {
+ if (memoryReference.isValid())
+ {
+ _svg = lunasvg::Document::loadFromData(
+ reinterpret_cast(memoryReference.getData()),
+ memoryReference.getSize());
+ }
+ else
+ {
+ _svg = lunasvg::Document::loadFromFile(path.u8string());
+ }
+ if (!_svg)
+ {
+ std::stringstream ss;
+ ss << "Cannot open file: " << _path.string();
+ throw std::runtime_error(ss.str());
+ }
+ _spec = OIIO::ImageSpec(
+ _svg->width(),
+ _svg->height(),
+ 4,
+ OIIO::TypeDesc::BASETYPE::UINT8);
+ }
+
+ SVGReadNode::~SVGReadNode()
+ {}
+
+ std::string SVGReadNode::getLabel() const
+ {
+ std::stringstream ss;
+ ss << "Read: " << _path.filename().string();
+ return ss.str();
+ }
+
+ OIIO::ImageBuf SVGReadNode::exec()
+ {
+ OIIO::ImageBuf out;
+
+ const int w = _svg->width();
+ const int h = _svg->height();
+ auto bitmap = _svg->renderToBitmap(w, h, 0x00000000);
+ if (!bitmap.isNull())
+ {
+ out = OIIO::ImageBuf(_spec);
+ for (int y = 0; y < h; ++y)
+ {
+ uint8_t* imageP = reinterpret_cast(out.localpixels()) + y * w * 4;
+ const uint8_t* bitmapP = bitmap.data() + y * w * 4;
+ for (int x = 0; x < w; ++x, imageP += 4, bitmapP += 4)
+ {
+ imageP[0] = bitmapP[2];
+ imageP[1] = bitmapP[1];
+ imageP[2] = bitmapP[0];
+ imageP[3] = bitmapP[3];
+ }
+ }
+ }
+
+ return out;
+ }
+
+ std::vector SVGReadNode::getExtensions()
+ {
+ return std::vector({ ".svg" });
+ }
+
+ bool SVGReadNode::hasExtension(const std::string& value)
+ {
+ const std::vector extensions = getExtensions();
+ const auto i = std::find(extensions.begin(), extensions.end(), toLower(value));
+ return i != extensions.end();
+ }
+
SequenceReadNode::SequenceReadNode(
const std::string& base,
const std::string& namePrefix,
diff --git a/lib/toucanRender/Read.h b/lib/toucanRender/Read.h
index e4c4784..47e224c 100644
--- a/lib/toucanRender/Read.h
+++ b/lib/toucanRender/Read.h
@@ -9,6 +9,8 @@
#include
+#include
+
#include
#include
@@ -45,8 +47,8 @@ namespace toucan
ImageReadNode(
const std::filesystem::path&,
const OTIO_NS::MediaReference*,
- const MemoryReference& = {},
- const std::vector >& = {});
+ const MemoryReference & = {},
+ const std::vector > & = {});
virtual ~ImageReadNode();
@@ -62,7 +64,31 @@ namespace toucan
std::filesystem::path _path;
std::shared_ptr _memoryReader;
std::unique_ptr _input;
- OTIO_NS::TimeRange _timeRange;
+ };
+
+ //! SVG read node.
+ class SVGReadNode : public IReadNode
+ {
+ public:
+ SVGReadNode(
+ const std::filesystem::path&,
+ const OTIO_NS::MediaReference*,
+ const MemoryReference& = {},
+ const std::vector >& = {});
+
+ virtual ~SVGReadNode();
+
+ std::string getLabel() const override;
+
+ OIIO::ImageBuf exec() override;
+
+ static std::vector getExtensions();
+
+ static bool hasExtension(const std::string&);
+
+ private:
+ std::filesystem::path _path;
+ std::unique_ptr _svg;
};
//! Image sequence read node.
diff --git a/lib/toucanRender/TimelineWrapper.cpp b/lib/toucanRender/TimelineWrapper.cpp
index 5e73bd0..f44a96a 100644
--- a/lib/toucanRender/TimelineWrapper.cpp
+++ b/lib/toucanRender/TimelineWrapper.cpp
@@ -255,24 +255,36 @@ namespace toucan
clip->set_source_range(read->getTimeRange());
}
else if (ImageReadNode::hasExtension(path.extension().string()) ||
+ SVGReadNode::hasExtension(path.extension().string()) ||
SequenceReadNode::hasExtension(path.extension().string()))
{
const auto sequence = getSequence(path);
const auto split = splitFileNameNumber(sequence.front().stem().string());
if (split.second.empty())
{
- auto read = std::make_shared(path, nullptr);
- _timeline = OTIO_NS::SerializableObject::Retainer(new OTIO_NS::Timeline);
- OTIO_NS::SerializableObject::Retainer track(new OTIO_NS::Track("Video"));
- _timeline->tracks()->append_child(track);
- OTIO_NS::SerializableObject::Retainer clip(new OTIO_NS::Clip);
- track->append_child(clip);
- OTIO_NS::SerializableObject::Retainer ref(
- new OTIO_NS::ExternalReference(path.string()));
- clip->set_media_reference(ref);
- clip->set_source_range(OTIO_NS::TimeRange(
- OTIO_NS::RationalTime(0.0, 24.0),
- OTIO_NS::RationalTime(1.0, 24.0)));
+ std::shared_ptr read;
+ if (ImageReadNode::hasExtension(path.extension().u8string()))
+ {
+ read = std::make_shared(path, nullptr);
+ }
+ else if (SVGReadNode::hasExtension(path.extension().u8string()))
+ {
+ read = std::make_shared(path, nullptr);
+ }
+ if (read)
+ {
+ _timeline = OTIO_NS::SerializableObject::Retainer(new OTIO_NS::Timeline);
+ OTIO_NS::SerializableObject::Retainer track(new OTIO_NS::Track("Video"));
+ _timeline->tracks()->append_child(track);
+ OTIO_NS::SerializableObject::Retainer clip(new OTIO_NS::Clip);
+ track->append_child(clip);
+ OTIO_NS::SerializableObject::Retainer ref(
+ new OTIO_NS::ExternalReference(path.string()));
+ clip->set_media_reference(ref);
+ clip->set_source_range(OTIO_NS::TimeRange(
+ OTIO_NS::RationalTime(0.0, 24.0),
+ OTIO_NS::RationalTime(1.0, 24.0)));
+ }
}
else
{
diff --git a/lib/toucanView/FileMenu.cpp b/lib/toucanView/FileMenu.cpp
index 32fa71e..40c6e1a 100644
--- a/lib/toucanView/FileMenu.cpp
+++ b/lib/toucanView/FileMenu.cpp
@@ -46,6 +46,8 @@ namespace toucan
std::vector extensions;
std::vector extensionsTmp = ImageReadNode::getExtensions();
extensions.insert(extensions.end(), extensionsTmp.begin(), extensionsTmp.end());
+ extensionsTmp = SVGReadNode::getExtensions();
+ extensions.insert(extensions.end(), extensionsTmp.begin(), extensionsTmp.end());
extensionsTmp = SequenceReadNode::getExtensions();
extensions.insert(extensions.end(), extensionsTmp.begin(), extensionsTmp.end());
extensionsTmp = MovieReadNode::getExtensions();
diff --git a/lib/toucanView/IItem.cpp b/lib/toucanView/IItem.cpp
index c9863df..017e087 100644
--- a/lib/toucanView/IItem.cpp
+++ b/lib/toucanView/IItem.cpp
@@ -67,8 +67,8 @@ namespace toucan
void IItem::mousePressEvent(ftk::MouseClickEvent& event)
{
ITimeWidget::mousePressEvent(event);
- if ((1 == event.button && 0 == event.modifiers) ||
- (0 == event.button && static_cast(ftk::KeyModifier::Super) == event.modifiers))
+ if ((3 == event.button && 0 == event.modifiers) ||
+ (1 == event.button && static_cast(ftk::KeyModifier::Super) == event.modifiers))
{
event.accept = true;
_menu = ftk::Menu::create(getContext());
diff --git a/lib/toucanView/TimelineItem.cpp b/lib/toucanView/TimelineItem.cpp
index 548261d..06edb57 100644
--- a/lib/toucanView/TimelineItem.cpp
+++ b/lib/toucanView/TimelineItem.cpp
@@ -322,7 +322,7 @@ namespace toucan
void TimelineItem::mousePressEvent(ftk::MouseClickEvent& event)
{
IItem::mousePressEvent(event);
- if (0 == event.button &&
+ if (1 == event.button &&
(0 == event.modifiers ||
static_cast(ftk::KeyModifier::Shift) == event.modifiers ||
static_cast(ftk::commandKeyModifier) == event.modifiers))
@@ -457,9 +457,9 @@ namespace toucan
g.min.x +
t / duration * w,
_size.scrollPos.y +
- g.min.y +
- _size.fontMetrics.lineHeight,
+ g.min.y,
_size.border,
+ _size.fontMetrics.lineHeight +
_size.margin * 2);
if (intersects(box, drawRect))
{
@@ -517,7 +517,7 @@ namespace toucan
{
event.render->drawMesh(
mesh,
- event.style->getColorRole(ftk::ColorRole::Button));
+ event.style->getColorRole(ftk::ColorRole::TextDisabled));
}
}
}
diff --git a/lib/toucanView/TimelineWidget.cpp b/lib/toucanView/TimelineWidget.cpp
index 6ca39f2..560a825 100644
--- a/lib/toucanView/TimelineWidget.cpp
+++ b/lib/toucanView/TimelineWidget.cpp
@@ -233,7 +233,7 @@ namespace toucan
void TimelineWidget::mousePressEvent(ftk::MouseClickEvent& event)
{
IWidget::mousePressEvent(event);
- if (0 == event.button &&
+ if (1 == event.button &&
static_cast(ftk::KeyModifier::Alt) == event.modifiers)
{
event.accept = true;
diff --git a/lib/toucanView/Viewport.cpp b/lib/toucanView/Viewport.cpp
index 5d20ff0..fede292 100644
--- a/lib/toucanView/Viewport.cpp
+++ b/lib/toucanView/Viewport.cpp
@@ -492,7 +492,7 @@ namespace toucan
void Viewport::mousePressEvent(ftk::MouseClickEvent& event)
{
IWidget::mousePressEvent(event);
- if (0 == event.button && 0 == event.modifiers)
+ if (1 == event.button && 0 == event.modifiers)
{
event.accept = true;
setFrameView(false);
diff --git a/sbuild-linux.sh b/sbuild-linux.sh
index a42f577..9f3725c 100644
--- a/sbuild-linux.sh
+++ b/sbuild-linux.sh
@@ -7,6 +7,10 @@ if [ "$#" -eq 1 ]; then
BUILD_TYPE=$1
fi
+if [ $FFMPEG_MINIMAL = "" ]; then
+ FFMPEG_MINIMAL = OFF
+fi
+
JOBS=4
cmake \
@@ -14,7 +18,8 @@ cmake \
-B sbuild-$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$PWD/install-$BUILD_TYPE \
-DCMAKE_PREFIX_PATH=$PWD/install-$BUILD_TYPE \
- -DCMAKE_BUILD_TYPE=$BUILD_TYPE
+ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
+ -Dtoucan_FFmpeg_MINIMAL=$FFMPEG_MINIMAL
cmake --build sbuild-$BUILD_TYPE -j $JOBS --config $BUILD_TYPE
cmake \
diff --git a/sbuild-macos.sh b/sbuild-macos.sh
index a42f577..9f3725c 100644
--- a/sbuild-macos.sh
+++ b/sbuild-macos.sh
@@ -7,6 +7,10 @@ if [ "$#" -eq 1 ]; then
BUILD_TYPE=$1
fi
+if [ $FFMPEG_MINIMAL = "" ]; then
+ FFMPEG_MINIMAL = OFF
+fi
+
JOBS=4
cmake \
@@ -14,7 +18,8 @@ cmake \
-B sbuild-$BUILD_TYPE \
-DCMAKE_INSTALL_PREFIX=$PWD/install-$BUILD_TYPE \
-DCMAKE_PREFIX_PATH=$PWD/install-$BUILD_TYPE \
- -DCMAKE_BUILD_TYPE=$BUILD_TYPE
+ -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
+ -Dtoucan_FFmpeg_MINIMAL=$FFMPEG_MINIMAL
cmake --build sbuild-$BUILD_TYPE -j $JOBS --config $BUILD_TYPE
cmake \
diff --git a/sbuild-win.bat b/sbuild-win.bat
index d09000f..d5b5636 100644
--- a/sbuild-win.bat
+++ b/sbuild-win.bat
@@ -1,6 +1,8 @@
set BUILD_TYPE=%1
IF "%BUILD_TYPE%"=="" set BUILD_TYPE=Release
+IF "%FFMPEG_MINIMAL%"=="" set FFMPEG_MINIMAL=OFF
+
set JOBS=4
cmake ^
@@ -8,7 +10,8 @@ cmake ^
-B sbuild-%BUILD_TYPE% ^
-DCMAKE_INSTALL_PREFIX=%CD%\install-%BUILD_TYPE% ^
-DCMAKE_PREFIX_PATH=%CD%\install-%BUILD_TYPE% ^
- -DCMAKE_BUILD_TYPE=%BUILD_TYPE%
+ -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
+ -Dtoucan_FFmpeg_MINIMAL=%FFMPEG_MINIMAL%
cmake --build sbuild-%BUILD_TYPE% -j %JOBS% --config %BUILD_TYPE%
cmake ^