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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,18 @@ set(TOUCAN_PLUGINS

enable_testing()

find_package(Imath)
find_package(Freetype)
find_package(ZLIB)
find_package(minizip)
find_package(Imath)
find_package(PNG)
find_package(JPEG)
find_package(TIFF)
find_package(OpenEXR)
find_package(minizip)
find_package(OpenColorIO)
find_package(OpenImageIO)
find_package(OpenFX)
find_package(OpenTimelineIO)
find_package(lunasvg)
find_package(dtk)
find_package(feather-tk)

include_directories(lib)
include_directories(tests)
Expand Down
20 changes: 10 additions & 10 deletions bin/toucan-filmstrip/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@

#include <toucanRender/Util.h>

#include <dtk/core/CmdLine.h>
#include <dtk/core/Time.h>
#include <feather-tk/core/CmdLine.h>
#include <feather-tk/core/Time.h>

#include <OpenImageIO/imagebufalgo.h>

namespace toucan
{
void App::_init(
const std::shared_ptr<dtk::Context>& context,
const std::shared_ptr<feather_tk::Context>& context,
std::vector<std::string>& argv)
{
std::vector<std::shared_ptr<dtk::ICmdLineArg> > args;
args.push_back(dtk::CmdLineValueArg<std::string>::create(
std::vector<std::shared_ptr<feather_tk::ICmdLineArg> > args;
args.push_back(feather_tk::CmdLineValueArg<std::string>::create(
_args.input,
"input",
"Input .otio file."));
auto outArg = dtk::CmdLineValueArg<std::string>::create(
auto outArg = feather_tk::CmdLineValueArg<std::string>::create(
_args.output,
"output",
"Output image file.");
args.push_back(outArg);

std::vector<std::shared_ptr<dtk::ICmdLineOption> > options;
options.push_back(dtk::CmdLineFlagOption::create(
std::vector<std::shared_ptr<feather_tk::ICmdLineOption> > options;
options.push_back(feather_tk::CmdLineFlagOption::create(
_options.verbose,
std::vector<std::string>{ "-v" },
"Print verbose output."));
options.push_back(dtk::CmdLineFlagOption::create(
options.push_back(feather_tk::CmdLineFlagOption::create(
_options.help,
std::vector<std::string>{ "-h" },
"Print help."));
Expand All @@ -53,7 +53,7 @@ namespace toucan
{}

std::shared_ptr<App> App::create(
const std::shared_ptr<dtk::Context>&context,
const std::shared_ptr<feather_tk::Context>&context,
std::vector<std::string>&argv)
{
auto out = std::shared_ptr<App>(new App);
Expand Down
8 changes: 4 additions & 4 deletions bin/toucan-filmstrip/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
#include <toucanRender/ImageGraph.h>
#include <toucanRender/TimelineWrapper.h>

#include <dtk/core/IApp.h>
#include <feather-tk/core/IApp.h>

#include <OpenImageIO/imagebuf.h>

namespace toucan
{
class App : public dtk::IApp
class App : public feather_tk::IApp
{
protected:
void _init(
const std::shared_ptr<dtk::Context>&,
const std::shared_ptr<feather_tk::Context>&,
std::vector<std::string>&);

App();
Expand All @@ -26,7 +26,7 @@ namespace toucan
~App();

static std::shared_ptr<App> create(
const std::shared_ptr<dtk::Context>&,
const std::shared_ptr<feather_tk::Context>&,
std::vector<std::string>&);

void run() override;
Expand Down
6 changes: 2 additions & 4 deletions bin/toucan-filmstrip/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

#include "App.h"

#include <dtk/core/Context.h>
#include <dtk/core/Init.h>
#include <feather-tk/core/Context.h>

#include <iostream>

Expand All @@ -20,8 +19,7 @@ int main(int argc, char** argv)
}
try
{
auto context = dtk::Context::create();
dtk::coreInit(context);
auto context = feather_tk::Context::create();
auto app = App::create(context, args);
app->run();
out = app->getExit();
Expand Down
40 changes: 20 additions & 20 deletions bin/toucan-render/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <toucanRender/Read.h>
#include <toucanRender/Util.h>

#include <dtk/core/CmdLine.h>
#include <dtk/core/Time.h>
#include <feather-tk/core/CmdLine.h>
#include <feather-tk/core/Time.h>

#include <OpenImageIO/imagebufalgo.h>

Expand Down Expand Up @@ -45,21 +45,21 @@ namespace toucan
}

void App::_init(
const std::shared_ptr<dtk::Context>& context,
const std::shared_ptr<feather_tk::Context>& context,
std::vector<std::string>& argv)
{
std::vector<std::shared_ptr<dtk::ICmdLineArg> > args;
args.push_back(dtk::CmdLineValueArg<std::string>::create(
std::vector<std::shared_ptr<feather_tk::ICmdLineArg> > args;
args.push_back(feather_tk::CmdLineValueArg<std::string>::create(
_args.input,
"input",
"Input .otio file."));
auto outArg = dtk::CmdLineValueArg<std::string>::create(
auto outArg = feather_tk::CmdLineValueArg<std::string>::create(
_args.output,
"output",
"Output image or movie file. Use a dash ('-') to write raw frames or y4m to stdout.");
args.push_back(outArg);

std::vector<std::shared_ptr<dtk::ICmdLineOption> > options;
std::vector<std::shared_ptr<feather_tk::ICmdLineOption> > options;
std::vector<std::string> rawList;
for (const auto& spec : rawSpecs)
{
Expand All @@ -70,41 +70,41 @@ namespace toucan
{
y4mList.push_back(spec.first);
}
options.push_back(dtk::CmdLineValueOption<std::string>::create(
options.push_back(feather_tk::CmdLineValueOption<std::string>::create(
_options.videoCodec,
std::vector<std::string>{ "-vcodec" },
"Set the video codec.",
_options.videoCodec,
dtk::join(ffmpeg::getVideoCodecStrings(), ", ")));
options.push_back(dtk::CmdLineFlagOption::create(
feather_tk::join(ffmpeg::getVideoCodecStrings(), ", ")));
options.push_back(feather_tk::CmdLineFlagOption::create(
_options.printStart,
std::vector<std::string>{ "-print_start" },
"Print the timeline start time and exit."));
options.push_back(dtk::CmdLineFlagOption::create(
options.push_back(feather_tk::CmdLineFlagOption::create(
_options.printDuration,
std::vector<std::string>{ "-print_duration" },
"Print the timeline duration and exit."));
options.push_back(dtk::CmdLineFlagOption::create(
options.push_back(feather_tk::CmdLineFlagOption::create(
_options.printRate,
std::vector<std::string>{ "-print_rate" },
"Print the timeline frame rate and exit."));
options.push_back(dtk::CmdLineFlagOption::create(
options.push_back(feather_tk::CmdLineFlagOption::create(
_options.printSize,
std::vector<std::string>{ "-print_size" },
"Print the timeline image size."));
options.push_back(dtk::CmdLineValueOption<std::string>::create(
options.push_back(feather_tk::CmdLineValueOption<std::string>::create(
_options.raw,
std::vector<std::string>{ "-raw" },
"Raw pixel format to send to stdout.",
_options.raw,
dtk::join(rawList, ", ")));
options.push_back(dtk::CmdLineValueOption<std::string>::create(
feather_tk::join(rawList, ", ")));
options.push_back(feather_tk::CmdLineValueOption<std::string>::create(
_options.y4m,
std::vector<std::string>{ "-y4m" },
"y4m format to send to stdout.",
_options.y4m,
dtk::join(y4mList, ", ")));
options.push_back(dtk::CmdLineFlagOption::create(
feather_tk::join(y4mList, ", ")));
options.push_back(feather_tk::CmdLineFlagOption::create(
_options.verbose,
std::vector<std::string>{ "-v" },
"Print verbose output."));
Expand Down Expand Up @@ -144,7 +144,7 @@ namespace toucan
}

std::shared_ptr<App> App::create(
const std::shared_ptr<dtk::Context>& context,
const std::shared_ptr<feather_tk::Context>& context,
std::vector<std::string>& argv)
{
auto out = std::shared_ptr<App>(new App);
Expand Down Expand Up @@ -320,7 +320,7 @@ namespace toucan

{
const OTIO_NS::TimeRange timeRange = _timelineWrapper->getTimeRange();
const auto r = dtk::toRational(timeRange.duration().rate());
const auto r = feather_tk::toRational(timeRange.duration().rate());
std::stringstream ss;
ss << " F" << r.first << ":" << r.second;
s = ss.str();
Expand Down
8 changes: 4 additions & 4 deletions bin/toucan-render/App.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <toucanRender/ImageGraph.h>
#include <toucanRender/TimelineWrapper.h>

#include <dtk/core/IApp.h>
#include <feather-tk/core/IApp.h>

#include <OpenImageIO/imagebuf.h>

Expand All @@ -19,11 +19,11 @@ extern "C"

namespace toucan
{
class App : public dtk::IApp
class App : public feather_tk::IApp
{
protected:
void _init(
const std::shared_ptr<dtk::Context>&,
const std::shared_ptr<feather_tk::Context>&,
std::vector<std::string>&);

App();
Expand All @@ -32,7 +32,7 @@ namespace toucan
~App();

static std::shared_ptr<App> create(
const std::shared_ptr<dtk::Context>&,
const std::shared_ptr<feather_tk::Context>&,
std::vector<std::string>&);

void run() override;
Expand Down
6 changes: 2 additions & 4 deletions bin/toucan-render/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

#include "App.h"

#include <dtk/core/Context.h>
#include <dtk/core/Init.h>
#include <feather-tk/core/Context.h>

#include <iostream>

Expand All @@ -20,8 +19,7 @@ int main(int argc, char** argv)
}
try
{
auto context = dtk::Context::create();
dtk::coreInit(context);
auto context = feather_tk::Context::create();
auto app = App::create(context, args);
app->run();
out = app->getExit();
Expand Down
8 changes: 4 additions & 4 deletions bin/toucan-view/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

#include "toucanView/App.h"

#include <dtk/core/Context.h>
#include <feather-tk/core/Context.h>

#include <iostream>

DTK_MAIN()
FEATHER_TK_MAIN()
{
try
{
auto context = dtk::Context::create();
auto args = dtk::convert(argc, argv);
auto context = feather_tk::Context::create();
auto args = feather_tk::convert(argc, argv);
auto app = toucan::App::create(context, args);
if (app->getExit() != 0)
return app->getExit();
Expand Down
3 changes: 2 additions & 1 deletion cmake/SuperBuild/BuildFFmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -418,4 +418,5 @@ ExternalProject_Add(
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${CMAKE_INSTALL_PREFIX}/lib/pkgconfig ${FFmpeg_CONFIGURE}
BUILD_COMMAND ${FFmpeg_BUILD}
INSTALL_COMMAND ${FFmpeg_INSTALL}
BUILD_IN_SOURCE 1)
BUILD_IN_SOURCE ON
DOWNLOAD_EXTRACT_TIMESTAMP ON)
2 changes: 1 addition & 1 deletion cmake/SuperBuild/BuildOpenTimelineIO.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include(ExternalProject)

set(OpenTimelineIO_GIT_REPOSITORY "https://github.com/AcademySoftwareFoundation/OpenTimelineIO.git")
set(OpenTimelineIO_GIT_TAG "v0.17.0")
set(OpenTimelineIO_GIT_TAG "7c58de1a19d7cdb16f08019bd504105bec4a5aa5")

set(OpenTimelineIO_ARGS
${toucan_EXTERNAL_PROJECT_ARGS}
Expand Down
23 changes: 0 additions & 23 deletions cmake/SuperBuild/Builddtk-deps.cmake

This file was deleted.

21 changes: 0 additions & 21 deletions cmake/SuperBuild/Builddtk.cmake

This file was deleted.

25 changes: 25 additions & 0 deletions cmake/SuperBuild/Buildfeather-tk.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
include(ExternalProject)

set(feather_tk_GIT_REPOSITORY "https://github.com/darbyjohnston/feather-tk.git")
set(feather_tk_GIT_TAG "f8103df2aa07a3722930c19ee9093817dd1af0c8")

set(feather_tk_DEPS ZLIB nlohmann_json PNG Freetype lunasvg glfw3)
if(toucan_nfd)
list(APPEND feather_tk_DEPS nfd)
endif()

set(feather_tk_ARGS
${toucan_EXTERNAL_PROJECT_ARGS}
-Dfeather_tk_UI_LIB=ON
-Dfeather_tk_PYTHON=OFF
-Dfeather_tk_TESTS=OFF
-Dfeather_tk_EXAMPLES=OFF)

ExternalProject_Add(
feather_tk
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/feather_tk
DEPENDS ${feather_tk_DEPS}
GIT_REPOSITORY ${feather_tk_GIT_REPOSITORY}
GIT_TAG ${feather_tk_GIT_TAG}
LIST_SEPARATOR |
CMAKE_ARGS ${feather_tk_ARGS})
Loading