summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
23803a2)
svn path=/trunk/kdenlive/; revision=5404
{
int pos = event->x();
int mappedXPos = qMax((int)(mapToScene(event->pos()).x() + 0.5), 0);
{
int pos = event->x();
int mappedXPos = qMax((int)(mapToScene(event->pos()).x() + 0.5), 0);
double snappedPos = getSnapPointForPos(mappedXPos);
emit mousePosition(mappedXPos);
double snappedPos = getSnapPointForPos(mappedXPos);
emit mousePosition(mappedXPos);
if (pos == m_cursorPos) return;
emit cursorMoved((int)(m_cursorPos), (int)(pos));
m_cursorPos = pos;
if (pos == m_cursorPos) return;
emit cursorMoved((int)(m_cursorPos), (int)(pos));
m_cursorPos = pos;
- if (seek) m_document->renderer()->seek(GenTime(m_cursorPos, m_document->fps()));
+ if (seek) m_document->renderer()->seek(m_cursorPos);
else if (m_autoScroll) checkScrolling();
m_cursorLine->setPos(m_cursorPos, 0);
}
else if (m_autoScroll) checkScrolling();
m_cursorLine->setPos(m_cursorPos, 0);
}
emit cursorMoved((int)(m_cursorPos), (int)((m_cursorPos + delta)));
m_cursorPos += delta;
m_cursorLine->setPos(m_cursorPos, 0);
emit cursorMoved((int)(m_cursorPos), (int)((m_cursorPos + delta)));
m_cursorPos += delta;
m_cursorLine->setPos(m_cursorPos, 0);
- m_document->renderer()->seek(GenTime(m_cursorPos, m_document->fps()));
+ m_document->renderer()->seek(m_cursorPos);
}
void CustomTrackView::initCursorPos(int pos)
}
void CustomTrackView::initCursorPos(int pos)
// MLT CONSUMER is broken
kDebug(QtWarningMsg) << "ERROR, Cannot start monitor";
}
// MLT CONSUMER is broken
kDebug(QtWarningMsg) << "ERROR, Cannot start monitor";
}
- } else if (position != -1) render->seek(GenTime(position, m_monitorManager->timecode().fps()));
+ } else if (position != -1) render->seek(position);
if (!zone.isNull()) {
m_ruler->setZone(zone.x(), zone.y());
if (!zone.isNull()) {
m_ruler->setZone(zone.x(), zone.y());
- render->seek(GenTime(zone.x(), m_monitorManager->timecode().fps()));
+ render->seek(zone.x());
Render::Render(const QString & rendererName, int winid, QString profile, QWidget *parent) :
QObject(parent),
m_isBlocked(0),
Render::Render(const QString & rendererName, int winid, QString profile, QWidget *parent) :
QObject(parent),
m_isBlocked(0),
- sendFrameForAnalysis(false),
analyseAudio(KdenliveSettings::monitor_audio()),
analyseAudio(KdenliveSettings::monitor_audio()),
+ sendFrameForAnalysis(false),
m_name(rendererName),
m_mltConsumer(NULL),
m_mltProducer(NULL),
m_name(rendererName),
m_mltConsumer(NULL),
m_mltProducer(NULL),
+void Render::seek(int time)
+{
+ if (!m_mltProducer)
+ return;
+ m_isBlocked = false;
+ m_mltProducer->seek(time);
+ refresh();
+}
+
//static
/*QPixmap Render::frameThumbnail(Mlt::Frame *frame, int width, int height, bool border) {
QPixmap pix(width, height);
//static
/*QPixmap Render::frameThumbnail(Mlt::Frame *frame, int width, int height, bool border) {
QPixmap pix(width, height);
//kDebug() << "////// RENDER, SET SCENE LIST: " << playlist;
//kDebug() << "////// RENDER, SET SCENE LIST: " << playlist;
+ // Remove previous profile info
+ QDomDocument doc;
+ doc.setContent(playlist);
+ QDomElement profile = doc.documentElement().firstChildElement("profile");
+ doc.documentElement().removeChild(profile);
+ playlist = doc.toString();
+
if (m_mltConsumer) {
if (!m_mltConsumer->is_stopped()) {
m_mltConsumer->stop();
if (m_mltConsumer) {
if (!m_mltConsumer->is_stopped()) {
m_mltConsumer->stop();
m_mltProducer->set_speed(0);
//if (KdenliveSettings::osdtimecode() && m_osdInfo) m_mltProducer->detach(*m_osdInfo);
m_mltProducer->set_speed(0);
//if (KdenliveSettings::osdtimecode() && m_osdInfo) m_mltProducer->detach(*m_osdInfo);
Mlt::Service service(m_mltProducer->parent().get_service());
mlt_service_lock(service.get_service());
Mlt::Service service(m_mltProducer->parent().get_service());
mlt_service_lock(service.get_service());
// TODO: Better way to do this
if (KdenliveSettings::projectloading_avformatnovalidate())
playlist.replace(">avformat</property>", ">avformat-novalidate</property>");
// TODO: Better way to do this
if (KdenliveSettings::projectloading_avformatnovalidate())
playlist.replace(">avformat</property>", ">avformat-novalidate</property>");
playlist.replace(">avformat-novalidate</property>", ">avformat</property>");
m_mltProducer = new Mlt::Producer(*m_mltProfile, "xml-string", playlist.toUtf8().constData());
playlist.replace(">avformat-novalidate</property>", ">avformat</property>");
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();
m_mltProducer = m_blackClip->cut(0, 50);
if (!m_mltProducer || !m_mltProducer->is_valid()) {
kDebug() << " WARNING - - - - -INVALID PLAYLIST: " << playlist.toUtf8().constData();
m_mltProducer = m_blackClip->cut(0, 50);
/** @brief Seeks the renderer clip to the given time. */
void seek(GenTime time);
/** @brief Seeks the renderer clip to the given time. */
void seek(GenTime time);
void seekToFrame(int pos);
void seekToFrameDiff(int diff);
int m_isBlocked;
void seekToFrame(int pos);
void seekToFrameDiff(int diff);
int m_isBlocked;