Skip to content

Commit a10d760

Browse files
Refactoring (#51)
Signed-off-by: Darby Johnston <darbyjohnston@yahoo.com>
1 parent b530add commit a10d760

133 files changed

Lines changed: 2202 additions & 2166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-workflow.yml

Lines changed: 21 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ jobs:
2424
sudo apt-get install xorg-dev libglu1-mesa-dev mesa-common-dev mesa-utils xvfb
2525
2626
- name: Build
27-
run: |
28-
bash toucan/SuperBuild.sh Debug
27+
run: sh toucan/sbuild-linux.sh Debug
2928

3029
- name: Install
31-
run: |
32-
cmake --build build-Debug --config Debug --target install
30+
run: cmake --build build-Debug --config Debug --target install
3331

3432
- name: Tests
35-
run: |
36-
build-Debug/tests/toucan-test/toucan-test toucan/data
33+
run: build-Debug/tests/toucan-test/toucan-test toucan/data
3734

3835
linux-package:
3936
runs-on: ubuntu-latest
@@ -52,16 +49,13 @@ jobs:
5249
sudo apt-get install xorg-dev libglu1-mesa-dev mesa-common-dev mesa-utils xvfb
5350
5451
- name: Build
55-
run: |
56-
bash toucan/SuperBuild.sh Release
52+
run: sh toucan/sbuild-macos.sh
5753

5854
- name: Install
59-
run: |
60-
cmake --build build-Release --config Release --target install
55+
run: cmake --build build-Release --config Release --target install
6156

6257
- name: Package
63-
run: |
64-
cmake --build build-Release --config Release --target package
58+
run: cmake --build build-Release --config Release --target package
6559

6660
- name: Upload artifact
6761
id: linux-package-artifact
@@ -92,16 +86,13 @@ jobs:
9286
echo "DYLD_LIBRARY_PATH=$PWD/install-Debug/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
9387
9488
- name: Build
95-
run: |
96-
bash toucan/SuperBuild.sh Debug
89+
run: sh toucan/sbuild-macos.sh Debug
9790

9891
- name: Install
99-
run: |
100-
cmake --build build-Debug --config Debug --target install
92+
run: cmake --build build-Debug --config Debug --target install
10193

10294
- name: Tests
103-
run: |
104-
build-Debug/tests/toucan-test/toucan-test toucan/data
95+
run: build-Debug/tests/toucan-test/toucan-test toucan/data
10596

10697
macos-build:
10798
runs-on: macos-latest
@@ -119,16 +110,13 @@ jobs:
119110
echo "DYLD_LIBRARY_PATH=$PWD/install-Debug/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
120111
121112
- name: Build
122-
run: |
123-
bash toucan/SuperBuild.sh Debug
113+
run: sh toucan/sbuild-macos.sh Debug
124114

125115
- name: Install
126-
run: |
127-
cmake --build build-Debug --config Debug --target install
116+
run: cmake --build build-Debug --config Debug --target install
128117

129118
- name: Tests
130-
run: |
131-
build-Debug/tests/toucan-test/toucan-test toucan/data
119+
run: build-Debug/tests/toucan-test/toucan-test toucan/data
132120

133121
macos-package:
134122
runs-on: macos-latest
@@ -146,16 +134,13 @@ jobs:
146134
echo "DYLD_LIBRARY_PATH=$PWD/install-Debug/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
147135
148136
- name: Build
149-
run: |
150-
bash toucan/SuperBuild.sh Release
137+
run: bash toucan/sbuild-macos.sh
151138

152139
- name: Install
153-
run: |
154-
cmake --build build-Release --config Release --target install
140+
run: cmake --build build-Release --config Release --target install
155141

156142
- name: Package
157-
run: |
158-
cmake --build build-Release --config Release --target package
143+
run: cmake --build build-Release --config Release --target package
159144

160145
- name: Upload artifact
161146
id: macos-package-artifact
@@ -190,18 +175,15 @@ jobs:
190175
191176
- name: Build
192177
shell: cmd
193-
run: |
194-
toucan\SuperBuild.bat Debug
178+
run: toucan\sbuild-win.bat Debug
195179

196180
- name: Install
197181
shell: cmd
198-
run: |
199-
cmake --build build-Debug --config Debug --target INSTALL
182+
run: cmake --build build-Debug --config Debug --target INSTALL
200183

201184
- name: Tests
202185
shell: cmd
203-
run: |
204-
build-Debug\tests\toucan-test\Debug\toucan-test.exe toucan\data
186+
run: build-Debug\tests\toucan-test\Debug\toucan-test.exe toucan\data
205187

206188
windows-package:
207189
runs-on: windows-latest
@@ -222,18 +204,15 @@ jobs:
222204
223205
- name: Build
224206
shell: cmd
225-
run: |
226-
toucan\SuperBuild.bat Release
207+
run: toucan\sbuild-win.bat
227208

228209
- name: Install
229210
shell: cmd
230-
run: |
231-
cmake --build build-Release --config Release --target INSTALL
211+
run: cmake --build build-Release --config Release --target INSTALL
232212

233213
- name: Package
234214
shell: cmd
235-
run: |
236-
cmake --build build-Release --config Release --target PACKAGE
215+
run: cmake --build build-Release --config Release --target PACKAGE
237216

238217
- name: Upload artifact
239218
id: windows-package-artifact

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ git clone https://github.com/OpenTimelineIO/toucan.git
153153
```
154154
Run the super build:
155155
```
156-
sh toucan/SuperBuild.sh Release
156+
sh toucan/sbuild-linux.sh
157157
```
158158
Run the viewer application:
159159
```
@@ -175,7 +175,7 @@ git clone https://github.com/OpenTimelineIO/toucan.git
175175
```
176176
Run the super build:
177177
```
178-
sh toucan/SuperBuild.sh Release
178+
sh toucan/sbuild-macos.sh
179179
```
180180
Run the viewer application:
181181
```
@@ -198,7 +198,7 @@ git clone https://github.com/OpenTimelineIO/toucan.git
198198
```
199199
Run the super build:
200200
```
201-
toucan\SuperBuild.bat Release
201+
toucan\sbuild-win.bat
202202
```
203203
Run the viewer application:
204204
```

SuperBuild.bat

Lines changed: 0 additions & 10 deletions
This file was deleted.

SuperBuild.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

bin/toucan-filmstrip/App.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
namespace toucan
1313
{
1414
void App::_init(
15-
const std::shared_ptr<feather_tk::Context>& context,
15+
const std::shared_ptr<ftk::Context>& context,
1616
std::vector<std::string>& argv)
1717
{
18-
_cmdLine.input = feather_tk::CmdLineValueArg<std::string>::create(
18+
_cmdLine.input = ftk::CmdLineValueArg<std::string>::create(
1919
"input",
2020
"Input .otio file.");
21-
_cmdLine.output = feather_tk::CmdLineValueArg<std::string>::create(
21+
_cmdLine.output = ftk::CmdLineValueArg<std::string>::create(
2222
"output",
2323
"Output image file.");
2424

@@ -37,7 +37,7 @@ namespace toucan
3737
{}
3838

3939
std::shared_ptr<App> App::create(
40-
const std::shared_ptr<feather_tk::Context>&context,
40+
const std::shared_ptr<ftk::Context>&context,
4141
std::vector<std::string>&argv)
4242
{
4343
auto out = std::shared_ptr<App>(new App);

bin/toucan-filmstrip/App.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414

1515
namespace toucan
1616
{
17-
class App : public feather_tk::IApp
17+
class App : public ftk::IApp
1818
{
1919
protected:
2020
void _init(
21-
const std::shared_ptr<feather_tk::Context>&,
21+
const std::shared_ptr<ftk::Context>&,
2222
std::vector<std::string>&);
2323

2424
App();
@@ -27,16 +27,16 @@ namespace toucan
2727
~App();
2828

2929
static std::shared_ptr<App> create(
30-
const std::shared_ptr<feather_tk::Context>&,
30+
const std::shared_ptr<ftk::Context>&,
3131
std::vector<std::string>&);
3232

3333
void run() override;
3434

3535
private:
3636
struct CmdLine
3737
{
38-
std::shared_ptr<feather_tk::CmdLineValueArg<std::string> > input;
39-
std::shared_ptr<feather_tk::CmdLineValueArg<std::string> > output;
38+
std::shared_ptr<ftk::CmdLineValueArg<std::string> > input;
39+
std::shared_ptr<ftk::CmdLineValueArg<std::string> > output;
4040
};
4141
CmdLine _cmdLine;
4242

bin/toucan-filmstrip/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ int main(int argc, char** argv)
1919
}
2020
try
2121
{
22-
auto context = feather_tk::Context::create();
22+
auto context = ftk::Context::create();
2323
auto app = App::create(context, args);
2424
if (0 == app->getExit())
2525
app->run();

bin/toucan-render/App.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ namespace toucan
4444
}
4545

4646
void App::_init(
47-
const std::shared_ptr<feather_tk::Context>& context,
47+
const std::shared_ptr<ftk::Context>& context,
4848
std::vector<std::string>& argv)
4949
{
50-
_cmdLine.input = feather_tk::CmdLineValueArg<std::string>::create(
50+
_cmdLine.input = ftk::CmdLineValueArg<std::string>::create(
5151
"input",
5252
"Input .otio file.");
53-
_cmdLine.output = feather_tk::CmdLineValueArg<std::string>::create(
53+
_cmdLine.output = ftk::CmdLineValueArg<std::string>::create(
5454
"output",
5555
"Output image or movie file. Use a dash ('-') to write raw frames or y4m to stdout.");
5656

@@ -64,37 +64,37 @@ namespace toucan
6464
{
6565
y4mList.push_back(spec.first);
6666
}
67-
_cmdLine.videoCodec = feather_tk::CmdLineValueOption<std::string>::create(
67+
_cmdLine.videoCodec = ftk::CmdLineValueOption<std::string>::create(
6868
std::vector<std::string>{ "-vcodec" },
6969
"Set the video codec.",
7070
"",
7171
"MJPEG",
72-
feather_tk::join(ffmpeg::getVideoCodecStrings(), ", "));
73-
_cmdLine.printStart = feather_tk::CmdLineFlagOption::create(
72+
ftk::join(ffmpeg::getVideoCodecStrings(), ", "));
73+
_cmdLine.printStart = ftk::CmdLineFlagOption::create(
7474
std::vector<std::string>{ "-print_start" },
7575
"Print the timeline start time and exit.");
76-
_cmdLine.printDuration = feather_tk::CmdLineFlagOption::create(
76+
_cmdLine.printDuration = ftk::CmdLineFlagOption::create(
7777
std::vector<std::string>{ "-print_duration" },
7878
"Print the timeline duration and exit.");
79-
_cmdLine.printRate = feather_tk::CmdLineFlagOption::create(
79+
_cmdLine.printRate = ftk::CmdLineFlagOption::create(
8080
std::vector<std::string>{ "-print_rate" },
8181
"Print the timeline frame rate and exit.");
82-
_cmdLine.printSize = feather_tk::CmdLineFlagOption::create(
82+
_cmdLine.printSize = ftk::CmdLineFlagOption::create(
8383
std::vector<std::string>{ "-print_size" },
8484
"Print the timeline image size.");
85-
_cmdLine.raw = feather_tk::CmdLineValueOption<std::string>::create(
85+
_cmdLine.raw = ftk::CmdLineValueOption<std::string>::create(
8686
std::vector<std::string>{ "-raw" },
8787
"Raw pixel format to send to stdout.",
8888
"",
8989
std::optional<std::string>(),
90-
feather_tk::join(rawList, ", "));
91-
_cmdLine.y4m = feather_tk::CmdLineValueOption<std::string>::create(
90+
ftk::join(rawList, ", "));
91+
_cmdLine.y4m = ftk::CmdLineValueOption<std::string>::create(
9292
std::vector<std::string>{ "-y4m" },
9393
"y4m format to send to stdout.",
9494
"",
9595
std::optional<std::string>(),
96-
feather_tk::join(y4mList, ", "));
97-
_cmdLine.verbose = feather_tk::CmdLineFlagOption::create(
96+
ftk::join(y4mList, ", "));
97+
_cmdLine.verbose = ftk::CmdLineFlagOption::create(
9898
std::vector<std::string>{ "-v" },
9999
"Print verbose output.");
100100

@@ -141,7 +141,7 @@ namespace toucan
141141
}
142142

143143
std::shared_ptr<App> App::create(
144-
const std::shared_ptr<feather_tk::Context>& context,
144+
const std::shared_ptr<ftk::Context>& context,
145145
std::vector<std::string>& argv)
146146
{
147147
auto out = std::shared_ptr<App>(new App);
@@ -320,7 +320,7 @@ namespace toucan
320320

321321
{
322322
const OTIO_NS::TimeRange timeRange = _timelineWrapper->getTimeRange();
323-
const auto r = feather_tk::toRational(timeRange.duration().rate());
323+
const auto r = ftk::toRational(timeRange.duration().rate());
324324
std::stringstream ss;
325325
ss << " F" << r.first << ":" << r.second;
326326
s = ss.str();

0 commit comments

Comments
 (0)