svn path=/branches/KDE4/; revision=2607
m_dar = producer->profile()->dar();
}
m_dar = producer->profile()->dar();
}
+bool KThumb::hasProducer() const {
+ return m_producer != NULL;
+}
+
void KThumb::updateClipUrl(KUrl url) {
m_url = url;
if (m_producer) {
void KThumb::updateClipUrl(KUrl url) {
m_url = url;
if (m_producer) {
const int twidth = (int)(KdenliveSettings::trackheight() * m_dar);
const int theight = KdenliveSettings::trackheight();
const int twidth = (int)(KdenliveSettings::trackheight() * m_dar);
const int theight = KdenliveSettings::trackheight();
mlt_image_format format = mlt_image_yuv422;
if (m_producer->is_blank()) {
QPixmap pix(twidth, theight);
mlt_image_format format = mlt_image_yuv422;
if (m_producer->is_blank()) {
QPixmap pix(twidth, theight);
//videoThumbProducer.getThumb(frame);
m_producer->seek(frame);
mltFrame = m_producer->get_frame();
//videoThumbProducer.getThumb(frame);
m_producer->seek(frame);
mltFrame = m_producer->get_frame();
+ if (frame2 != -1) m_producer->seek(frame2);
if (!mltFrame) {
kDebug() << "///// BROKEN FRAME";
QPixmap p(twidth, theight);
if (!mltFrame) {
kDebug() << "///// BROKEN FRAME";
QPixmap p(twidth, theight);
emit thumbReady(frame, p);
return;
} else {
emit thumbReady(frame, p);
return;
} else {
- if (frame2 != -1) m_producer->seek(frame2);
int frame_width = 0;
int frame_height = 0;
mltFrame->set("normalised_height", theight);
int frame_width = 0;
int frame_height = 0;
mltFrame->set("normalised_height", theight);
~KThumb();
void setProducer(Mlt::Producer *producer);
void askForAudioThumbs(const QString &id);
~KThumb();
void setProducer(Mlt::Producer *producer);
void askForAudioThumbs(const QString &id);
+ bool hasProducer() const;
public slots:
void extractImage(int frame, int frame2);
public slots:
void extractImage(int frame, int frame2);