Skip to content

Commit 1885e10

Browse files
committed
Rename Mlt::Controller::restart to reload
This name better reflects its behavior. Also, make the XML parameter required since this is used when changing profile/video-mode. You need to serialize the XML before making that change, before calling this function.
1 parent 6c78c4b commit 1885e10

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/mainwindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3355,7 +3355,7 @@ void MainWindow::cropSource(const QRectF &rect)
33553355
MLT.setPreviewScale(Settings.playerPreviewScale());
33563356
auto xml = MLT.XML();
33573357
emit profileChanged();
3358-
MLT.restart(xml);
3358+
MLT.reload(xml);
33593359
}
33603360
emit producerOpened(false);
33613361
}
@@ -4523,7 +4523,7 @@ void MainWindow::onProfileTriggered(QAction *action)
45234523
// Save the XML to get correct in/out points before profile is changed.
45244524
QString xml = MLT.XML(producer);
45254525
setProfile(action->data().toString());
4526-
MLT.restart(xml);
4526+
MLT.reload(xml);
45274527
emit producerOpened(false);
45284528
} else {
45294529
Settings.setPlayerProfile(action->data().toString());
@@ -4561,7 +4561,7 @@ void MainWindow::on_actionAddCustomProfile_triggered()
45614561
// Use the new profile.
45624562
emit profileChanged();
45634563
if (!xml.isEmpty()) {
4564-
MLT.restart(xml);
4564+
MLT.reload(xml);
45654565
emit producerOpened(false);
45664566
}
45674567
}

src/mltcontroller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ void Controller::fixLengthProperties(Service &service)
891891
parser.start(service);
892892
}
893893

894-
void Controller::restart(const QString &xml)
894+
void Controller::reload(const QString &xml)
895895
{
896896
if (!m_consumer || !m_consumer->is_valid() || !m_producer || !m_producer->is_valid())
897897
return;

src/mltcontroller.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Controller
122122
void setIn(int);
123123
void setOut(int);
124124
void fixLengthProperties(Service &service);
125-
void restart(const QString &xml = "");
125+
void reload(const QString &xml);
126126
void resetURL();
127127
QImage image(Frame *frame, int width, int height);
128128
QImage image(Mlt::Producer &producer, int frameNumber, int width, int height);

0 commit comments

Comments
 (0)