<parameter type="geometry" name="transition.geometry" default="0%,0%:100%x100%" opacity="false">
<name>Rectangle</name>
</parameter>
+ <parameter type="bool" name="transition.distort" default="0">
+ <name>Distort</name>
+ </parameter>
</effect>
paramList.append(quickParameterFill(ret, "keyed", "keyed", "fixed", "1", "1", "1"));
paramList.append(quickParameterFill(ret, i18n("Geometry"), "geometry", "geometry", "0/0:100%x100%:100%", "0/0:100%x100%:100%", "0/0:100%x100%:100%", "", "", "", "", "", "true"));
-
+ paramList.append(quickParameterFill(ret, i18n("Distort"), "distort", "bool", "0", "0", "1"));
paramList.append(quickParameterFill(ret, i18n("Rotate X"), "rotate_x", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
paramList.append(quickParameterFill(ret, i18n("Rotate Y"), "rotate_y", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
paramList.append(quickParameterFill(ret, i18n("Rotate Z"), "rotate_z", "addedgeometry", "0", "-1800", "1800", QString(), QString(), "10"));
// Check encoding profiles
QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
- if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::v4l_parameters()) {
+ if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::v4l_parameters() || data.section(";", 1, 1) != KdenliveSettings::v4l_extension())) {
KdenliveSettings::setV4l_parameters(data.section(";", 0, 0));
KdenliveSettings::setV4l_extension(data.section(";", 1, 1));
}
data = m_configCapture.kcfg_decklink_profile->itemData(m_configCapture.kcfg_decklink_profile->currentIndex()).toString();
- if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::decklink_parameters()) {
+ if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::decklink_parameters() || data.section(";", 1, 1) != KdenliveSettings::decklink_extension())) {
KdenliveSettings::setDecklink_parameters(data.section(";", 0, 0));
KdenliveSettings::setDecklink_extension(data.section(";", 1, 1));
}
data = m_configProject.kcfg_proxy_profile->itemData(m_configProject.kcfg_proxy_profile->currentIndex()).toString();
- if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::proxyparams()) {
+ if (!data.isEmpty() && (data.section(";", 0, 0) != KdenliveSettings::proxyparams() || data.section(";", 1, 1) != KdenliveSettings::proxyextension())) {
KdenliveSettings::setProxyparams(data.section(";", 0, 0));
KdenliveSettings::setProxyextension(data.section(";", 1, 1));
}
// Populate encoding profiles
KConfig conf("encodingprofiles.rc", KConfig::FullConfig, "appdata");
- if (KdenliveSettings::proxyparams().isEmpty()) {
+ if (KdenliveSettings::proxyparams().isEmpty() || KdenliveSettings::proxyextension().isEmpty()) {
KConfigGroup group(&conf, "proxy");
QMap< QString, QString > values = group.entryMap();
QMapIterator<QString, QString> i(values);
KdenliveSettings::setProxyextension(data.section(';', 1, 1));
}
}
- if (KdenliveSettings::v4l_parameters().isEmpty()) {
+ if (KdenliveSettings::v4l_parameters().isEmpty() || KdenliveSettings::v4l_extension().isEmpty()) {
KConfigGroup group(&conf, "video4linux");
QMap< QString, QString > values = group.entryMap();
QMapIterator<QString, QString> i(values);
KdenliveSettings::setV4l_extension(data.section(';', 1, 1));
}
}
- if (KdenliveSettings::decklink_parameters().isEmpty()) {
+ if (KdenliveSettings::decklink_parameters().isEmpty() || KdenliveSettings::decklink_extension().isEmpty()) {
KConfigGroup group(&conf, "decklink");
QMap< QString, QString > values = group.entryMap();
QMapIterator<QString, QString> i(values);
void ProjectList::slotGotProxy(const QString &proxyPath)
{
- if (proxyPath.isEmpty() || !m_refreshed || m_abortAllProxies) return;
+ if (proxyPath.isEmpty() || m_abortAllProxies) return;
QTreeWidgetItemIterator it(m_listView);
ProjectItem *item;
if (replace) resetThumbsProducer(clip);
m_render->getFileProperties(xml, clip->getId(), m_listView->iconSize().height(), replace);
}
- else {
+ else if (clip->isPlaceHolder()) {
item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled);
if (item->data(0, Qt::DecorationRole).isNull()) {
item->setData(0, Qt::DecorationRole, missingPixmap);
if (item->parent()) {
if (item->parent()->type() == PROJECTFOLDERTYPE)
static_cast <FolderProjectItem *>(item->parent())->switchIcon();
- } else if (KdenliveSettings::checkfirstprojectclip() && m_listView->topLevelItemCount() == 1) {
+ } else if (KdenliveSettings::checkfirstprojectclip() && m_listView->topLevelItemCount() == 1 && m_refreshed && m_allClipsProcessed) {
// this is the first clip loaded in project, check if we want to adjust project settings to the clip
updatedProfile = adjustProjectProfileToItem(item);
}
if (!k.key().isEmpty()) {
QString params = k.value().section(';', 0, 0);
QString extension = k.value().section(';', 1, 1);
- if (params == proxyparameters && extension == proxyextension) {
+ if (ix == -1 && ((params == proxyparameters && extension == proxyextension) || (proxyparameters.isEmpty() || proxyextension.isEmpty()))) {
// this is the current profile
ix = proxy_profile->count();
}
m_infoMutex.unlock();
}
-int Render::processingItems() const
+int Render::processingItems()
{
+ m_infoMutex.lock();
int count = m_requestList.count();
- if (m_infoThread.isRunning()) count++;
+ if (!m_processingClipId.isEmpty()) {
+ // one clip is currently processed
+ count++;
+ }
+ m_infoMutex.unlock();
return count;
}
if (producer == NULL || producer->is_blank() || !producer->is_valid()) {
kDebug() << " / / / / / / / / ERROR / / / / // CANNOT LOAD PRODUCER: "<<path;
+ m_processingClipId.clear();
if (proxyProducer) {
// Proxy file is corrupted
emit removeInvalidProxy(info.clipId, false);
}
else emit removeInvalidClip(info.clipId, info.replaceProducer);
delete producer;
- m_processingClipId.clear();
continue;
}
producer->set("out", info.xml.attribute("proxy_out").toInt());
if (producer->get_out() != info.xml.attribute("proxy_out").toInt()) {
// Proxy file length is different than original clip length, this will corrupt project so disable this proxy clip
+ m_processingClipId.clear();
emit removeInvalidProxy(info.clipId, true);
delete producer;
- m_processingClipId.clear();
continue;
}
}
emit replyGetImage(info.clipId, img);
}
}
- emit replyGetFileProperties(info.clipId, producer, stringMap(), stringMap(), info.replaceProducer);
m_processingClipId.clear();
+ emit replyGetFileProperties(info.clipId, producer, stringMap(), stringMap(), info.replaceProducer);
continue;
}
metadataPropertyMap[ name.section('.', 0, -2)] = value;
}
producer->seek(0);
+ m_processingClipId.clear();
emit replyGetFileProperties(info.clipId, producer, filePropertyMap, metadataPropertyMap, info.replaceProducer);
}
m_processingClipId.clear();
m_mltConsumer->purge();
consumerPosition = m_mltConsumer->position();
- if (m_mltProducer) {
- m_mltProducer->set_speed(0);
- currentId = m_mltProducer->get("id");
- delete m_mltProducer;
- m_mltProducer = NULL;
- emit stopped();
- }
blockSignals(true);
- if (producer && producer->is_valid()) {
- m_mltProducer = producer;
- } else m_mltProducer = m_blackClip->cut(0, 1);
+ if (!producer || !producer->is_valid()) {
+ if (producer) delete producer;
+ producer = m_blackClip->cut(0, 1);
+ }
- if (!m_mltProducer || !m_mltProducer->is_valid()) {
+ if (!producer || !producer->is_valid()) {
kDebug() << " WARNING - - - - -INVALID PLAYLIST: ";
return -1;
}
- if (position == -1 && m_mltProducer->get("id") == currentId) position = consumerPosition;
- if (position != -1) m_mltProducer->seek(position);
+ if (m_mltProducer) currentId = m_mltProducer->get("id");
+ emit stopped();
+ if (position == -1 && producer->get("id") == currentId) position = consumerPosition;
+ if (position != -1) producer->seek(position);
int volume = KdenliveSettings::volume();
- m_mltProducer->set("meta.volume", (double)volume / 100);
- m_fps = m_mltProducer->get_fps();
+ producer->set("meta.volume", (double)volume / 100);
+ m_fps = producer->get_fps();
blockSignals(false);
- m_mltConsumer->connect(*m_mltProducer);
+ m_mltConsumer->connect(*producer);
+
+ if (m_mltProducer) {
+ m_mltProducer->set_speed(0);
+ delete m_mltProducer;
+ m_mltProducer = NULL;
+ }
+ m_mltProducer = producer;
m_mltProducer->set_speed(0);
emit durationChanged(m_mltProducer->get_playtime());
if (m_mltConsumer->start() == -1) {
/** @brief Returns a pointer to the main producer. */
Mlt::Producer *getProducer();
/** @brief Returns the number of clips to process (When requesting clip info). */
- int processingItems() const;
+ int processingItems();
/** @brief Force processing of clip with selected id. */
void forceProcessing(const QString &id);
/** @brief Are we currently processing clip with selected id. */
while (ioctl(s->fd, VIDIOC_ENUM_FMT, &fmt) != -1)
{
- snprintf( value, sizeof(value), ">%c%c%c%c", fmt.pixelformat >> 0, fmt.pixelformat >> 8, fmt.pixelformat >> 16, fmt.pixelformat >> 24 );
- strcat(*pixelformatdescription, (char *) value);
+ if (strlen(*pixelformatdescription) > 2000) break;
+ if (snprintf( value, sizeof(value), ">%c%c%c%c", fmt.pixelformat >> 0, fmt.pixelformat >> 8, fmt.pixelformat >> 16, fmt.pixelformat >> 24 ) > 0)
+ strcat(*pixelformatdescription, (char *) value);
fprintf(stderr, "detected format: %s: %c%c%c%c\n", fmt.description, fmt.pixelformat >> 0, fmt.pixelformat >> 8,
fmt.pixelformat >> 16, fmt.pixelformat >> 24);
rates.pixel_format = fmt.pixelformat;
rates.width = image_size.width;
rates.height = image_size.height;
- snprintf( value, sizeof(value), ":%dx%d=", image_size.width, image_size.height );
- strcat(*pixelformatdescription, (char *) value);
+ if (strlen(*pixelformatdescription) > 2000) break;
+ if (snprintf( value, sizeof(value), ":%dx%d=", image_size.width, image_size.height ) > 0)
+ strcat(*pixelformatdescription, (char *) value);
fprintf(stderr, "Size: %dx%d: ", image_size.width, image_size.height);
while (ioctl(s->fd, VIDIOC_ENUM_FRAMEINTERVALS, &rates) != -1) {
- snprintf( value, sizeof(value), "%d/%d,", rates.un.discrete.denominator, rates.un.discrete.numerator );
- strcat(*pixelformatdescription, (char *) value);
+ if (strlen(*pixelformatdescription) > 2000) break;
+ if (snprintf( value, sizeof(value), "%d/%d,", rates.un.discrete.denominator, rates.un.discrete.numerator ) > 0)
+ strcat(*pixelformatdescription, (char *) value);
fprintf(stderr, "%d/%d, ", rates.un.discrete.numerator, rates.un.discrete.denominator);
rates.index ++;
}
itemSize = sizes.at(j).section("=", 0, 0);
itemRates = sizes.at(j).section("=", 1, 1).split(",", QString::SkipEmptyParts);
for (int k = 0; k < itemRates.count(); k++) {
- m_capture.v4l_formats->addItem("[" + format + "] " + itemSize + " (" + itemRates.at(k) + ")", QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section('/', 0, 0) << itemRates.at(k).section('/', 1, 1));
+ QString formatDescription = "[" + format + "] " + itemSize + " (" + itemRates.at(k) + ")";
+ if (m_capture.v4l_formats->findText(formatDescription) == -1)
+ m_capture.v4l_formats->addItem(formatDescription, QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section('/', 0, 0) << itemRates.at(k).section('/', 1, 1));
}
}
}