KThumb::KThumb(KUrl url, int width, int height, QObject * parent, const char *name):QObject(parent), m_url(url), m_width(width), m_height(height)
{
kDebug()<<"+++++++++++ CREATING THMB PROD FOR: "<<url;
- m_profile = Mlt::Profile((char*) KdenliveSettings::current_profile().data());
+ m_profile = new Mlt::Profile((char*) qstrdup(KdenliveSettings::current_profile().toUtf8()));
}
KThumb::~KThumb()
{
+ if (m_profile) delete m_profile;
//if (thumbProducer.running ()) thumbProducer.exit();
}
if (m_url.isEmpty()) return;
QPixmap pix(m_width, m_height);
char *tmp = Render::decodedString(m_url.path());
- Mlt::Producer m_producer(m_profile, tmp);
+ Mlt::Producer m_producer(*m_profile, tmp);
delete tmp;
if (m_producer.is_blank()) {
}
Mlt::Frame * m_frame;
mlt_image_format format = mlt_image_rgb24a;
- Mlt::Filter m_convert(m_profile, "avcolour_space");
+ Mlt::Filter m_convert(*m_profile, "avcolour_space");
m_convert.set("forced", mlt_image_rgb24a);
m_producer.attach(m_convert);
if (frame != -1) {
#include <KLocale>
#include "renderer.h"
+#include "kdenlivesettings.h"
static void consumer_frame_show(mlt_consumer, Render * self, mlt_frame frame_ptr)
{
Render::Render(const QString & rendererName, int winid, int extid, QWidget *parent):QObject(parent), m_name(rendererName), m_mltConsumer(NULL), m_mltProducer(NULL), m_mltTextProducer(NULL), m_sceneList(QDomDocument()), m_winid(-1), m_framePosition(0), m_generateScenelist(false), isBlocked(true)
{
- m_mltProfile = new Mlt::Profile("pal_dv");
+ kDebug()<<"////////// USING PROFILE: "<<qstrdup(KdenliveSettings::current_profile().toUtf8());
+ m_mltProfile = new Mlt::Profile((char*) qstrdup(KdenliveSettings::current_profile().toUtf8()));
refreshTimer = new QTimer( this );
connect( refreshTimer, SIGNAL(timeout()), this, SLOT( refresh()) );