Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

indent fixes and give more info on capture failure

svn path=/branches/KDE4/; revision=2284
parent 0dc5db50
......@@ -128,24 +128,24 @@ void ClipItem::setKeyframes(const int ix, const QString keyframes) {
for (int i = 0; i < params.count(); i++) {
QDomElement e = params.item(i).toElement();
if (!e.isNull() && e.attribute("type") == "keyframe") {
e.setAttribute("keyframes", keyframes);
if (ix == m_selectedEffect) {
m_keyframes.clear();
double max = e.attribute("max").toDouble();
double min = e.attribute("min").toDouble();
m_keyframeFactor = 100.0 / (max - min);
m_keyframeDefault = e.attribute("default").toDouble();
// parse keyframes
QStringList keyframes = e.attribute("keyframes").split(";", QString::SkipEmptyParts);
foreach(QString str, keyframes) {
int pos = str.section(":", 0, 0).toInt();
double val = str.section(":", 1, 1).toDouble();
m_keyframes[pos] = val;
}
update();
return;
}
break;
e.setAttribute("keyframes", keyframes);
if (ix == m_selectedEffect) {
m_keyframes.clear();
double max = e.attribute("max").toDouble();
double min = e.attribute("min").toDouble();
m_keyframeFactor = 100.0 / (max - min);
m_keyframeDefault = e.attribute("default").toDouble();
// parse keyframes
QStringList keyframes = e.attribute("keyframes").split(";", QString::SkipEmptyParts);
foreach(QString str, keyframes) {
int pos = str.section(":", 0, 0).toInt();
double val = str.section(":", 1, 1).toDouble();
m_keyframes[pos] = val;
}
update();
return;
}
break;
}
}
......@@ -190,9 +190,9 @@ QString ClipItem::keyframes(const int index) {
for (int i = 0; i < params.count(); i++) {
QDomElement e = params.item(i).toElement();
if (!e.isNull() && e.attribute("type") == "keyframe") {
result = e.attribute("keyframes");
break;
}
result = e.attribute("keyframes");
break;
}
}
return result;
}
......
This diff is collapsed.
......@@ -173,7 +173,7 @@ signals:
void activateDocumentMonitor();
void trackHeightChanged();
void displayMessage(const QString, MessageType);
void showClipFrame(DocClipBase *, const int);
void showClipFrame(DocClipBase *, const int);
};
#endif
......
......@@ -22,7 +22,7 @@
EditGuideCommand::EditGuideCommand(CustomTrackView *view, const GenTime oldPos, const QString &oldcomment, const GenTime pos, const QString &comment, bool doIt) : m_view(view), m_oldPos(oldPos), m_oldcomment(oldcomment), m_pos(pos), m_comment(comment), m_doIt(doIt) {
if (m_oldcomment.isEmpty()) setText(i18n("Add guide"));
else if (m_oldPos == m_pos) setText(i18n("Edit guide"));
else if (m_pos <= GenTime()) setText(i18n("Delete guide"));
else if (m_pos <= GenTime()) setText(i18n("Delete guide"));
else setText(i18n("Move guide"));
kDebug() << "/// CREATE GUIDE COMMAND, TIMES: " << m_oldPos.frames(25) << "x" << m_pos.frames(25);
}
......
......@@ -36,7 +36,7 @@ void EditKeyFrameCommand::undo() {
// virtual
void EditKeyFrameCommand::redo() {
if (m_doIt) {
m_view->editKeyFrame(m_pos, m_track, m_index, m_newkfr);
m_view->editKeyFrame(m_pos, m_track, m_index, m_newkfr);
}
m_doIt = true;
}
......
......@@ -19,11 +19,11 @@ HeaderTrack::HeaderTrack(int index, TrackInfo info, QWidget *parent)
if (m_type == VIDEOTRACK) {
view.frame->setBackgroundRole(QPalette::AlternateBase);
view.frame->setAutoFillBackground(true);
view.buttonVideo->setIcon(KIcon("kdenlive-show-video"));
view.buttonVideo->setIcon(KIcon("kdenlive-show-video"));
} else {
view.buttonVideo->setHidden(true);
}
view.buttonAudio->setIcon(KIcon("kdenlive-show-audio"));
view.buttonAudio->setIcon(KIcon("kdenlive-show-audio"));
view.buttonVideo->setChecked(!info.isBlind);
view.buttonAudio->setChecked(!info.isMute);
connect(view.buttonVideo, SIGNAL(clicked()), this, SLOT(switchVideo()));
......
......@@ -37,7 +37,7 @@
#include "mainwindow.h"
KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, MltVideoProfile profile, QUndoGroup *undoGroup, MainWindow *parent): QObject(parent), m_render(NULL), m_url(url), m_projectFolder(projectFolder), m_profile(profile), m_fps((double)profile.frame_rate_num / profile.frame_rate_den), m_width(profile.width), m_height(profile.height), m_commandStack(new KUndoStack(undoGroup)), m_modified(false), m_documentLoadingProgress(0), m_documentLoadingStep(0.0), m_startPos(0) {
kDebug()<<"// init profile, ratnum: "<<profile.frame_rate_num<<", "<<profile.frame_rate_num<<", width: "<<profile.width;
kDebug() << "// init profile, ratnum: " << profile.frame_rate_num << ", " << profile.frame_rate_num << ", width: " << profile.width;
m_clipManager = new ClipManager(this);
if (!url.isEmpty()) {
QString tmpFile;
......@@ -196,7 +196,7 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, MltVideoPro
westley.appendChild(tractor);
}
m_scenelist = m_document.toString();
kDebug() << "KDEnnlive document, init timecode: "<<m_fps;
kDebug() << "KDEnnlive document, init timecode: " << m_fps;
if (m_fps == 30000.0 / 1001.0) m_timecode.setFormat(30, true);
else m_timecode.setFormat((int) m_fps);
}
......@@ -367,7 +367,7 @@ void KdenliveDoc::setProfilePath(QString path) {
m_fps = (double) m_profile.frame_rate_num / m_profile.frame_rate_den;
m_width = m_profile.width;
m_height = m_profile.height;
kDebug() << "KDEnnlive document, init timecode from path: "<<path<<", "<<m_fps;
kDebug() << "KDEnnlive document, init timecode from path: " << path << ", " << m_fps;
if (m_fps == 30000.0 / 1001.0) m_timecode.setFormat(30, true);
else m_timecode.setFormat((int) m_fps);
}
......
......@@ -57,7 +57,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
QWidget *p4 = new QWidget;
m_configCapture.setupUi(p4);
page4 = addPage(p4, i18n("Capture"), "audio-card");
m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture());
m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture());
QWidget *p5 = new QWidget;
m_configShuttle.setupUi(p5);
......
......@@ -179,7 +179,7 @@ MainWindow::MainWindow(QWidget *parent)
projectListDock->raise();
tabifyDockWidget(clipMonitorDock, projectMonitorDock);
tabifyDockWidget(clipMonitorDock, recMonitorDock);
tabifyDockWidget(clipMonitorDock, recMonitorDock);
setCentralWidget(m_timelineArea);
setupGUI(Default, NULL /*"kdenliveui.rc"*/);
......@@ -250,9 +250,9 @@ MainWindow::MainWindow(QWidget *parent)
setAutoSaveSettings();
if (KdenliveSettings::openlastproject()) {
KSharedConfigPtr config = KGlobal::config();
QString Lastproject = config->group("Recent Files").readPathEntry("File1", QString());
openFile(KUrl(Lastproject));
KSharedConfigPtr config = KGlobal::config();
QString Lastproject = config->group("Recent Files").readPathEntry("File1", QString());
openFile(KUrl(Lastproject));
} else newFile();
......@@ -396,16 +396,16 @@ void MainWindow::setupActions() {
m_toolGroup->addAction(m_buttonSelectTool);
m_toolGroup->addAction(m_buttonRazorTool);
m_toolGroup->setExclusive(true);
toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly);
toolbar->setToolButtonStyle(Qt::ToolButtonIconOnly);
QWidget * actionWidget;
actionWidget = toolbar->widgetForAction( m_buttonSelectTool );
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
QWidget * actionWidget;
actionWidget = toolbar->widgetForAction(m_buttonSelectTool);
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction( m_buttonRazorTool );
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction(m_buttonRazorTool);
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
toolbar->setStyleSheet(style1);
connect(m_toolGroup, SIGNAL(triggered(QAction *)), this, SLOT(slotChangeTool(QAction *)));
......@@ -415,9 +415,9 @@ void MainWindow::setupActions() {
m_buttonFitZoom->setCheckable(false);
connect(m_buttonFitZoom, SIGNAL(triggered()), this, SLOT(slotFitZoom()));
actionWidget = toolbar->widgetForAction( m_buttonFitZoom );
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction(m_buttonFitZoom);
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
m_zoomSlider = new QSlider(Qt::Horizontal, this);
m_zoomSlider->setMaximum(13);
......@@ -459,21 +459,21 @@ void MainWindow::setupActions() {
layout->addWidget(toolbar);
actionWidget = toolbar->widgetForAction( m_buttonVideoThumbs );
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction(m_buttonVideoThumbs);
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction( m_buttonAudioThumbs );
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction(m_buttonAudioThumbs);
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction( m_buttonShowMarkers );
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction(m_buttonShowMarkers);
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction( m_buttonSnap );
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
actionWidget = toolbar->widgetForAction(m_buttonSnap);
actionWidget->setMaximumWidth(24);
actionWidget->setMinimumHeight(17);
m_messageLabel = new StatusBarMessageLabel(this);
m_messageLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding);
......@@ -491,8 +491,8 @@ void MainWindow::setupActions() {
actionCollection()->addAction("show_video_thumbs", m_buttonVideoThumbs);
actionCollection()->addAction("show_audio_thumbs", m_buttonAudioThumbs);
actionCollection()->addAction("show_markers", m_buttonShowMarkers);
actionCollection()->addAction("snap", m_buttonSnap);
actionCollection()->addAction("show_markers", m_buttonShowMarkers);
actionCollection()->addAction("snap", m_buttonSnap);
actionCollection()->addAction("zoom_fit", m_buttonFitZoom);
......@@ -638,8 +638,8 @@ void MainWindow::newFile() {
delete w;
}
MltVideoProfile prof;
if (!profileName.isEmpty()) prof = ProfilesDialog::getVideoProfile(profileName);
else prof = ProfilesDialog::getVideoProfile("dv_pal");
if (!profileName.isEmpty()) prof = ProfilesDialog::getVideoProfile(profileName);
else prof = ProfilesDialog::getVideoProfile("dv_pal");
if (prof.width == 0) prof = ProfilesDialog::getVideoProfile("dv_pal");
KdenliveDoc *doc = new KdenliveDoc(KUrl(), projectFolder, prof, m_commandStack, this);
TrackView *trackView = new TrackView(doc, this);
......@@ -882,7 +882,7 @@ void MainWindow::connectDocument(TrackView *trackView, KdenliveDoc *doc) { //cha
disconnect(trackView, SIGNAL(transitionItemSelected(Transition*)), this, SLOT(slotActivateTransitionView()));
disconnect(m_zoomSlider, SIGNAL(valueChanged(int)), m_activeTimeline, SLOT(slotChangeZoom(int)));
disconnect(trackView->projectView(), SIGNAL(displayMessage(const QString&, MessageType)), m_messageLabel, SLOT(setMessage(const QString&, MessageType)));
disconnect(trackView->projectView(), SIGNAL(showClipFrame(DocClipBase *, const int)), m_clipMonitor, SLOT(slotSetXml(DocClipBase *, const int)));
disconnect(trackView->projectView(), SIGNAL(showClipFrame(DocClipBase *, const int)), m_clipMonitor, SLOT(slotSetXml(DocClipBase *, const int)));
disconnect(m_activeDocument, SIGNAL(docModified(bool)), this, SLOT(slotUpdateDocumentState(bool)));
disconnect(effectStack, SIGNAL(updateClipEffect(ClipItem*, QDomElement, QDomElement)), m_activeTimeline->projectView(), SLOT(slotUpdateClipEffect(ClipItem*, QDomElement, QDomElement)));
......
......@@ -163,7 +163,7 @@ private slots:
void slotSwitchVideoThumbs();
void slotSwitchAudioThumbs();
void slotSwitchMarkersComments();
void slotSwitchSnap();
void slotSwitchSnap();
void slotRenderProject();
void slotDoRender(const QString &dest, const QString &render, const QStringList &avformat_args, bool zoneOnly, bool playAfter);
void slotFullScreen();
......
......@@ -52,7 +52,7 @@ MarkerDialog::MarkerDialog(DocClipBase *clip, CommentedTime t, Timecode tc, QWid
m_view.marker_comment->selectAll();
m_view.marker_comment->setFocus();
QPixmap p((int) (100 * m_dar), 100);
QPixmap p((int)(100 * m_dar), 100);
QString colour = clip->getProperty("colour");
switch (m_clip->clipType()) {
case VIDEO:
......
......@@ -110,7 +110,7 @@ Monitor::Monitor(QString name, MonitorManager *manager, QWidget *parent)
m_contextMenu->addMenu(playMenu);
QAction *extractFrame = m_contextMenu->addAction(KIcon("document-new"), i18n("Extract frame"));
connect(extractFrame, SIGNAL(triggered()), this, SLOT(slotExtractCurrentFrame()));
connect(m_ruler, SIGNAL(seekRenderer(int)), this, SLOT(slotSeek(int)));
connect(m_ruler, SIGNAL(seekRenderer(int)), this, SLOT(slotSeek(int)));
kDebug() << "/////// BUILDING MONITOR, ID: " << ui.video_frame->winId();
}
......@@ -268,18 +268,18 @@ void Monitor::slotSetXml(DocClipBase *clip, const int position) {
if (render == NULL) return;
if (!m_isActive) m_monitorManager->activateMonitor(m_name);
if (!clip) return;
if (clip != m_currentClip) {
m_currentClip = clip;
QDomDocument doc;
QDomElement westley = doc.createElement("westley");
doc.appendChild(westley);
westley.appendChild(doc.importNode(m_currentClip->toXML(), true));
render->setSceneList(doc, 0);
m_ruler->slotNewValue(0);
m_timePos->setText("00:00:00:00");
m_position = 0;
}
if (position != -1) render->seek(GenTime(position, render->fps()));
if (clip != m_currentClip) {
m_currentClip = clip;
QDomDocument doc;
QDomElement westley = doc.createElement("westley");
doc.appendChild(westley);
westley.appendChild(doc.importNode(m_currentClip->toXML(), true));
render->setSceneList(doc, 0);
m_ruler->slotNewValue(0);
m_timePos->setText("00:00:00:00");
m_position = 0;
}
if (position != -1) render->seek(GenTime(position, render->fps()));
}
void Monitor::slotOpenFile(const QString &file) {
......
......@@ -74,7 +74,7 @@ private:
KRestrictedLine *m_timePos;
QAction *m_playAction;
QMenu *m_contextMenu;
DocClipBase *m_currentClip;
DocClipBase *m_currentClip;
private slots:
void adjustRulerSize(int length);
......
This diff is collapsed.
......@@ -41,7 +41,7 @@ public:
RecMonitor(QString name, QWidget *parent = 0);
QString name() const;
enum CAPTUREDEVICE {FIREWIRE = 0, VIDEO4LINUX = 1, SCREENGRAB =2};
enum CAPTUREDEVICE {FIREWIRE = 0, VIDEO4LINUX = 1, SCREENGRAB = 2};
protected:
virtual void mousePressEvent(QMouseEvent * event);
......@@ -50,7 +50,7 @@ private:
Ui::RecMonitor_UI ui;
QString m_tmpFolder;
QString m_name;
RegionGrabber *rgnGrab;
RegionGrabber *rgnGrab;
bool m_isActive;
......@@ -71,6 +71,7 @@ private:
QAction *m_rewAction;
QAction *m_stopAction;
QAction *m_discAction;
void checkDeviceAvailability();
private slots:
void slotStartCapture(bool play = true);
......@@ -81,7 +82,7 @@ private slots:
void slotRewind();
void slotForward();
void slotDisconnect();
void slotStartGrab(const QRect &rect);
void slotStartGrab(const QRect &rect);
public slots:
void refreshRecMonitor(bool visible);
......
This diff is collapsed.
......@@ -31,8 +31,7 @@ class QPaintEvent;
class QResizeEvent;
class QMouseEvent;
class RegionGrabber : public QWidget
{
class RegionGrabber : public QWidget {
Q_OBJECT
public:
RegionGrabber();
......@@ -43,19 +42,19 @@ protected slots:
void displayHelp();
signals:
void regionGrabbed( const QRect & );
void regionGrabbed(const QRect &);
protected:
void paintEvent( QPaintEvent* e );
void resizeEvent( QResizeEvent* e );
void mousePressEvent( QMouseEvent* e );
void mouseMoveEvent( QMouseEvent* e );
void mouseReleaseEvent( QMouseEvent* e );
void mouseDoubleClickEvent( QMouseEvent* );
void keyPressEvent( QKeyEvent* e );
void paintEvent(QPaintEvent* e);
void resizeEvent(QResizeEvent* e);
void mousePressEvent(QMouseEvent* e);
void mouseMoveEvent(QMouseEvent* e);
void mouseReleaseEvent(QMouseEvent* e);
void mouseDoubleClickEvent(QMouseEvent*);
void keyPressEvent(QKeyEvent* e);
void updateHandles();
QRegion handleMask() const;
QPoint limitPointToRect( const QPoint &p, const QRect &r ) const;
QPoint limitPointToRect(const QPoint &p, const QRect &r) const;
void grabRect();
QRect selection;
......
......@@ -808,7 +808,7 @@ void Render::switchPlay() {
if (m_mltProducer->get_speed() == 0.0) m_mltProducer->set_speed(1.0);
else {
m_isBlocked = true;
m_mltProducer->set_speed(0.0);
m_mltProducer->set_speed(0.0);
//m_mltConsumer->set("refresh", 0);
m_mltProducer->seek((int) m_framePosition);
m_isBlocked = false;
......@@ -1226,9 +1226,9 @@ bool Render::mltEditEffect(int track, GenTime position, QMap <QString, QString>
QMap<QString, QString>::Iterator it = args.begin();
if (!args.value("keyframes").isEmpty() || /*it.key().startsWith("#") || */tag.startsWith("ladspa") || tag == "sox" || tag == "autotrack_rectangle") {
// This is a keyframe effect, to edit it, we remove it and re-add it.
bool success = mltRemoveEffect(track, position, index);
bool success = mltRemoveEffect(track, position, index);
if (success) success = mltAddEffect(track, position, args);
return success;
return success;
}
// create filter
......@@ -1467,39 +1467,37 @@ bool Render::mltMoveClip(int startTrack, int endTrack, int moveStart, int moveEn
Mlt::Producer clipProducer(trackPlaylist.replace_with_blank(clipIndex));
trackPlaylist.consolidate_blanks(0);
if (!trackPlaylist.is_blank_at(moveEnd)) {
// error, destination is not empty
// error, destination is not empty
//int ix = trackPlaylist.get_clip_index_at(moveEnd);
mlt_service_unlock(m_mltConsumer->get_service());
m_isBlocked = false;
return false;
mlt_service_unlock(m_mltConsumer->get_service());
m_isBlocked = false;
return false;
} else {
trackPlaylist.insert_at(moveEnd, clipProducer, 1);
trackPlaylist.consolidate_blanks(0);
}
else {
trackPlaylist.insert_at(moveEnd, clipProducer, 1);
trackPlaylist.consolidate_blanks(0);
}
//mlt_service_unlock(service.get_service());
} else {
Mlt::Producer destTrackProducer(tractor.track(endTrack));
Mlt::Playlist destTrackPlaylist((mlt_playlist) destTrackProducer.get_service());
if (!destTrackPlaylist.is_blank_at(moveEnd)) {
// error, destination is not empty
mlt_service_unlock(m_mltConsumer->get_service());
m_isBlocked = false;
return false;
}
else {
Mlt::Producer clipProducer(trackPlaylist.replace_with_blank(clipIndex));
trackPlaylist.consolidate_blanks(0);
destTrackPlaylist.consolidate_blanks(1);
destTrackPlaylist.insert_at(moveEnd, clipProducer, 1);
destTrackPlaylist.consolidate_blanks(0);
}
if (!destTrackPlaylist.is_blank_at(moveEnd)) {
// error, destination is not empty
mlt_service_unlock(m_mltConsumer->get_service());
m_isBlocked = false;
return false;
} else {
Mlt::Producer clipProducer(trackPlaylist.replace_with_blank(clipIndex));
trackPlaylist.consolidate_blanks(0);
destTrackPlaylist.consolidate_blanks(1);
destTrackPlaylist.insert_at(moveEnd, clipProducer, 1);
destTrackPlaylist.consolidate_blanks(0);
}
}
mltCheckLength();
mlt_service_unlock(m_mltConsumer->get_service());
m_isBlocked = false;
m_mltConsumer->set("refresh", 1);
return true;
return true;
}
void Render::mltMoveTransition(QString type, int startTrack, int newTrack, int newTransitionTrack, GenTime oldIn, GenTime oldOut, GenTime newIn, GenTime newOut) {
......@@ -1638,7 +1636,7 @@ void Render::mltDeleteTransition(QString tag, int a_track, int b_track, GenTime
if (resource == tag && b_track == currentTrack && currentIn <= old_pos && currentOut >= old_pos) {
//kDebug() << " / / / / /DELETE TRANS DOOOMNE";
mlt_field_disconnect_service(field->get_field(), nextservice);
mlt_service_close(nextservice);
mlt_service_close(nextservice);
break;
}
nextservice = mlt_service_producer(nextservice);
......
......@@ -72,7 +72,7 @@ void SmallRuler::mouseMoveEvent(QMouseEvent * event) {
}
void SmallRuler::slotNewValue(int _value) {
m_cursorPosition = (int)(_value ); /// pixelPerMark());
m_cursorPosition = (int)(_value); /// pixelPerMark());
KRuler::slotNewValue(_value * pixelPerMark());
}
......
......@@ -461,7 +461,7 @@ int TrackView::slotAddProjectTrack(int ix, QDomElement xml, bool videotrack) {
}
}
item->addEffect(clipeffect, false);
item->effectsCounter();
item->effectsCounter();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment