MCPcopy Create free account
hub / github.com/CasparCG/client / executeCommand

Method executeCommand

src/Widgets/Rundown/RundownFileRecorderWidget.cpp:266–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266bool RundownFileRecorderWidget::executeCommand(Playout::PlayoutType type)
267{
268 if (type == Playout::PlayoutType::Stop)
269 executeStop();
270 else if (type == Playout::PlayoutType::Play)
271 {
272 if (this->command.getDelay() < 0)
273 return true;
274
275 if (!this->model.getDeviceName().isEmpty()) // The user need to select a device.
276 {
277 const QStringList& channelFormats = DatabaseManager::getInstance().getDeviceByName(this->model.getDeviceName()).getChannelFormats().split(",");
278 if (this->command.getChannel() > channelFormats.count())
279 return true;
280
281 this->itemScheduler.schedulePlayAndStop(
282 this->command.getDelay(),
283 this->command.getDuration(),
284 this->delayType,
285 DatabaseManager::getInstance().getFormat(channelFormats[this->command.getChannel() - 1]).getFramesPerSecond().toDouble());
286 }
287 }
288 else if (type == Playout::PlayoutType::PlayNow)
289 executePlay();
290 else if (type == Playout::PlayoutType::Clear)
291 executeStop();
292 else if (type == Playout::PlayoutType::ClearVideoLayer)
293 executeStop();
294 else if (type == Playout::PlayoutType::ClearChannel)
295 executeStop();
296
297 if (this->active)
298 this->animation->start(1);
299
300 return true;
301}
302
303void RundownFileRecorderWidget::executeStop()
304{

Callers

nothing calls this directly

Calls 8

schedulePlayAndStopMethod · 0.80
getFramesPerSecondMethod · 0.80
getFormatMethod · 0.80
getDelayMethod · 0.45
getDeviceByNameMethod · 0.45
getChannelMethod · 0.45
getDurationMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected