Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -109,7 +109,7 @@ QVariant AvailStreamsModel::data(const QModelIndex &index, int role) const
{
NGLTreeItem *item = privateData(index);
StreamData data = item->data().value<StreamData>();
DEBUG_LOG() << data.name;
DEBUG_LOG(m_logger) << data.name;
return data.name;
}
@@ -45,6 +45,8 @@ private slots:
void onTvcConfigChanged(const AudioVideoManagement::TvcConfig &data, DataModification modType);
private:
NGL::INGLLogger &m_logger;
template <typename T>
void insertUpdateData(const T &data, DataModification modType, NGLTreeItem *parent);
@@ -122,7 +122,7 @@ void AudioSettingsDialog::retranslate()
void AudioSettingsDialog::onOperatorChanged(const OperatorManagement::User &data, DataModification modType)
{
DEBUG_LOG() << "************** onOperatorChanged ";
DEBUG_LOG(m_logger) << "************** onOperatorChanged ";
switch (modType)
{
case DataModification::eRemoved:
@@ -245,7 +245,7 @@ void AudioSettingsDialog::onDownButtonClicked()
void AudioSettingsDialog::onSelectionChangedAllocation(const QItemSelection &selected, const QItemSelection &deselected)
{
DEBUG_LOG() << "onSelectionChangedAllocation selected.isEmpty()=" << selected.isEmpty();
DEBUG_LOG(m_logger) << "onSelectionChangedAllocation selected.isEmpty()=" << selected.isEmpty();
Q_UNUSED(deselected);
QModelIndex first = m_ui->treeViewAllocated->model()->index(0, 0);
int rowCnt = m_ui->treeViewAllocated->model()->rowCount();
@@ -281,7 +281,7 @@ bool AudioSettingsDialog::apply()
bool AudioSettingsDialog::applyRemove()
{
RemoveCnrTvcProfileRequest removeRequest;
DEBUG_LOG() << "AudioSettingsDialog::applyRemove";
DEBUG_LOG(m_logger) << "AudioSettingsDialog::applyRemove";
for (const auto &profile : std::as_const(m_cnrTvcProfileMap))
{
@@ -304,7 +304,7 @@ bool AudioSettingsDialog::applyRemove()
bool AudioSettingsDialog::applyModify()
{
ModifyCnrTvcProfileRequest modifyRequest;
DEBUG_LOG() << "AudioSettingsDialog::applyModify";
DEBUG_LOG(m_logger) << "AudioSettingsDialog::applyModify";
for (const auto &profile : std::as_const(m_cnrTvcProfileMap))
{
@@ -382,7 +382,7 @@ void AudioSettingsDialog::onSelectionOperatorChanged(const int index)
m_ui->pushButtonUp->setEnabled(false);
m_ui->pushButtonDown->setEnabled(false);
m_operatorId = m_ui->operatorComboBox->currentData().toInt();
DEBUG_LOG() << "onSelectionOperatorChanged" << " operatorStr=" << m_ui->operatorComboBox->currentText() << " m_operatorId= " << m_operatorId;
DEBUG_LOG(m_logger) << "onSelectionOperatorChanged" << " operatorStr=" << m_ui->operatorComboBox->currentText() << " m_operatorId= " << m_operatorId;
fillOperatorList();
m_modelAllocated->resetChangeState();
m_modelAvailable->resetChangeState();
@@ -31,7 +31,7 @@ QVariant AllocatedStreamsModel::data(const QModelIndex &index, int role) const
{
NGLTreeItem *item = privateData(index);
StreamData data = item->data().value<StreamData>();
DEBUG_LOG() << data.name;
DEBUG_LOG(m_logger) << data.name;
return data.name;
}
@@ -92,14 +92,14 @@ bool AllocatedStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction a
qDeleteAll(droppedItems);
emit droppedStreamNames(streams);
m_changes = true;
DEBUG_LOG() << data->data(QStringLiteral("NGLTreeModel/dragDrop"));
DEBUG_LOG(m_logger) << data->data(QStringLiteral("NGLTreeModel/dragDrop"));
return NGLTreeModel::dropMimeData(data, action, row, 0, QModelIndex());
}
void AllocatedStreamsModel::setNewStreamData(const QVector<StreamData> &newData)
{
DEBUG_LOG() << "set new stream data, count: " << newData.size();
DEBUG_LOG(m_logger) << "set new stream data, count: " << newData.size();
resetModel();
for (const StreamData &sd : newData)
m_rootItem->appendChild(new NGLTreeItem(QVariant::fromValue(sd)));
@@ -116,15 +116,15 @@ QVector<StreamData> AllocatedStreamsModel::getStreamDataVector() const
const NGLTreeItem *item = m_rootItem->child(i);
const StreamData sd = item->data().value<StreamData>();
result.append(sd);
DEBUG_LOG() << "result.append(sd.name):" << sd.name;
DEBUG_LOG(m_logger) << "result.append(sd.name):" << sd.name;
}
DEBUG_LOG() << "getStreamDataVector() size: " << result.size();
DEBUG_LOG(m_logger) << "getStreamDataVector() size: " << result.size();
return result;
}
void AllocatedStreamsModel::changeOrder(const QModelIndex &idx, bool up)
{
DEBUG_LOG() << "changeOrder "
DEBUG_LOG(m_logger) << "changeOrder "
<< " index = " << idx.row()
<< " up = " << up
<< " m_rootItem->childCount()= " << m_rootItem->childCount();
@@ -40,6 +40,8 @@ signals:
void droppedStreamNames(const QVector<AudioVideoManagement::StreamData> &streamNamesDropped);
private:
NGL::INGLLogger &m_logger;
bool m_changes{false};
QVector<QPair<bool , int> > m_changedStreams;
};
@@ -58,6 +58,8 @@ public slots:
void setTimezoneHoursOffset(int timezoneHoursOffset);
private:
NGL::INGLLogger &m_logger;
QString dateTimeToStringx(const QDateTime &dt) const;
QString msecsSinceEpochToStringx(qint64 msecs) const;
@@ -379,7 +379,7 @@ void TopicEditor::onEditSequence()
if (!m_playbackMenu)
return;
DEBUG_LOG() << "slotEditSequence ";
DEBUG_LOG(m_logger) << "slotEditSequence ";
const auto selRows = m_ui->tvSequences->selectionModel()->selectedRows();
if (selRows.size() != 1)
@@ -392,7 +392,7 @@ void TopicEditor::onEditSequence()
m_model->setHighlightedRow(row);
const AvsSequence selectedSeq = m_model->getRowData(row);
DEBUG_LOG() << "selectedSeq.internalStreamName=" << selectedSeq.internalStreamName;
DEBUG_LOG(m_logger) << "selectedSeq.internalStreamName=" << selectedSeq.internalStreamName;
m_playbackMenu->setStreamName(selectedSeq.internalStreamName);
m_ui->dtStart->setMsecsSinceEpoch(std::chrono::milliseconds(selectedSeq.start.time_since_epoch()).count());
@@ -28,6 +28,7 @@ public:
~TopicEditor();
private:
NGL::INGLLogger &m_logger;
void updateInternalData() override final;
void retranslate() override final;
@@ -53,6 +54,7 @@ private slots:
void onMarkerSelected(const QString &description);
private:
NGL::INGLLogger &m_logger;
const int s_durationLimit{86400000};
LtsSession::LtsSession *m_session{nullptr};
@@ -57,8 +57,8 @@ AvailableStreamsModel::AvailableStreamsModel(const std::shared_ptr<Interface::Dt
LtsSession::LtsSession *session,
StreamNameMapping *streamNameMapping,
QObject *parent,
bool isAudio)
: NGLTreeModel(parent, new NGLTreeItem(QVariant(), QIcon()), {tr("Available Streams")})
bool isAudio) : NGLTreeModel(parent, new NGLTreeItem(QVariant(), QIcon()),,
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {tr("Available Streams")})
, m_isAudio(isAudio)
, m_avmDtc(avmDtc)
, m_ismDtc(ismDtc)
@@ -164,7 +164,7 @@ QMimeData *AvailableStreamsModel::mimeData(const QModelIndexList &indexes) const
bool AvailableStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
{
INFO_LOG() << "dropMimeData: action = " << action
INFO_LOG(m_logger) << "dropMimeData: action = " << action
<< ", row = " << row
<< ", parent: valid = " << parent.isValid();
@@ -184,7 +184,7 @@ bool AvailableStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction a
void AvailableStreamsModel::initModel()
{
beginResetModel();
INFO_LOG() << "initModel";
INFO_LOG(m_logger) << "initModel";
m_rootItem->removeAllChildren();
@@ -250,7 +250,7 @@ void AvailableStreamsModel::initModel()
{
if (videoTeam.exerciseId() != m_session->exerciseId())
continue;
DEBUG_LOG() << "add new videoteam" << videoTeam;
DEBUG_LOG(m_logger) << "add new videoteam" << videoTeam;
StreamModelData item;
item.name = QString::fromStdString(videoTeam.streamName().c_str());
item.mountingPointId = -1 * videoTeam.id();
@@ -89,6 +89,8 @@ public:
Qt::DropActions supportedDragActions() const override { return Qt::CopyAction; }
private:
NGL::INGLLogger &m_logger;
void initModel();
const bool m_isAudio;
@@ -85,11 +85,11 @@ void ChooseMenu::onMenuStructChanged(const MenuStruct &data, DataModification mo
bool ChooseMenu::apply()
{
int menuId = m_ui->cbAudio->currentData().toInt();
INFO_LOG() << "MenuId Audio: " << menuId;
INFO_LOG(m_logger) << "MenuId Audio: " << menuId;
m_avsMenus->setAnnouncementMenu(menuId);
menuId = m_ui->cbVideo->currentData().toInt();
INFO_LOG() << "MenuId Video: " << menuId;
INFO_LOG(m_logger) << "MenuId Video: " << menuId;
m_avsMenus->setVideoMenu(menuId);
return true;
@@ -42,6 +42,8 @@ private slots:
void onMenuStructChanged(const MenuStruct &data, DataModification modType);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
bool apply() override final;
void selectCurrent();
@@ -46,11 +46,11 @@ bool MenuEdit::init(LtsSession::LtsSession *session,
StreamNameMapping *streamNameMapping,
const MenuStruct &ms)
{
DEBUG_LOG() << "MenuEdit::init()";
DEBUG_LOG(m_logger) << "MenuEdit::init()";
if (!ftc || !dtc)
{
ERROR_LOG() << "MenuEdit::init() Invalid shared_ptr!";
ERROR_LOG(m_logger) << "MenuEdit::init() Invalid shared_ptr!";
return false;
}
@@ -119,7 +119,7 @@ void MenuEdit::onRemove()
return;
slotChangesMade();
DEBUG_LOG() << "index row: " << index.row();
DEBUG_LOG(m_logger) << "index row: " << index.row();
m_usedStreamsModel->removeRow(index.row(), index.parent());
}
else
@@ -131,7 +131,7 @@ void MenuEdit::onRemove()
return;
slotChangesMade();
DEBUG_LOG() << "index row: " << index.row();
DEBUG_LOG(m_logger) << "index row: " << index.row();
m_usedStreamsModel->removeRow(index.row(), index.parent());
}
@@ -140,7 +140,7 @@ void MenuEdit::onRemove()
void MenuEdit::onModelDataChanged()
{
INFO_LOG() << "onModelDataChanged";
INFO_LOG(m_logger) << "onModelDataChanged";
m_ui->menuTreeView->expandAll();
}
@@ -59,6 +59,8 @@ public slots:
void onStreamSelected(const QModelIndex &idx);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
bool apply() override final;
@@ -149,7 +149,7 @@ void MenuEditView::onEditMenuStruct()
AudioVideoManagement::MenuStruct ms = m_model->getRowData(row);
ms.isAudio(m_isAudio);
DEBUG_LOG() << "---onEditMenuStruct () "
DEBUG_LOG(m_logger) << "---onEditMenuStruct () "
<< " id: " << ms.id()
<< " name: " << ms.name();
@@ -204,15 +204,15 @@ void MenuEditView::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG() << "Saved file with id = " << fileId;
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
else
ERROR_LOG() << "Could not save file in library ";
ERROR_LOG(m_logger) << "Could not save file in library ";
}
void MenuEditView::onImportButtonClicked()
{
DEBUG_LOG() << " onImportButtonClicked() ";
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_session->exerciseId(), FileManagement::toString(FileManagement::XmlType::AVMMenuEditView));
@@ -239,7 +239,7 @@ void MenuEditView::onImportButtonClicked()
});
}
}
INFO_LOG() << "--- onImportButtonClicked() ";
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
}
}
}
@@ -48,6 +48,8 @@ public:
bool isAudio);
private:
NGL::INGLLogger &m_logger;
void retranslate() override;
void onSelectionChanged();
void onAddMenuStruct();
@@ -77,7 +77,7 @@ QByteArray MenuViewModel::modelToJson(int row) const
QJsonObject obj;
obj[QStringLiteral("XmlType")] = FileManagement::toString(FileManagement::XmlType::AVMMenuEditView);
DEBUG_LOG() << "row =" << ": " << row;
DEBUG_LOG(m_logger) << "row =" << ": " << row;
const AudioVideoManagement::MenuStruct &menuStruct = m_vecData.at(row);
obj[QStringLiteral("id")] = 0;
@@ -122,7 +122,7 @@ QVector<AudioVideoManagement::MenuStruct> MenuViewModel::jsonToMenuStructs(const
const QJsonArray arrEntry(obj.value(QStringLiteral("menuEntries")).toArray());
menuStruct.menuEntries().resize(arrEntry.size());
INFO_LOG() << "arrEntry.size()=" << arrEntry.size();
INFO_LOG(m_logger) << "arrEntry.size()=" << arrEntry.size();
for (int j = 0; j < arrEntry.size(); ++j)
{
const QJsonObject objEntry(arrEntry.at(j).toObject());
@@ -25,6 +25,7 @@ public:
QByteArray modelToJson(int row) const;
QVector<AudioVideoManagement::MenuStruct> jsonToMenuStructs(const QByteArray &content) const;
protected:
NGL::INGLLogger &m_logger;
bool isFiltered(const MenuStruct &data, DataModification modType) const override final;
private:
@@ -29,6 +29,8 @@ Q_SIGNALS:
void newName(const QString &);
private:
NGL::INGLLogger &m_logger;
Ui::NewMenuStruct *m_ui;
};
@@ -279,9 +279,8 @@ private:
QueryTimeline::QueryTimeline(const AvaStream &stream, const AvaTimePoint &start, const AvaTimePoint &end, AvaControl *control)
: QObject()
{
QueryTimeline::QueryTimeline(const AvaStream &stream, const AvaTimePoint &start, const AvaTimePoint &end, AvaControl *control) : QObject(),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {
connect(control, &AvaControl::queryTimelineResponse,
this, &QueryTimeline::signalTimelineComplete);
connect(control, &AvaControl::queryTimelineResponse,
@@ -387,12 +386,12 @@ bool AvmPlaybackMenu::init(LtsSession::LtsSession *session, AvaSession *avaSessi
m_presetStreamName = streamName;
if (m_presetStreamName)
DEBUG_LOG() << "init stream preset: " << m_presetStreamName.get();
DEBUG_LOG(m_logger) << "init stream preset: " << m_presetStreamName.get();
m_presetStartTime = startTime;
if (m_presetStartTime)
DEBUG_LOG() << "init time preset: " << std::chrono::milliseconds(m_presetStartTime.get().time_since_epoch()).count();
DEBUG_LOG(m_logger) << "init time preset: " << std::chrono::milliseconds(m_presetStartTime.get().time_since_epoch()).count();
m_session = session;
m_playbackApp = std::move(appHandle);
@@ -1006,37 +1005,37 @@ void AvmPlaybackMenu::preselectStream(const QString &fallbackInternalStreamName)
const QString currentStreamName(m_presetStreamName.is_initialized() ? *m_presetStreamName : QString());
const QString currentInternalName(currentStreamName.isEmpty() ? fallbackInternalStreamName : QString());
DEBUG_LOG() << "currentStreamName: " << currentStreamName;
DEBUG_LOG() << "currentInternalName: " << currentInternalName;
DEBUG_LOG(m_logger) << "currentStreamName: " << currentStreamName;
DEBUG_LOG(m_logger) << "currentInternalName: " << currentInternalName;
m_presetStreamName.reset();
if (!currentInternalName.isEmpty() || !currentStreamName.isEmpty())
{
DEBUG_LOG() << "stream preset set - searching for '" << currentStreamName << "'..";
DEBUG_LOG(m_logger) << "stream preset set - searching for '" << currentStreamName << "'..";
bool found = false;
for (int i = 0; i < m_ui->cbStreams->count(); i++)
{
const AvaStream &curStream = m_ui->cbStreams->itemData(i).value<AvaStream>();
DEBUG_LOG() << "stream " << i << ": " << curStream.displayName << " (" << curStream.internalName << ")";
DEBUG_LOG(m_logger) << "stream " << i << ": " << curStream.displayName << " (" << curStream.internalName << ")";
if ((!currentInternalName.isEmpty() && curStream.displayName == currentInternalName) ||
(!currentStreamName.isEmpty() && curStream.internalName == currentStreamName))
{
found = true;
DEBUG_LOG() << "stream preset set, found & selected";
DEBUG_LOG(m_logger) << "stream preset set, found & selected";
m_ui->cbStreams->setCurrentIndex(i);
break;
}
}
if (!found)
WARNING_LOG() << "new stream list does not contain old selected stream (" << currentInternalName << ") !";
WARNING_LOG(m_logger) << "new stream list does not contain old selected stream (" << currentInternalName << ") !";
}
else
DEBUG_LOG() << "no stream preset set";
DEBUG_LOG(m_logger) << "no stream preset set";
}
@@ -1097,7 +1096,7 @@ void AvmPlaybackMenu::setSavedPos(qint64 msecs)
void AvmPlaybackMenu::onTimelineComplete(const AvaTimeline &timeline)
{
DEBUG_LOG() << "onTimelineComplete";
DEBUG_LOG(m_logger) << "onTimelineComplete";
m_intervalModel.setData(timeline.parts());
m_ui->tavIntervals->resizeColumnsToContents();
@@ -1115,7 +1114,7 @@ void AvmPlaybackMenu::onTimelineComplete(const AvaTimeline &timeline)
m_savedPos.reset();
}
DEBUG_LOG() << "onTimelineComplete " << std::chrono::milliseconds(newPos.time_since_epoch()).count();
DEBUG_LOG(m_logger) << "onTimelineComplete " << std::chrono::milliseconds(newPos.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), newPos);
m_timelineIsComplete = true;
@@ -1142,7 +1141,7 @@ void AvmPlaybackMenu::onStreamPositionReceived(const QString &dialogId, const QS
return;
m_lastAvsPos = pos;
DEBUG_LOG() << "onStreamPositionReceived: last avs pos now: " << std::chrono::milliseconds((*m_lastAvsPos).time_since_epoch()).count() << " - direct apply? " << m_avaCtrl->isEmpty();
DEBUG_LOG(m_logger) << "onStreamPositionReceived: last avs pos now: " << std::chrono::milliseconds((*m_lastAvsPos).time_since_epoch()).count() << " - direct apply? " << m_avaCtrl->isEmpty();
if (m_avaCtrl->isEmpty())
applyAvsPos();
@@ -1198,13 +1197,13 @@ void AvmPlaybackMenu::onUiTimeChanged(AvaTimePoint t)
m_currentButtonState != ButtonStates::Stopped)
return;
DEBUG_LOG() << "onUiTimeChanged " << std::chrono::milliseconds(t.time_since_epoch()).count();
DEBUG_LOG(m_logger) << "onUiTimeChanged " << std::chrono::milliseconds(t.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), t);
}
void AvmPlaybackMenu::onStreamSelectionChanged(const QVector<AvaStream> &selectedStreams)
{
DEBUG_LOG() << "onStreamSelectionChanged count = " << selectedStreams.count();
DEBUG_LOG(m_logger) << "onStreamSelectionChanged count = " << selectedStreams.count();
Q_ASSERT(!selectedStreams.isEmpty());
@@ -1231,7 +1230,7 @@ void AvmPlaybackMenu::onStreamSelectionChanged(const QVector<AvaStream> &selecte
void AvmPlaybackMenu::onIntervalActivated(const QModelIndex &index)
{
AvaTimelinePart interval = m_intervalModel.getRowData(index.row());
DEBUG_LOG() << "start = " << std::chrono::milliseconds(interval.first.time_since_epoch()).count();
DEBUG_LOG(m_logger) << "start = " << std::chrono::milliseconds(interval.first.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), interval.first);
@@ -1302,7 +1301,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
(void)blocker;
const auto &rowData = marker;
DEBUG_LOG() << "AvmPlaybackMenu::onMarkerClicked name = " << QString::fromStdString(rowData.name())
DEBUG_LOG(m_logger) << "AvmPlaybackMenu::onMarkerClicked name = " << QString::fromStdString(rowData.name())
<< " note = " << QString::fromStdString(rowData.note());
bool selectMarkerStream = false;
@@ -1319,7 +1318,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
for (const MarkerManagement::MarkerDescription &desc : rowData.descriptions())
{
DEBUG_LOG() << " description = " << QString::fromStdString(desc.content())
DEBUG_LOG(m_logger) << " description = " << QString::fromStdString(desc.content())
<< " desc.markerType()=" << desc.markerType();
if ((desc.markerType() == MarkerManagement::MarkerType::Video && m_isAudio == false) ||
(desc.markerType() == MarkerManagement::MarkerType::Audio && m_isAudio == true))
@@ -1345,7 +1344,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
avaStream.displayName = m_streamNameMapping->displayName(avaStream.internalName);
m_ui->cbMarkerStreams->addItem(avaStream.displayName, QVariant::fromValue(avaStream));
DEBUG_LOG() << "streams[" << avaStream.internalName << "]"
DEBUG_LOG(m_logger) << "streams[" << avaStream.internalName << "]"
<< " internaName=" << avaStream.internalName
<< " displayName=" << avaStream.displayName;
if (bIsSelected && selectedStream.internalName.isEmpty())
@@ -1363,7 +1362,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
qint64 time = rowData.timeStamp() - rowData.timeStampOffset();
DEBUG_LOG() << "marker time: " << time << " (" << QDateTime::fromMSecsSinceEpoch(time).toString(QStringLiteral("dd.MM.yy HH:mm:ss.zzz")) << ")";
DEBUG_LOG(m_logger) << "marker time: " << time << " (" << QDateTime::fromMSecsSinceEpoch(time).toString(QStringLiteral("dd.MM.yy HH:mm:ss.zzz")) << ")";
std::chrono::milliseconds t(time);
AvaTimePoint p(std::chrono::duration_cast<AvaDuration>(t));
@@ -1403,7 +1402,7 @@ void AvmPlaybackMenu::onSetMarkerClicked()
if (!m_selectedStreams || m_selectedStreams.get().isEmpty())
{
new LtsWidgets::LtsMessageDialogNew(this, tr("No stream selected to create a marker from."));
WARNING_LOG() << "onSetMarkerClicked called, but no selected streams available";
WARNING_LOG(m_logger) << "onSetMarkerClicked called, but no selected streams available";
return;
}
@@ -1444,7 +1443,7 @@ void AvmPlaybackMenu::onStartClicked()
{
DEBUG_LOG() << "onStartClicked"
DEBUG_LOG(m_logger) << "onStartClicked"
<< " dialogId=" << m_playbackApp.dialogId()
<< " currentSpeed=" << currentSpeed()
@@ -1459,7 +1458,7 @@ void AvmPlaybackMenu::onStartClicked()
return;
}
WARNING_LOG() << "onStartClicked called, but no selected streams available";
WARNING_LOG(m_logger) << "onStartClicked called, but no selected streams available";
return;
}
@@ -1501,14 +1500,14 @@ void AvmPlaybackMenu::onAllStreams()
void AvmPlaybackMenu::onIntervalBackwardClicked()
{
const AvaTimelinePart &targetInterval = m_intervalModel.previousInterval();
DEBUG_LOG() << "onIntervalBackwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
DEBUG_LOG(m_logger) << "onIntervalBackwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), targetInterval.first);
}
void AvmPlaybackMenu::onIntervalForwardClicked()
{
const AvaTimelinePart &targetInterval = m_intervalModel.nextInterval();
DEBUG_LOG() << "onIntervalForwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
DEBUG_LOG(m_logger) << "onIntervalForwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), targetInterval.first);
}
@@ -42,6 +42,7 @@ class QueryTimeline : public QObject
{
Q_OBJECT
private:
NGL::INGLLogger &m_logger;
friend class AvmPlaybackMenu;
QueryTimeline(const AvaStream &stream, const AvaTimePoint &start, const AvaTimePoint &end, AvaControl *control);
@@ -29,6 +29,8 @@ public:
void retranslate() override;
private:
NGL::INGLLogger &m_logger;
bool m_isAudio;
Ui::AvmPlaybackMenuDialog *m_ui;
@@ -129,7 +129,7 @@ bool UsedStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction action
if (!checkDrop(data, index(row, column), parent, action))
return false;
INFO_LOG() << "dropMimeData: action = " << action
INFO_LOG(m_logger) << "dropMimeData: action = " << action
<< ", row = " << row
<< ", parent: valid = " << parent.isValid();
@@ -200,7 +200,7 @@ bool UsedStreamsModel::canDropMimeData(const QMimeData *data, Qt::DropAction act
stream >> idParent >> idItem >> group >> itemData >> mountId;
ms = itemData.value<StreamModelData>();
INFO_LOG() << "Insert:"
INFO_LOG(m_logger) << "Insert:"
<< "\n ms.name=" << ms.name
<< "\n ms.isGroup=" << ms.isGroup
<< "\n ms.parentId=" << ms.parentId
@@ -301,7 +301,7 @@ void UsedStreamsModel::insertChildren(NGLTreeItem *parent, int parentId, const s
if (me.isGroup())
{
DEBUG_LOG() << "insertChildren"
DEBUG_LOG(m_logger) << "insertChildren"
<< me.mountingPointId()
<< me.name();
insertChildren(treeItem, me.id(), entries);
@@ -335,7 +335,7 @@ bool UsedStreamsModel::checkSingleItem(NGLTreeItem *target, StreamModelData &toC
bool retValue = true;
if (!target)
{
ERROR_LOG() << "Nullptr exception";
ERROR_LOG(m_logger) << "Nullptr exception";
return false;
}
else
@@ -343,10 +343,10 @@ bool UsedStreamsModel::checkSingleItem(NGLTreeItem *target, StreamModelData &toC
StreamModelData msTarget = target->data().value<StreamModelData>();
if (msTarget.id == toCheck.parentId)
DEBUG_LOG() << "Drag&drag in same folder.";
DEBUG_LOG(m_logger) << "Drag&drag in same folder.";
else if (msTarget.isGroup && toCheck.isGroup)
{
DEBUG_LOG() << "Trying to drop folder into folder";
DEBUG_LOG(m_logger) << "Trying to drop folder into folder";
retValue = false;
}
else
@@ -428,18 +428,18 @@ bool UsedStreamsModel::checkDrop(const QMimeData *data, const QModelIndex &index
else if ((movedFolders.at(0) != item.parentId) && (movedFolders.contains(item.parentId)) && (action == Qt::MoveAction))
{
DEBUG_LOG() << "Ignoring items in sub folder while moving.";
DEBUG_LOG(m_logger) << "Ignoring items in sub folder while moving.";
continue;
}
else if (!movedFolders.contains(item.parentId) && (action == Qt::MoveAction))
{
DEBUG_LOG() << "Only allow items from same folder to be moved.";
DEBUG_LOG(m_logger) << "Only allow items from same folder to be moved.";
return false;
}
if (!checkSingleItem(itemToCheck, item))
{
DEBUG_LOG() << "Not able to add item with name: " << item.name;
DEBUG_LOG(m_logger) << "Not able to add item with name: " << item.name;
return false;
}
@@ -452,7 +452,7 @@ bool UsedStreamsModel::checkDrop(const QMimeData *data, const QModelIndex &index
}
else
{
DEBUG_LOG() << "More than one folder selected.";
DEBUG_LOG(m_logger) << "More than one folder selected.";
return false;
}
}
@@ -463,7 +463,7 @@ bool UsedStreamsModel::checkDrop(const QMimeData *data, const QModelIndex &index
if (countDropped + countAgainst > 12)
{
DEBUG_LOG() << "Trying to add to many items to folder";
DEBUG_LOG(m_logger) << "Trying to add to many items to folder";
return false;
}
return true;
@@ -551,7 +551,7 @@ void UsedStreamsModel::onDataChanged(const InfrastructureManagement::MainStructu
const DataModification modType)
{
beginResetModel();
INFO_LOG() << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount()
INFO_LOG(m_logger) << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount()
<< " data.elements().size()=" << data.elements().size();
switch (modType)
@@ -562,7 +562,7 @@ void UsedStreamsModel::onDataChanged(const InfrastructureManagement::MainStructu
case DataModification::eAdded:
for (const InfrastructureManagement::StructureElement &se : data.elements())
{
INFO_LOG() << "se.id()" << se.id()
INFO_LOG(m_logger) << "se.id()" << se.id()
<< " se.displayName()" << se.displayName()
<< " m_rootItem->childCount()" << m_rootItem->childCount();
const QString newName = QString::fromStdString(se.displayName());
@@ -577,7 +577,7 @@ void UsedStreamsModel::onDataChangedMvs(const VideoTeam &data, const DataModific
{
beginResetModel();
INFO_LOG() << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
INFO_LOG(m_logger) << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
switch (modType)
{
@@ -586,7 +586,7 @@ void UsedStreamsModel::onDataChangedMvs(const VideoTeam &data, const DataModific
case DataModification::eModified:
case DataModification::eAdded:
INFO_LOG() << "se.id()" << data.id()
INFO_LOG(m_logger) << "se.id()" << data.id()
<< " se.displayName()" << data.streamName()
<< " m_rootItem->childCount()" << m_rootItem->childCount();
const QString newName = QString::fromStdString(data.streamName());
@@ -602,8 +602,8 @@ void UsedStreamsModel::onStreamNameDataChanged(int32_t mountingPointId, const QS
Q_UNUSED(internalName)
beginResetModel();
INFO_LOG() << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
INFO_LOG() << "se.id()" << mountingPointId
INFO_LOG(m_logger) << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
INFO_LOG(m_logger) << "se.id()" << mountingPointId
<< " se.displayName()" << displayName
<< " m_rootItem->childCount()" << m_rootItem->childCount();
updateStreamNames(mountingPointId, displayName, m_rootItem);
@@ -614,7 +614,7 @@ void UsedStreamsModel::onStreamNameDataChanged(int32_t mountingPointId, const QS
void UsedStreamsModel::updateStreamNames(const int mountingPointId, const QString &newName, NGLTreeItem *item)
{
INFO_LOG() << "updateStreamNames mountingPointId=" << mountingPointId
INFO_LOG(m_logger) << "updateStreamNames mountingPointId=" << mountingPointId
<< " newName=" << newName;
int childCount = item->childCount();
@@ -623,17 +623,17 @@ void UsedStreamsModel::updateStreamNames(const int mountingPointId, const QStrin
NGLTreeItem *child = item->child(i);
if (!child->data().canConvert<StreamModelData>())
ERROR_LOG() << "Error convert item";
ERROR_LOG(m_logger) << "Error convert item";
StreamModelData usedStream = child->data().value<StreamModelData>();
INFO_LOG() << "i=" << i
INFO_LOG(m_logger) << "i=" << i
<< " usedStream.mountingPointId=" << usedStream.mountingPointId
<< " usedStream.name=" << usedStream.name
<< " mountingPointId=" << mountingPointId
<< " newName=" << newName;
if (mountingPointId == usedStream.mountingPointId)
{
INFO_LOG() << "Set new DisplayName id=" << usedStream.id
INFO_LOG(m_logger) << "Set new DisplayName id=" << usedStream.id
<< " mountingPointId=" << usedStream.mountingPointId
<< " name=" << usedStream.name
<< " new Name =" << newName;
@@ -44,6 +44,8 @@ public:
bool initModel();
protected:
NGL::INGLLogger &m_logger;
NGLTreeItem *createItem(const QVariant &data, const QIcon &icon) const override;
private slots:
@@ -51,13 +51,13 @@ TopicReplay::TopicReplay(DataInterface *dataIfc, bool isAudio)
: m_isAudio(isAudio)
, m_dataIfc(dataIfc)
{
DEBUG_LOG() << "TopicReplay::TopicReplay()";
DEBUG_LOG(m_logger) << "TopicReplay::TopicReplay()";
Q_ASSERT(dataIfc);
}
TopicReplay::~TopicReplay()
{
DEBUG_LOG() << "TopicReplay::~TopicReplay()";
DEBUG_LOG(m_logger) << "TopicReplay::~TopicReplay()";
if (m_isPlaying)
playbackStop();
@@ -65,7 +65,7 @@ TopicReplay::~TopicReplay()
QWidget *TopicReplay::createWidget()
{
DEBUG_LOG() << "TopicReplay::createWidget()";
DEBUG_LOG(m_logger) << "TopicReplay::createWidget()";
Q_ASSERT(!m_screenPlacementHelper);
if (m_isAudio)
@@ -80,19 +80,19 @@ QWidget *TopicReplay::createWidget()
void TopicReplay::slotSetScriptResponse(const AudioVideoManagement::AvaStreamInfo &streamInfo, AudioVideoManagement::AvaStreamState streamState)
{
if (streamState == AudioVideoManagement::AvaStreamState::NotPossible)
ERROR_LOG() << "Script could not be set";
ERROR_LOG(m_logger) << "Script could not be set";
else
ERROR_LOG() << "Script set!";
ERROR_LOG(m_logger) << "Script set!";
ERROR_LOG() << "streamInfo: start" << streamInfo.duration.count();
ERROR_LOG() << "streamState: " << static_cast<int>(streamState);
ERROR_LOG(m_logger) << "streamInfo: start" << streamInfo.duration.count();
ERROR_LOG(m_logger) << "streamState: " << static_cast<int>(streamState);
}
bool TopicReplay::playbackInit(const QJsonObject &attributes)
{
DEBUG_LOG() << "TopicReplay::playbackInit()";
DEBUG_LOG() << QJsonDocument(attributes).toJson();
DEBUG_LOG(m_logger) << "TopicReplay::playbackInit()";
DEBUG_LOG(m_logger) << QJsonDocument(attributes).toJson();
if (m_screenPlacementHelper && !m_isAudio)
m_screenPlacementHelper->show();
@@ -103,7 +103,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG() << "no ava control!";
ERROR_LOG(m_logger) << "no ava control!";
return false;
}
@@ -111,7 +111,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
if (!topicData.isValid)
{
ERROR_LOG() << "topicData is invalid";
ERROR_LOG(m_logger) << "topicData is invalid";
return false;
}
@@ -122,7 +122,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
PlaybackApp *app = m_isAudio ? m_dataIfc->audioPresentationApp() : m_dataIfc->videoPresentationApp();
if (app == nullptr || app->inUse())
{
ERROR_LOG() << "app invalid or in use!";
ERROR_LOG(m_logger) << "app invalid or in use!";
return false;
}
@@ -142,7 +142,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
if (!m_appHandle)
{
ERROR_LOG() << "appHandle: missing app after creating appHandle!";
ERROR_LOG(m_logger) << "appHandle: missing app after creating appHandle!";
return false;
}
@@ -150,7 +150,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
NGL::Settings s({});
bool isLocal = s.isDatabaseConnectionLocal();
DEBUG_LOG() << "isLocal? " << isLocal;
DEBUG_LOG(m_logger) << "isLocal? " << isLocal;
AvaScriptSource source;
if (isLocal)
@@ -168,7 +168,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
source = AvaScriptSource::ServerVideo;
}
DEBUG_LOG() << "source: " << static_cast<int>(source);
DEBUG_LOG(m_logger) << "source: " << static_cast<int>(source);
ctrl->setScript(m_appHandle.dialogId(), m_scriptName,
source, topicData.streamList(),
@@ -180,7 +180,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
bool TopicReplay::playbackStart(int secondsOffset)
{
DEBUG_LOG() << "TopicReplay::playbackStart()";
DEBUG_LOG(m_logger) << "TopicReplay::playbackStart()";
if (m_screenPlacementHelper && !m_isAudio)
m_screenPlacementHelper->show();
@@ -188,7 +188,7 @@ bool TopicReplay::playbackStart(int secondsOffset)
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG() << "ctrl == nullptr";
ERROR_LOG(m_logger) << "ctrl == nullptr";
return false;
}
@@ -196,7 +196,7 @@ bool TopicReplay::playbackStart(int secondsOffset)
if (!m_appHandle)
{
ERROR_LOG() << "appHandle: missing app!";
ERROR_LOG(m_logger) << "appHandle: missing app!";
return false;
}
@@ -204,13 +204,13 @@ bool TopicReplay::playbackStart(int secondsOffset)
ctrl->startScript(m_appHandle.dialogId(), m_scriptName);
m_isPlaying = true;
DEBUG_LOG() << "m_isPlaying = true";
DEBUG_LOG(m_logger) << "m_isPlaying = true";
return true;
}
bool TopicReplay::playbackPause()
{
DEBUG_LOG() << "TopicReplay::playbackPause()";
DEBUG_LOG(m_logger) << "TopicReplay::playbackPause()";
if (m_screenPlacementHelper)
m_screenPlacementHelper->hide();
@@ -221,13 +221,13 @@ bool TopicReplay::playbackPause()
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG() << "no ctrl!";
ERROR_LOG(m_logger) << "no ctrl!";
return false;
}
if (!m_appHandle)
{
ERROR_LOG() << "appHandle: missing app!";
ERROR_LOG(m_logger) << "appHandle: missing app!";
return false;
}
@@ -237,7 +237,7 @@ bool TopicReplay::playbackPause()
bool TopicReplay::playbackStop()
{
DEBUG_LOG() << "TopicReplay::playbackStop()";
DEBUG_LOG(m_logger) << "TopicReplay::playbackStop()";
if (m_screenPlacementHelper)
m_screenPlacementHelper->hide();
@@ -248,13 +248,13 @@ bool TopicReplay::playbackStop()
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG() << "no ctrl!";
ERROR_LOG(m_logger) << "no ctrl!";
return false;
}
if (!m_appHandle)
{
ERROR_LOG() << "appHandle: missing app!";
ERROR_LOG(m_logger) << "appHandle: missing app!";
return false;
}
@@ -274,7 +274,7 @@ bool TopicReplay::exportTopic(const QJsonObject &attributes,
VdControl *ctrl = getVdControl();
if (ctrl == nullptr)
{
ERROR_LOG() << "ctrl missing!";
ERROR_LOG(m_logger) << "ctrl missing!";
exportNotifier->setExportFailed();
return false;
}
@@ -286,7 +286,7 @@ bool TopicReplay::exportTopic(const QJsonObject &attributes,
if (!topicData.isValid)
{
ERROR_LOG() << "topicData is invalid";
ERROR_LOG(m_logger) << "topicData is invalid";
exportNotifier->setExportFailed();
return false;
}
@@ -304,7 +304,7 @@ bool TopicReplay::exportTopic(const QJsonObject &attributes,
void TopicReplay::onWidgetPlaced(const QRect &geometry)
{
WARNING_LOG() << "TopicReplay::onWidgetPlaced() - geo: " << geometry.x() << "/" << geometry.y()
WARNING_LOG(m_logger) << "TopicReplay::onWidgetPlaced() - geo: " << geometry.x() << "/" << geometry.y()
<< " m_isAudio=" << m_isAudio;
m_dialogGeometry = geometry;
@@ -315,17 +315,17 @@ void TopicReplay::onWidgetPlaced(const QRect &geometry)
PlaybackApp *app = m_isAudio ? m_dataIfc->audioPresentationApp() : m_dataIfc->videoPresentationApp();
if (app == nullptr)
{
ERROR_LOG() << "app missing!";
ERROR_LOG(m_logger) << "app missing!";
return;
}
if (!app->inUse())
{
ERROR_LOG() << "app not in use - waiting for playbackInit to aquire it";
ERROR_LOG(m_logger) << "app not in use - waiting for playbackInit to aquire it";
return;
}
DEBUG_LOG() << "setGeometry";
DEBUG_LOG(m_logger) << "setGeometry";
app->setGeometry(*m_dialogGeometry);
}