svn path=/trunk/kdenlive/; revision=4935
if (m_properties.contains("threads")) m_audioTrackProducers.at(track)->set("threads", m_properties.value("threads").toInt());
m_audioTrackProducers.at(track)->set("video_index", -1);
if (m_properties.contains("audio_index")) m_audioTrackProducers.at(track)->set("audio_index", m_properties.value("audio_index").toInt());
if (m_properties.contains("threads")) m_audioTrackProducers.at(track)->set("threads", m_properties.value("threads").toInt());
m_audioTrackProducers.at(track)->set("video_index", -1);
if (m_properties.contains("audio_index")) m_audioTrackProducers.at(track)->set("audio_index", m_properties.value("audio_index").toInt());
- char *tmp = (char *) qstrdup(QString(getId() + '_' + QString::number(track) + "_audio").toUtf8().data());
- m_audioTrackProducers.at(track)->set("id", tmp);
- delete[] tmp;
+ m_audioTrackProducers.at(track)->set("id", QString(getId() + '_' + QString::number(track) + "_audio").toUtf8().data());
}
return m_audioTrackProducers.at(track);
}
}
return m_audioTrackProducers.at(track);
}
if (m_properties.contains("threads")) m_videoOnlyProducer->set("threads", m_properties.value("threads").toInt());
m_videoOnlyProducer->set("audio_index", -1);
if (m_properties.contains("video_index")) m_videoOnlyProducer->set("video_index", m_properties.value("video_index").toInt());
if (m_properties.contains("threads")) m_videoOnlyProducer->set("threads", m_properties.value("threads").toInt());
m_videoOnlyProducer->set("audio_index", -1);
if (m_properties.contains("video_index")) m_videoOnlyProducer->set("video_index", m_properties.value("video_index").toInt());
- char *tmp = (char *) qstrdup(QString(getId() + "_video").toUtf8().data());
- m_videoOnlyProducer->set("id", tmp);
- delete[] tmp;
+ m_videoOnlyProducer->set("id", QString(getId() + "_video").toUtf8().data());
}
return m_videoOnlyProducer;
}
}
return m_videoOnlyProducer;
}
if (m_properties.contains("threads")) m_baseTrackProducers[track]->set("threads", m_properties.value("threads").toInt());
if (m_properties.contains("video_index")) m_baseTrackProducers[track]->set("video_index", m_properties.value("video_index").toInt());
if (m_properties.contains("audio_index")) m_baseTrackProducers[track]->set("audio_index", m_properties.value("audio_index").toInt());
if (m_properties.contains("threads")) m_baseTrackProducers[track]->set("threads", m_properties.value("threads").toInt());
if (m_properties.contains("video_index")) m_baseTrackProducers[track]->set("video_index", m_properties.value("video_index").toInt());
if (m_properties.contains("audio_index")) m_baseTrackProducers[track]->set("audio_index", m_properties.value("audio_index").toInt());
- char *tmp = (char *) qstrdup(QString(getId() + '_' + QString::number(track)).toUtf8().data());
- m_baseTrackProducers[track]->set("id", tmp);
- delete[] tmp;
+ m_baseTrackProducers[track]->set("id", QString(getId() + '_' + QString::number(track)).toUtf8().data());
if (KdenliveSettings::dropbframes() && m_baseTrackProducers.at(i)->get("skip_loop_filter") && strcmp(m_baseTrackProducers.at(i)->get("skip_loop_filter"), "all") == 0) {
m_baseTrackProducers[track]->set("skip_loop_filter", "all");
m_baseTrackProducers[track]->set("skip_frame", "bidir");
if (KdenliveSettings::dropbframes() && m_baseTrackProducers.at(i)->get("skip_loop_filter") && strcmp(m_baseTrackProducers.at(i)->get("skip_loop_filter"), "all") == 0) {
m_baseTrackProducers[track]->set("skip_loop_filter", "all");
m_baseTrackProducers[track]->set("skip_frame", "bidir");
if (m_baseTrackProducers.count() == 0) return;
kDebug() << "//////////// REFRESH CLIP !!!!!!!!!!!!!!!!";
if (m_clipType == SLIDESHOW) {
if (m_baseTrackProducers.count() == 0) return;
kDebug() << "//////////// REFRESH CLIP !!!!!!!!!!!!!!!!";
if (m_clipType == SLIDESHOW) {
- /*char *tmp = (char *) qstrdup(getProperty("resource").toUtf8().data());
- Mlt::Producer producer(*(m_clipProducer->profile()), tmp);
- delete[] tmp;
+ /*Mlt::Producer producer(*(m_clipProducer->profile()), getProperty("resource").toUtf8().data());
delete m_clipProducer;
m_clipProducer = new Mlt::Producer(producer.get_producer());
if (!getProperty("out").isEmpty()) m_clipProducer->set_in_and_out(getProperty("in").toInt(), getProperty("out").toInt());*/
delete m_clipProducer;
m_clipProducer = new Mlt::Producer(producer.get_producer());
if (!getProperty("out").isEmpty()) m_clipProducer->set_in_and_out(getProperty("in").toInt(), getProperty("out").toInt());*/
if (filter && strcmp(filter->get("mlt_service"), "luma") == 0) {
filter->set("cycle", getProperty("ttl").toInt());
filter->set("duration", getProperty("luma_duration").toInt());
if (filter && strcmp(filter->get("mlt_service"), "luma") == 0) {
filter->set("cycle", getProperty("ttl").toInt());
filter->set("duration", getProperty("luma_duration").toInt());
- QString resource = getProperty("luma_file");
- char *tmp = (char *) qstrdup(resource.toUtf8().data());
- filter->set("luma.resource", tmp);
- delete[] tmp;
+ filter->set("luma.resource", getProperty("luma_file").toUtf8().data());
if (!getProperty("softness").isEmpty()) {
int soft = getProperty("softness").toInt();
filter->set("luma.softness", (double) soft / 100.0);
if (!getProperty("softness").isEmpty()) {
int soft = getProperty("softness").toInt();
filter->set("luma.softness", (double) soft / 100.0);
Mlt::Filter *filter = new Mlt::Filter(*(m_baseTrackProducers.at(0)->profile()), "luma");
filter->set("cycle", getProperty("ttl").toInt());
filter->set("duration", getProperty("luma_duration").toInt());
Mlt::Filter *filter = new Mlt::Filter(*(m_baseTrackProducers.at(0)->profile()), "luma");
filter->set("cycle", getProperty("ttl").toInt());
filter->set("duration", getProperty("luma_duration").toInt());
- QString resource = getProperty("luma_file");
- char *tmp = (char *) qstrdup(resource.toUtf8().data());
- filter->set("luma.resource", tmp);
- delete[] tmp;
+ filter->set("luma.resource", getProperty("luma_file").toUtf8().data());
if (!getProperty("softness").isEmpty()) {
int soft = getProperty("softness").toInt();
filter->set("luma.softness", (double) soft / 100.0);
if (!getProperty("softness").isEmpty()) {
int soft = getProperty("softness").toInt();
filter->set("luma.softness", (double) soft / 100.0);
} else if (key == "out") setDuration(GenTime(value.toInt(), KdenliveSettings::project_fps()));
//else if (key == "transparency") m_clipProducer->set("transparency", value.toInt());
else if (key == "colour") {
} else if (key == "out") setDuration(GenTime(value.toInt(), KdenliveSettings::project_fps()));
//else if (key == "transparency") m_clipProducer->set("transparency", value.toInt());
else if (key == "colour") {
- char *tmp = (char *) qstrdup(value.toUtf8().data());
- setProducerProperty("colour", tmp);
- delete[] tmp;
+ setProducerProperty("colour", value.toUtf8().data());
} else if (key == "templatetext") {
} else if (key == "templatetext") {
- char *tmp = (char *) qstrdup(value.toUtf8().data());
- setProducerProperty("templatetext", tmp);
- delete[] tmp;
+ setProducerProperty("templatetext", value.toUtf8().data());
setProducerProperty("force_reload", 1);
} else if (key == "xmldata") {
setProducerProperty("force_reload", 1);
} else if (key == "xmldata") {
- char *tmp = (char *) qstrdup(value.toUtf8().data());
- setProducerProperty("xmldata", tmp);
- delete[] tmp;
+ setProducerProperty("xmldata", value.toUtf8().data());
setProducerProperty("force_reload", 1);
} else if (key == "force_aspect_ratio") {
if (value.isEmpty()) {
setProducerProperty("force_reload", 1);
} else if (key == "force_aspect_ratio") {
if (value.isEmpty()) {
- char *tmp = (char*) qstrdup(profilename.toUtf8().data());
- Mlt::Profile profile(tmp);
- delete[] tmp;
+ Mlt::Profile profile(profilename.toUtf8().data());
QTreeWidgetItem *item = new QTreeWidgetItem(m_view.vobs_list, QStringList() << url.path() << QString() << KIO::convertSize(fileSize));
item->setData(0, Qt::UserRole, fileSize);
item->setIcon(0, KIcon("video-x-generic"));
QPixmap pix(60, 45);
QTreeWidgetItem *item = new QTreeWidgetItem(m_view.vobs_list, QStringList() << url.path() << QString() << KIO::convertSize(fileSize));
item->setData(0, Qt::UserRole, fileSize);
item->setIcon(0, KIcon("video-x-generic"));
QPixmap pix(60, 45);
- tmp = (char *) qstrdup(url.path().toUtf8().data());
- Mlt::Producer *producer = new Mlt::Producer(profile, tmp);
- delete[] tmp;
+ Mlt::Producer *producer = new Mlt::Producer(profile, url.path().toUtf8().data());
if (producer->is_blank() == false) {
int width = 45.0 * profile.dar();
if (producer->is_blank() == false) {
int width = 45.0 * profile.dar();
- char *tmp = (char*) qstrdup(profilename.toUtf8().data());
- Mlt::Profile profile(tmp);
- delete[] tmp;
+ Mlt::Profile profile(profilename.toUtf8().data());
QPixmap pix(180, 135);
for (int i = 0; i < max; i++) {
QTreeWidgetItem *item = m_view.vobs_list->topLevelItem(i);
QPixmap pix(180, 135);
for (int i = 0; i < max; i++) {
QTreeWidgetItem *item = m_view.vobs_list->topLevelItem(i);
- tmp = (char *) qstrdup(item->text(0).toUtf8().data());
- Mlt::Producer *producer = new Mlt::Producer(profile, tmp);
- delete[] tmp;
+ Mlt::Producer *producer = new Mlt::Producer(profile, item->text(0).toUtf8().data());
if (producer->is_blank() == false) {
//pix = KThumb::getFrame(producer, 0, 135 * profile.dar(), 135);
if (producer->is_blank() == false) {
//pix = KThumb::getFrame(producer, 0, 135 * profile.dar(), 135);
label_opacity->setHidden(true);
spinTransp->setHidden(true);
}
label_opacity->setHidden(true);
spinTransp->setHidden(true);
}
- char *tmp = (char *) qstrdup(val.toUtf8().data());
- if (m_geom) m_geom->parse(tmp, maxFrame - minFrame, m_profile.width, m_profile.height);
- else m_geom = new Mlt::Geometry(tmp, maxFrame - minFrame, m_profile.width, m_profile.height);
- delete[] tmp;
+ if (m_geom)
+ m_geom->parse(val.toUtf8().data(), maxFrame - minFrame, m_profile.width, m_profile.height);
+ else
+ m_geom = new Mlt::Geometry(val.toUtf8().data(), maxFrame - minFrame, m_profile.width, m_profile.height);
//kDebug() << " / / UPDATING TRANSITION VALUE: " << m_geom->serialise();
//read param her and set rect
//kDebug() << " / / UPDATING TRANSITION VALUE: " << m_geom->serialise();
//read param her and set rect
bool MltPreview::create(const QString &path, int width, int height, QImage &img)
{
Mlt::Profile *profile = new Mlt::Profile("dv_pal");
bool MltPreview::create(const QString &path, int width, int height, QImage &img)
{
Mlt::Profile *profile = new Mlt::Profile("dv_pal");
- char *tmp = (char *) qstrdup(path.toUtf8().data());
- Mlt::Producer *producer = new Mlt::Producer(*profile, tmp);
- delete[] tmp;
+ Mlt::Producer *producer = new Mlt::Producer(*profile, path.toUtf8().data());
if (producer->is_blank()) {
if (producer->is_blank()) {