-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimecodeEngine.h
More file actions
633 lines (558 loc) · 24.2 KB
/
TimecodeEngine.h
File metadata and controls
633 lines (558 loc) · 24.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
// Super Timecode Converter
// Copyright (c) 2026 Fiverecords — MIT License
// https://github.com/fiverecords/SuperTimecodeConverter
#pragma once
#include <JuceHeader.h>
#include "TimecodeCore.h"
#include "MtcInput.h"
#include "MtcOutput.h"
#include "ArtnetInput.h"
#include "ArtnetOutput.h"
#include "LtcInput.h"
#include "LtcOutput.h"
#include "AudioThru.h"
#include <memory>
//==============================================================================
// TimecodeEngine — one independent routing pipeline
//
// Each engine owns: 1 input source → N output destinations.
// AudioThru is only available on the primary engine (index 0).
//==============================================================================
// All public methods of TimecodeEngine are designed to be called exclusively
// from the JUCE message thread. Protocol handler callbacks (MTC/ArtNet/LTC)
// communicate back via atomics only. No additional synchronisation is needed.
inline constexpr int kPrimaryEngineIndex = 0;
inline constexpr int kMaxEngines = 8;
class TimecodeEngine
{
public:
enum class InputSource { MTC, ArtNet, SystemTime, LTC };
//--------------------------------------------------------------------------
explicit TimecodeEngine(int index, const juce::String& name = {})
: engineIndex(index),
engineName(name.isEmpty() ? ("ENGINE " + juce::String(index + 1)) : name)
{
// Only the primary engine (index 0) gets AudioThru
if (index == kPrimaryEngineIndex)
audioThru = std::make_unique<AudioThru>();
}
~TimecodeEngine()
{
// Shutdown order: outputs first, then inputs
stopMtcOutput();
stopArtnetOutput();
stopLtcOutput();
stopThruOutput();
stopMtcInput();
stopArtnetInput();
stopLtcInput();
}
//==========================================================================
// Identity
//==========================================================================
int getIndex() const { return engineIndex; }
juce::String getName() const { return engineName; }
void setName(const juce::String& name) { engineName = name; }
bool isPrimary() const { return engineIndex == kPrimaryEngineIndex; }
// Called after engine deletion to fix indices so isPrimary() stays correct
// and AudioThru is created for the new primary engine if needed.
// NOTE: The caller (MainComponent::removeEngine) is responsible for
// restarting AudioThru on the new primary engine after reindexing,
// because that requires UI state (device combos) that the engine doesn't own.
void reindex(int newIndex)
{
// If we were the primary engine and are being moved away, destroy AudioThru
// to avoid a stale handler referencing a deleted LtcInput.
if (engineIndex == kPrimaryEngineIndex && newIndex != kPrimaryEngineIndex)
{
stopThruOutput();
audioThru.reset();
outputThruEnabled = false;
}
engineIndex = newIndex;
// Create AudioThru if we just became the primary engine
if (newIndex == kPrimaryEngineIndex && !audioThru)
audioThru = std::make_unique<AudioThru>();
}
//==========================================================================
// Input source
//==========================================================================
InputSource getActiveInput() const { return activeInput; }
FrameRate getCurrentFps() const { return currentFps; }
Timecode getCurrentTimecode() const { return currentTimecode; }
bool isSourceActive() const { return sourceActive; }
bool getUserOverrodeLtcFps() const { return userOverrodeLtcFps; }
void setInputSource(InputSource source)
{
// Stop current input
switch (activeInput)
{
case InputSource::MTC: stopMtcInput(); break;
case InputSource::ArtNet: stopArtnetInput(); break;
case InputSource::LTC: stopLtcInput(); break;
default: break;
}
userOverrodeLtcFps = false;
activeInput = source;
sourceActive = false;
// Note: actual start is deferred to the caller (MainComponent),
// which gathers device params from UI before calling startXxxInput().
if (source == InputSource::SystemTime)
sourceActive = true;
}
void setFrameRate(FrameRate fps)
{
currentFps = fps;
FrameRate outRate = getEffectiveOutputFps();
mtcOutput.setFrameRate(outRate);
artnetOutput.setFrameRate(outRate);
ltcOutput.setFrameRate(outRate);
}
void setUserOverrodeLtcFps(bool v) { userOverrodeLtcFps = v; }
//==========================================================================
// FPS conversion
//==========================================================================
bool isFpsConvertEnabled() const { return fpsConvertEnabled; }
FrameRate getOutputFps() const { return outputFps; }
Timecode getOutputTimecode() const { return outputTimecode; }
FrameRate getEffectiveOutputFps() const
{
return fpsConvertEnabled ? outputFps : currentFps;
}
void setFpsConvertEnabled(bool enabled)
{
fpsConvertEnabled = enabled;
if (!enabled)
{
outputFps = currentFps;
setOutputFrameRate(currentFps);
}
}
void setOutputFrameRate(FrameRate fps)
{
outputFps = fps;
FrameRate outRate = getEffectiveOutputFps();
mtcOutput.setFrameRate(outRate);
artnetOutput.setFrameRate(outRate);
ltcOutput.setFrameRate(outRate);
}
//==========================================================================
// Output enables & offsets
//==========================================================================
bool isOutputMtcEnabled() const { return outputMtcEnabled; }
bool isOutputArtnetEnabled() const { return outputArtnetEnabled; }
bool isOutputLtcEnabled() const { return outputLtcEnabled; }
bool isOutputThruEnabled() const { return outputThruEnabled; }
void setOutputMtcEnabled(bool e) { outputMtcEnabled = e; }
void setOutputArtnetEnabled(bool e) { outputArtnetEnabled = e; }
void setOutputLtcEnabled(bool e) { outputLtcEnabled = e; }
void setOutputThruEnabled(bool e) { outputThruEnabled = e; }
int getMtcOutputOffset() const { return mtcOutputOffset; }
int getArtnetOutputOffset() const { return artnetOutputOffset; }
int getLtcOutputOffset() const { return ltcOutputOffset; }
void setMtcOutputOffset(int v) { mtcOutputOffset = v; }
void setArtnetOutputOffset(int v) { artnetOutputOffset = v; }
void setLtcOutputOffset(int v) { ltcOutputOffset = v; }
//==========================================================================
// Protocol handlers — direct access for device queries
//==========================================================================
MtcInput& getMtcInput() { return mtcInput; }
MtcOutput& getMtcOutput() { return mtcOutput; }
ArtnetInput& getArtnetInput() { return artnetInput; }
ArtnetOutput& getArtnetOutput() { return artnetOutput; }
LtcInput& getLtcInput() { return ltcInput; }
LtcOutput& getLtcOutput() { return ltcOutput; }
AudioThru* getAudioThru() { return audioThru.get(); }
//==========================================================================
// Start / Stop input protocols
//==========================================================================
bool startMtcInput(int deviceIndex)
{
stopMtcInput();
mtcInput.refreshDeviceList();
if (deviceIndex < 0 && mtcInput.getDeviceCount() > 0) deviceIndex = 0;
if (deviceIndex >= 0 && mtcInput.start(deviceIndex))
{
inputStatusText = "RX: " + mtcInput.getCurrentDeviceName();
return true;
}
inputStatusText = (deviceIndex < 0) ? "NO MIDI DEVICE AVAILABLE" : "FAILED TO OPEN DEVICE";
return false;
}
void stopMtcInput() { mtcInput.stop(); }
bool startArtnetInput(int interfaceIndex)
{
stopArtnetInput();
if (interfaceIndex < 0) interfaceIndex = 0;
artnetInput.refreshNetworkInterfaces();
if (artnetInput.start(interfaceIndex, 6454))
{
inputStatusText = "RX ON " + artnetInput.getBindInfo();
if (artnetInput.didFallBackToAllInterfaces())
inputStatusText += " [FALLBACK]";
return true;
}
inputStatusText = "FAILED TO BIND PORT 6454";
return false;
}
void stopArtnetInput() { artnetInput.stop(); }
bool startLtcInput(const juce::String& typeName, const juce::String& devName,
int ltcChannel, int thruChannel = -1,
double sampleRate = 0, int bufferSize = 0)
{
stopLtcInput();
if (devName.isEmpty()) { inputStatusText = "NO AUDIO DEVICE AVAILABLE"; return false; }
if (ltcInput.start(typeName, devName, ltcChannel, thruChannel, sampleRate, bufferSize))
{
inputStatusText = "RX: " + ltcInput.getCurrentDeviceName()
+ " Ch " + juce::String(ltcChannel + 1);
return true;
}
inputStatusText = "FAILED TO OPEN AUDIO DEVICE";
return false;
}
void stopLtcInput()
{
stopThruOutput();
ltcInput.stop();
}
//==========================================================================
// Start / Stop output protocols
//==========================================================================
bool startMtcOutput(int deviceIndex)
{
stopMtcOutput();
mtcOutput.refreshDeviceList();
if (deviceIndex < 0 && mtcOutput.getDeviceCount() > 0) deviceIndex = 0;
if (deviceIndex >= 0 && mtcOutput.start(deviceIndex))
{
mtcOutput.setFrameRate(getEffectiveOutputFps());
mtcOutStatusText = "TX: " + mtcOutput.getCurrentDeviceName();
return true;
}
mtcOutStatusText = (deviceIndex < 0) ? "NO MIDI DEVICE" : "FAILED TO OPEN";
return false;
}
void stopMtcOutput() { mtcOutput.stop(); mtcOutStatusText = ""; }
bool startArtnetOutput(int interfaceIndex)
{
stopArtnetOutput();
artnetOutput.refreshNetworkInterfaces();
if (artnetOutput.start(interfaceIndex, 6454))
{
artnetOutput.setFrameRate(getEffectiveOutputFps());
artnetOutStatusText = "TX: " + artnetOutput.getBroadcastIp() + ":6454";
return true;
}
artnetOutStatusText = "FAILED TO BIND";
return false;
}
void stopArtnetOutput() { artnetOutput.stop(); artnetOutStatusText = ""; }
bool startLtcOutput(const juce::String& typeName, const juce::String& devName,
int channel, double sampleRate = 0, int bufferSize = 0)
{
stopLtcOutput();
if (devName.isEmpty()) { ltcOutStatusText = "NO AUDIO DEVICE AVAILABLE"; return false; }
// Check for AudioThru device conflict (primary engine only)
if (audioThru && audioThru->getIsRunning()
&& audioThru->getCurrentDeviceName() == devName
&& audioThru->getCurrentTypeName() == typeName)
{
stopThruOutput();
thruOutStatusText = "CONFLICT: same device as LTC OUT";
}
if (ltcOutput.start(typeName, devName, channel, sampleRate, bufferSize))
{
ltcOutput.setFrameRate(getEffectiveOutputFps());
juce::String chName = (channel == -1) ? "Ch 1 + Ch 2" : ("Ch " + juce::String(channel + 1));
ltcOutStatusText = "TX: " + ltcOutput.getCurrentDeviceName() + " " + chName;
return true;
}
ltcOutStatusText = "FAILED TO OPEN AUDIO DEVICE";
return false;
}
void stopLtcOutput() { ltcOutput.stop(); ltcOutStatusText = ""; }
bool startThruOutput(const juce::String& typeName, const juce::String& devName,
int channel, double sampleRate = 0, int bufferSize = 0)
{
stopThruOutput();
if (!audioThru) return false; // not primary engine
if (!ltcInput.getIsRunning() || !ltcInput.hasPassthruChannel())
{
thruOutStatusText = "WAITING FOR LTC INPUT";
return false;
}
ltcInput.resetPassthruCounters();
ltcInput.syncPassthruReadPosition();
if (devName.isEmpty()) { thruOutStatusText = "NO AUDIO DEVICE"; return false; }
// Check for LTC output device conflict
if (outputLtcEnabled && ltcOutput.getIsRunning()
&& ltcOutput.getCurrentDeviceName() == devName
&& ltcOutput.getCurrentTypeName() == typeName)
{
thruOutStatusText = "CONFLICT: same device as LTC OUT";
return false;
}
if (audioThru->start(typeName, devName, channel, <cInput, sampleRate, bufferSize))
{
juce::String chName = (channel == -1) ? "Ch 1 + Ch 2" : ("Ch " + juce::String(channel + 1));
thruOutStatusText = "THRU: " + audioThru->getCurrentDeviceName() + " " + chName;
double inRate = ltcInput.getActualSampleRate();
double outRate = audioThru->getActualSampleRate();
if (std::abs(inRate - outRate) > 1.0)
thruOutStatusText += " [RATE MISMATCH: " + juce::String((int)inRate) + "/" + juce::String((int)outRate) + "]";
return true;
}
thruOutStatusText = "FAILED TO OPEN";
return false;
}
void stopThruOutput()
{
if (audioThru) audioThru->stop();
thruOutStatusText = "";
}
//==========================================================================
// tick() — called from timerCallback each frame
//==========================================================================
void tick()
{
switch (activeInput)
{
case InputSource::SystemTime:
updateSystemTime();
sourceActive = true;
inputStatusText = "SYSTEM CLOCK";
break;
case InputSource::MTC:
if (mtcInput.getIsRunning())
{
currentTimecode = mtcInput.getCurrentTimecode();
bool rx = mtcInput.isReceiving();
if (rx)
{
auto d = mtcInput.getDetectedFrameRate();
if (d != currentFps) setFrameRate(d);
inputStatusText = "RX: " + mtcInput.getCurrentDeviceName();
}
else
inputStatusText = "PAUSED - " + mtcInput.getCurrentDeviceName();
sourceActive = rx;
}
else { sourceActive = false; inputStatusText = "WAITING FOR DEVICE..."; }
break;
case InputSource::ArtNet:
if (artnetInput.getIsRunning())
{
currentTimecode = artnetInput.getCurrentTimecode();
bool rx = artnetInput.isReceiving();
if (rx)
{
auto d = artnetInput.getDetectedFrameRate();
if (d != currentFps) setFrameRate(d);
inputStatusText = "RX ON " + artnetInput.getBindInfo();
}
else
inputStatusText = "PAUSED - " + artnetInput.getBindInfo();
sourceActive = rx;
}
else { sourceActive = false; inputStatusText = "NOT LISTENING"; }
break;
case InputSource::LTC:
if (ltcInput.getIsRunning())
{
currentTimecode = ltcInput.getCurrentTimecode();
bool rx = ltcInput.isReceiving();
if (rx)
{
auto d = ltcInput.getDetectedFrameRate();
bool ambiguousOverride = userOverrodeLtcFps
&& ((currentFps == FrameRate::FPS_2398 && d == FrameRate::FPS_24)
|| (currentFps == FrameRate::FPS_2997 && d == FrameRate::FPS_30));
if (d != currentFps && !ambiguousOverride)
{
if (d != FrameRate::FPS_24 && d != FrameRate::FPS_30)
userOverrodeLtcFps = false;
setFrameRate(d);
}
inputStatusText = "RX: " + ltcInput.getCurrentDeviceName()
+ " Ch " + juce::String(ltcInput.getSelectedChannel() + 1);
}
else
inputStatusText = "PAUSED - " + ltcInput.getCurrentDeviceName();
sourceActive = rx;
}
else { sourceActive = false; inputStatusText = "WAITING FOR DEVICE..."; }
break;
}
routeTimecodeToOutputs();
updateVuMeters();
}
//==========================================================================
// Status text (read by MainComponent for UI)
//==========================================================================
juce::String getInputStatusText() const { return inputStatusText; }
juce::String getMtcOutStatusText() const { return mtcOutStatusText; }
juce::String getArtnetOutStatusText() const { return artnetOutStatusText; }
juce::String getLtcOutStatusText() const { return ltcOutStatusText; }
juce::String getThruOutStatusText() const { return thruOutStatusText; }
//==========================================================================
// VU meter smoothed levels
//==========================================================================
float getSmoothedLtcInLevel() const { return sLtcIn; }
float getSmoothedThruInLevel() const { return sThruIn; }
float getSmoothedLtcOutLevel() const { return sLtcOut; }
float getSmoothedThruOutLevel() const { return sThruOut; }
//==========================================================================
// Helper queries
//==========================================================================
bool isInputStarted() const
{
switch (activeInput)
{
case InputSource::SystemTime: return true;
case InputSource::MTC: return mtcInput.getIsRunning();
case InputSource::ArtNet: return artnetInput.getIsRunning();
case InputSource::LTC: return ltcInput.getIsRunning();
default: return false;
}
}
static juce::String inputSourceToString(InputSource src)
{
switch (src)
{
case InputSource::MTC: return "MTC";
case InputSource::ArtNet: return "ArtNet";
case InputSource::SystemTime: return "SystemTime";
case InputSource::LTC: return "LTC";
}
return "SystemTime";
}
static InputSource stringToInputSource(const juce::String& s)
{
if (s == "MTC") return InputSource::MTC;
if (s == "ArtNet") return InputSource::ArtNet;
if (s == "LTC") return InputSource::LTC;
return InputSource::SystemTime;
}
static juce::String getInputName(InputSource s)
{
switch (s)
{
case InputSource::MTC: return "MTC";
case InputSource::ArtNet: return "ART-NET";
case InputSource::SystemTime: return "SYSTEM";
case InputSource::LTC: return "LTC";
default: return "---";
}
}
static int fpsToIndex(FrameRate fps)
{
switch (fps)
{
case FrameRate::FPS_2398: return 0;
case FrameRate::FPS_24: return 1;
case FrameRate::FPS_25: return 2;
case FrameRate::FPS_2997: return 3;
case FrameRate::FPS_30: return 4;
}
return 4;
}
static FrameRate indexToFps(int i)
{
constexpr FrameRate v[] = { FrameRate::FPS_2398, FrameRate::FPS_24,
FrameRate::FPS_25, FrameRate::FPS_2997, FrameRate::FPS_30 };
return v[juce::jlimit(0, 4, i)];
}
private:
//--------------------------------------------------------------------------
int engineIndex;
juce::String engineName;
// Input state
InputSource activeInput = InputSource::SystemTime;
FrameRate currentFps = FrameRate::FPS_30;
Timecode currentTimecode;
bool sourceActive = true;
bool userOverrodeLtcFps = false;
// FPS conversion
bool fpsConvertEnabled = false;
FrameRate outputFps = FrameRate::FPS_30;
Timecode outputTimecode;
// Output state
bool outputMtcEnabled = false;
bool outputArtnetEnabled = false;
bool outputLtcEnabled = false;
bool outputThruEnabled = false;
int mtcOutputOffset = 0;
int artnetOutputOffset = 0;
int ltcOutputOffset = 0;
// Protocol handlers
MtcInput mtcInput;
MtcOutput mtcOutput;
ArtnetInput artnetInput;
ArtnetOutput artnetOutput;
LtcInput ltcInput;
LtcOutput ltcOutput;
std::unique_ptr<AudioThru> audioThru; // Only for primary engine
// Status
juce::String inputStatusText = "SYSTEM CLOCK";
juce::String mtcOutStatusText, artnetOutStatusText, ltcOutStatusText, thruOutStatusText;
// VU meter smoothed state
float sLtcIn = 0.0f, sThruIn = 0.0f, sLtcOut = 0.0f, sThruOut = 0.0f;
//--------------------------------------------------------------------------
void updateSystemTime()
{
auto now = juce::Time::getCurrentTime();
double msSinceMidnight = (double)now.getHours() * 3600000.0
+ (double)now.getMinutes() * 60000.0
+ (double)now.getSeconds() * 1000.0
+ (double)now.getMilliseconds();
currentTimecode = wallClockToTimecode(msSinceMidnight, currentFps);
}
void routeTimecodeToOutputs()
{
FrameRate outRate = getEffectiveOutputFps();
Timecode baseTc = fpsConvertEnabled
? convertTimecodeRate(currentTimecode, currentFps, outRate)
: currentTimecode;
outputTimecode = baseTc;
if (sourceActive)
{
if (outputMtcEnabled && mtcOutput.getIsRunning())
{
mtcOutput.setTimecode(offsetTimecode(baseTc, mtcOutputOffset, outRate));
mtcOutput.setPaused(false);
}
if (outputArtnetEnabled && artnetOutput.getIsRunning())
{
artnetOutput.setTimecode(offsetTimecode(baseTc, artnetOutputOffset, outRate));
artnetOutput.setPaused(false);
}
if (outputLtcEnabled && ltcOutput.getIsRunning())
{
ltcOutput.setTimecode(offsetTimecode(baseTc, ltcOutputOffset, outRate));
ltcOutput.setPaused(false);
}
}
else
{
if (outputMtcEnabled && mtcOutput.getIsRunning()) mtcOutput.setPaused(true);
if (outputArtnetEnabled && artnetOutput.getIsRunning()) artnetOutput.setPaused(true);
if (outputLtcEnabled && ltcOutput.getIsRunning()) ltcOutput.setPaused(true);
}
}
void updateVuMeters()
{
auto decayLevel = [](float current, float target, float decay = 0.85f) {
return target > current ? target : current * decay;
};
float ltcInLvl = ltcInput.getIsRunning() ? ltcInput.getLtcPeakLevel() : 0.0f;
float thruInLvl = ltcInput.getIsRunning() ? ltcInput.getThruPeakLevel() : 0.0f;
float ltcOutLvl = (ltcOutput.getIsRunning() && !ltcOutput.isPaused()) ? ltcOutput.getPeakLevel() : 0.0f;
float thruOutLvl = (audioThru && audioThru->getIsRunning()) ? audioThru->getPeakLevel() : 0.0f;
sLtcIn = decayLevel(sLtcIn, ltcInLvl);
sThruIn = decayLevel(sThruIn, thruInLvl);
sLtcOut = decayLevel(sLtcOut, ltcOutLvl);
sThruOut = decayLevel(sThruOut, thruOutLvl);
}
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(TimecodeEngine)
};