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()));
if (m_mltConsumer) m_mltConsumer->set("full_screen", 1);
}
-void Render::buildConsumer(const QString profileName)
+void Render::buildConsumer(const QString &profileName)
{
delete m_blackClip;
m_blackClip = NULL;
return clip;
}
-int Render::resetProfile(const QString profileName, bool dropSceneList)
+int Render::resetProfile(const QString &profileName, bool dropSceneList)
{
QString scene;
if (!dropSceneList) scene = sceneList();
}
}
-void Render::getFileProperties(const QDomElement xml, const QString &clipId, int imageHeight, bool replaceProducer, bool selectClip)
+void Render::getFileProperties(const QDomElement &xml, const QString &clipId, int imageHeight, bool replaceProducer, bool selectClip)
{
QString path;
QLocale locale;
}
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)
return true;
}
-int Render::mltGetSpaceLength(const GenTime pos, int track, bool fromBlankStart)
+int Render::mltGetSpaceLength(const GenTime &pos, int track, bool fromBlankStart)
{
if (!m_mltProducer) {
kDebug() << "PLAYLIST NOT INITIALISED //////";
return trackProducer.get_playtime() - 1;
}
-void Render::mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int> trackTransitionStartList, int track, const GenTime duration, const GenTime timeOffset)
+void Render::mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int> trackTransitionStartList, int track, const GenTime &duration, const GenTime &timeOffset)
{
if (!m_mltProducer) {
kDebug() << "PLAYLIST NOT INITIALISED //////";