mirror of
https://invent.kde.org/multimedia/kdenlive
synced 2025-12-07 00:39:58 +01:00
Compare commits
2 Commits
work/task-
...
v16.04.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46e20dcceb | ||
|
|
994606ee86 |
@@ -2862,9 +2862,13 @@ void Bin::showTitleWidget(ProjectClip *clip)
|
||||
QString titlepath = m_doc->projectFolder().path() + QDir::separator() + "titles/";
|
||||
TitleWidget dia_ui(QUrl(), m_doc->timecode(), titlepath, pCore->monitorManager()->projectMonitor()->render, pCore->window());
|
||||
connect(&dia_ui, SIGNAL(requestBackgroundFrame()), pCore->monitorManager()->projectMonitor(), SLOT(slotGetCurrentImage()));
|
||||
if (!path.isEmpty()) {
|
||||
dia_ui.loadTitle(QUrl::fromLocalFile(path));
|
||||
} else {
|
||||
QDomDocument doc;
|
||||
doc.setContent(clip->getProducerProperty(QStringLiteral("xmldata")));
|
||||
dia_ui.setXml(doc);
|
||||
}
|
||||
if (dia_ui.exec() == QDialog::Accepted) {
|
||||
QMap <QString, QString> newprops;
|
||||
newprops.insert(QStringLiteral("xmldata"), dia_ui.xml().toString());
|
||||
|
||||
@@ -356,6 +356,8 @@ QDomDocument KdenliveDoc::createEmptyDocument(const QList <TrackInfo> &tracks)
|
||||
QDomElement blk = doc.createElement(QStringLiteral("producer"));
|
||||
blk.setAttribute(QStringLiteral("in"), 0);
|
||||
blk.setAttribute(QStringLiteral("out"), 500);
|
||||
blk.setAttribute(QStringLiteral("aspect_ratio"), 1);
|
||||
blk.setAttribute(QStringLiteral("set.test_audio"), 0);
|
||||
blk.setAttribute(QStringLiteral("id"), QStringLiteral("black"));
|
||||
|
||||
QDomElement property = doc.createElement(QStringLiteral("property"));
|
||||
|
||||
@@ -81,6 +81,8 @@ Render::Render(Kdenlive::MonitorId rendererName, BinController *binController, G
|
||||
m_blackClip = new Mlt::Producer(*m_qmlView->profile(), "colour:black");
|
||||
m_blackClip->set("id", "black");
|
||||
m_blackClip->set("mlt_type", "producer");
|
||||
m_blackClip->set("aspect_ratio", 1);
|
||||
m_blackClip->set("set.test_audio", 0);
|
||||
m_mltProducer = m_blackClip->cut(0, 1);
|
||||
m_qmlView->setProducer(m_mltProducer);
|
||||
m_mltConsumer = qmlView->consumer();
|
||||
@@ -2106,8 +2108,21 @@ QList <TransitionInfo> Render::mltInsertTrack(int ix, const QString &name, bool
|
||||
blockSignals(true);
|
||||
service.lock();
|
||||
Mlt::Tractor tractor(service);
|
||||
// Find available track name
|
||||
QStringList trackNames;
|
||||
for (int i = 0; i < tractor.count(); i++) {
|
||||
QScopedPointer<Mlt::Producer> track(tractor.track(i));
|
||||
trackNames << track->get("id");
|
||||
}
|
||||
QString newName = QStringLiteral("playlist0");
|
||||
int i = 1;
|
||||
while (trackNames.contains(newName)) {
|
||||
newName = QString("playlist%1").arg(i);
|
||||
i++;
|
||||
}
|
||||
Mlt::Playlist playlist(*service.profile());
|
||||
playlist.set("kdenlive:track_name", name.toUtf8().constData());
|
||||
playlist.set("id", newName.toUtf8().constData());
|
||||
int ct = tractor.count();
|
||||
if (ix > ct) {
|
||||
//qDebug() << "// ERROR, TRYING TO insert TRACK " << ix << ", max: " << ct;
|
||||
|
||||
Reference in New Issue
Block a user