m_reloadAction(NULL),
m_extractAudioAction(NULL),
m_transcodeAction(NULL),
- m_stabilizeAction(NULL),
+ m_clipsActionsMenu(NULL),
m_doc(NULL),
m_refreshed(false),
m_allClipsProcessed(false),
m_menu->addMenu(stabilizeMenu);
if (stabilizeMenu->isEmpty())
stabilizeMenu->setEnabled(false);
- m_stabilizeAction=stabilizeMenu;
+ m_clipsActionsMenu = stabilizeMenu;
}
m_menu->addAction(m_reloadAction);
QDomElement e = item->toXml();
// Make sure we get the correct producer length if it was adjusted in timeline
if (t == COLOR || t == IMAGE || t == SLIDESHOW || t == TEXT) {
- int length = QString(clip->producerProperty("length")).toInt();
- if (length > 0 && !e.hasAttribute("length")) {
- e.setAttribute("length", length);
- }
+ int length = QString(clip->producerProperty("length")).toInt();
+ if (length > 0 && !e.hasAttribute("length")) {
+ e.setAttribute("length", length);
+ }
+ e.setAttribute("duration", clip->getProperty("duration"));
}
resetThumbsProducer(clip);
m_render->getFileProperties(e, item->clipId(), m_listView->iconSize().height(), true);
m_reloadAction->setEnabled(false);
m_extractAudioAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
- m_stabilizeAction->setEnabled(false);
+ m_clipsActionsMenu->setEnabled(false);
} else {
if (item->type() == PROJECTSUBCLIPTYPE) {
// this is a sub item, use base clip
emit clipSelected(clip->referencedClip(), sub->zone());
m_extractAudioAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
- m_stabilizeAction->setEnabled(false);
+ m_clipsActionsMenu->setEnabled(false);
m_reloadAction->setEnabled(false);
adjustProxyActions(clip);
return;
m_reloadAction->setEnabled(true);
m_extractAudioAction->setEnabled(true);
m_transcodeAction->setEnabled(true);
- m_stabilizeAction->setEnabled(true);
+ m_clipsActionsMenu->setEnabled(true);
if (clip && clip->clipType() == IMAGE && !KdenliveSettings::defaultimageapp().isEmpty()) {
m_openAction->setIcon(KIcon(KdenliveSettings::defaultimageapp()));
m_openAction->setEnabled(true);
m_reloadAction->setEnabled(false);
m_extractAudioAction->setEnabled(true);
m_transcodeAction->setEnabled(false);
- m_stabilizeAction->setEnabled(false);
+ m_clipsActionsMenu->setEnabled(false);
}
adjustProxyActions(clip);
}
{
if (clip == NULL || clip->type() != PROJECTCLIPTYPE || clip->clipType() == COLOR || clip->clipType() == TEXT || clip->clipType() == SLIDESHOW) {
- m_stabilizeAction->setEnabled(false);
+ m_clipsActionsMenu->setEnabled(false);
return;
}
- m_stabilizeAction->setEnabled(true);
+ m_clipsActionsMenu->setEnabled(true);
}
m_reloadAction->setEnabled(enable);
m_extractAudioAction->setEnabled(enable);
m_transcodeAction->setEnabled(enable);
- m_stabilizeAction->setEnabled(enable);
+ m_clipsActionsMenu->setEnabled(enable);
if (enable) {
ProjectItem *clip = NULL;
if (m_listView->currentItem()->type() == PROJECTSUBCLIPTYPE) {
clip = static_cast <ProjectItem*>(item->parent());
m_extractAudioAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
- m_stabilizeAction->setEnabled(false);
+ m_clipsActionsMenu->setEnabled(false);
adjustProxyActions(clip);
} else if (m_listView->currentItem()->type() == PROJECTCLIPTYPE) {
clip = static_cast <ProjectItem*>(item);
} else {
m_extractAudioAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
- m_stabilizeAction->setEnabled(false);
+ m_clipsActionsMenu->setEnabled(false);
}
if (clip && clip->clipType() == IMAGE && !KdenliveSettings::defaultimageapp().isEmpty()) {
m_openAction->setIcon(KIcon(KdenliveSettings::defaultimageapp()));
m_openAction->setEnabled(true);
m_reloadAction->setEnabled(true);
m_transcodeAction->setEnabled(true);
- m_stabilizeAction->setEnabled(true);
+ m_clipsActionsMenu->setEnabled(true);
return;
}
else if (item && item->type() == PROJECTFOLDERTYPE && item->childCount() > 0) {
m_openAction->setEnabled(false);
m_reloadAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
- m_stabilizeAction->setEnabled(false);
+ m_clipsActionsMenu->setEnabled(false);
m_proxyAction->setEnabled(false);
}
resetThumbsProducer(clip);
m_render->getFileProperties(xml, clip->getId(), m_listView->iconSize().height(), replace);
}
+ else if (item->numReferences() > 0) {
+ // In some cases, like slowmotion clips, the producer is not loaded automatically be MLT
+ m_render->getFileProperties(xml, clip->getId(), m_listView->iconSize().height(), replace);
+ }
}
else if (clip->isPlaceHolder()) {
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
{
QString toReload;
ProjectItem *item = getItemById(clipId);
- int queue = m_render->processingItems();
if (item && producer) {
monitorItemEditing(false);
DocClipBase *clip = item->referencedClip();
}
item->setProperties(properties, metadata);
clip->setProducer(producer, replace);
+ m_render->processingDone(clipId);
// Proxy stuff
QString size = properties.value("frame_size");
}
if (!toReload.isEmpty())
item->slotSetToolTip();
- } else kDebug() << "//////// COULD NOT FIND CLIP TO UPDATE PRPS...";
+ } else {
+ kDebug() << "//////// COULD NOT FIND CLIP TO UPDATE PRPS...";
+ m_render->processingDone(clipId);
+ }
+ int queue = m_render->processingItems();
if (queue == 0) {
monitorItemEditing(true);
if (item && m_thumbnailQueue.isEmpty()) {
m_reloadAction->setEnabled(true);
m_extractAudioAction->setEnabled(true);
m_transcodeAction->setEnabled(true);
- m_stabilizeAction->setEnabled(true);
+ m_clipsActionsMenu->setEnabled(true);
if (clip->clipType() == IMAGE && !KdenliveSettings::defaultimageapp().isEmpty()) {
m_openAction->setIcon(KIcon(KdenliveSettings::defaultimageapp()));
m_openAction->setEnabled(true);
}
}
if (m_jobList.isEmpty()) return;
- int count = 0;
+
m_jobMutex.lock();
+ int count = 0;
for (int i = 0; i < m_jobList.count(); i++) {
if (m_jobList.at(i)->status() == JOBWORKING || m_jobList.at(i)->status() == JOBWAITING)
count ++;
i--;
}
}
-
- emit jobCount(count);
+ emit jobCount(count);
m_jobMutex.unlock();
-
if (m_jobThreads.futures().isEmpty() || m_jobThreads.futures().count() < KdenliveSettings::proxythreads()) m_jobThreads.addFuture(QtConcurrent::run(this, &ProjectList::slotProcessJobs));
}
MeltJob *jb = static_cast<MeltJob *> (job);
jb->setProducer(currentClip->getProducer(), currentClip->fileURL());
if (jb->isProjectFilter())
- connect(job, SIGNAL(gotFilterJobResults(QString,int, int, stringMap,stringMap)), this, SLOT(slotGotFilterJobResults(QString,int, int,stringMap,stringMap)));
+ connect(job, SIGNAL(gotFilterJobResults(QString,int, int, stringMap,stringMap)), this, SLOT(slotGotFilterJobResults(QString,int, int,stringMap,stringMap)));
else
connect(job, SIGNAL(gotFilterJobResults(QString,int, int, stringMap,stringMap)), this, SIGNAL(gotFilterJobResults(QString,int, int,stringMap,stringMap)));
}
job->description = description;
m_jobList.append(job);
setJobStatus(item, job->jobType, JOBWAITING, 0, job->statusMessage());
+ slotCheckJobProcess();
}
- slotCheckJobProcess();
}
+
void ProjectList::slotPrepareJobsMenu()
{
//kDebug()<<"// FILTER RES:\n"<<filterInfo<<"\n--------------\n"<<results;
ProjectItem *clip = getItemById(id);
if (!clip) return;
+
// Check for return value
int markersType = -1;
if (filterInfo.contains("addmarkers")) markersType = filterInfo.value("addmarkers").toInt();