static void kdenlive_callback(void* /*ptr*/, int level, const char* fmt, va_list vl)
{
+// kDebug() << "log level" << level << QString().vsprintf(fmt, vl).simplified();
if (level > MLT_LOG_ERROR) return;
QString error;
QApplication::postEvent(qApp->activeWindow(), new MltErrorEvent(error.vsprintf(fmt, vl).simplified()));
return clip;
}
-int Render::resetProfile(const QString profileName, bool dropSceneList)
+int Render::resetProfile(const QString &profileName, bool dropSceneList)
{
QString scene;
if (!dropSceneList) scene = sceneList();
}
blockSignals(true);
- // WARNING: disabled because it caused crashes (see Kdenlive bug #2205 and #2206) - jbm
- /*if (KdenliveSettings::projectloading_avformatnovalidate())
- playlist.replace(">avformat</property>", ">avformat-novalidate</property>");
- else
- playlist.replace(">avformat-novalidate</property>", ">avformat</property>");*/
+
+ m_locale = QLocale();
+
m_mltProducer = new Mlt::Producer(*m_mltProfile, "xml-string", playlist.toUtf8().constData());
if (!m_mltProducer || !m_mltProducer->is_valid()) {
kDebug() << " WARNING - - - - -INVALID PLAYLIST: " << playlist.toUtf8().constData();
void Render::emitFrameUpdated(Mlt::Frame& frame)
{
- mlt_image_format format = mlt_image_rgb24a;
+ mlt_image_format format = mlt_image_rgb24;
int width = 0;
int height = 0;
const uchar* image = frame.get_image(format, width, height);
- QImage qimage(width, height, QImage::Format_ARGB32);
- memcpy(qimage.bits(), image, width * height * 4);
- emit frameUpdated(qimage.rgbSwapped());
+ QImage qimage(width, height, QImage::Format_RGB888);
+ memcpy(qimage.bits(), image, width * height * 3);
+ emit frameUpdated(qimage);
}
void Render::emitFrameNumber(double position)