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

Method executeCommand

src/Widgets/Rundown/RundownSolidColorWidget.cpp:245–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245bool RundownSolidColorWidget::executeCommand(Playout::PlayoutType type)
246{
247 if (type == Playout::PlayoutType::Stop)
248 executeStop();
249 else if ((type == Playout::PlayoutType::Play && !this->command.getTriggerOnNext()) || type == Playout::PlayoutType::Load)
250 {
251 if (this->command.getDelay() < 0)
252 return true;
253
254 if (!this->model.getDeviceName().isEmpty()) // The user need to select a device.
255 {
256 const QStringList& channelFormats = DatabaseManager::getInstance().getDeviceByName(this->model.getDeviceName()).getChannelFormats().split(",");
257 if (this->command.getChannel() > channelFormats.count())
258 return true;
259
260 this->itemScheduler.schedulePlayAndStop(
261 this->command.getDelay(),
262 this->command.getDuration(),
263 this->delayType,
264 DatabaseManager::getInstance().getFormat(channelFormats[this->command.getChannel() - 1]).getFramesPerSecond().toDouble());
265 }
266 }
267 else if (type == Playout::PlayoutType::PlayNow)
268 executePlay();
269 else if (type == Playout::PlayoutType::PauseResume)
270 executePause();
271 else if (type == Playout::PlayoutType::Load)
272 executeLoad();
273 else if (type == Playout::PlayoutType::Next)
274 executePlay();
275 else if (type == Playout::PlayoutType::Clear)
276 executeClearVideolayer();
277 else if (type == Playout::PlayoutType::ClearVideoLayer)
278 executeClearVideolayer();
279 else if (type == Playout::PlayoutType::ClearChannel)
280 executeClearChannel();
281 else if (type == Playout::PlayoutType::Preview)
282 executeLoadPreview();
283
284 if (this->active)
285 this->animation->start(1);
286
287 return true;
288}
289
290void RundownSolidColorWidget::executeStop()
291{

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected