void setInPoint();
void setOutPoint();
void slotInsertSpace();
+ void slotRemoveSpace();
void insertSpace(const GenTime &pos, int track, const GenTime duration, bool add);
public slots:
<Action name="delete_all_guides" />
</Menu>
<Action name="insert_space" />
+ <Action name="delete_space" />
<Separator />
<Menu name="video_effects_menu" ><text>Add Video Effect</text>
</Menu>
connect(transitionsMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotAddTransition(QAction *)));
m_timelineContextMenu->addAction(actionCollection()->action("insert_space"));
+ m_timelineContextMenu->addAction(actionCollection()->action("delete_space"));
m_timelineContextMenu->addAction(actionCollection()->action(KStandardAction::name(KStandardAction::Paste)));
m_timelineContextClipMenu->addAction(actionCollection()->action("delete_timeline_clip"));
collection->addAction("insert_space", insertSpace);
connect(insertSpace, SIGNAL(triggered()), this, SLOT(slotInsertSpace()));
+ KAction *removeSpace = new KAction(KIcon(), i18n("Remove Space"), this);
+ collection->addAction("delete_space", removeSpace);
+ connect(removeSpace, SIGNAL(triggered()), this, SLOT(slotRemoveSpace()));
+
KAction *addGuide = new KAction(KIcon("document-new"), i18n("Add Guide"), this);
collection->addAction("add_guide", addGuide);
connect(addGuide, SIGNAL(triggered()), this, SLOT(slotAddGuide()));
m_activeTimeline->projectView()->slotInsertSpace();
}
+void MainWindow::slotRemoveSpace() {
+ if (m_activeTimeline)
+ m_activeTimeline->projectView()->slotRemoveSpace();
+}
+
void MainWindow::slotEditGuide() {
if (m_activeTimeline)
m_activeTimeline->projectView()->slotEditGuide();
void slotFindNext();
void slotInsertSpace();
+ void slotRemoveSpace();
void slotAddGuide();
void slotEditGuide();
void slotDeleteGuide();
return true;
}
+int Render::mltGetSpaceLength(const GenTime pos, int track) {
+ if (!m_mltProducer) {
+ kDebug() << "PLAYLIST NOT INITIALISED //////";
+ return -1;
+ }
+ Mlt::Producer parentProd(m_mltProducer->parent());
+ if (parentProd.get_producer() == NULL) {
+ kDebug() << "PLAYLIST BROKEN, CANNOT INSERT CLIP //////";
+ return -1;
+ }
+
+ Mlt::Service service(parentProd.get_service());
+ Mlt::Tractor tractor(service);
+ int insertPos = pos.frames(m_fps);
+
+ Mlt::Producer trackProducer(tractor.track(track));
+ Mlt::Playlist trackPlaylist((mlt_playlist) trackProducer.get_service());
+ int clipIndex = trackPlaylist.get_clip_index_at(insertPos);
+ if (!trackPlaylist.is_blank_at(clipIndex)) return -1;
+ return trackPlaylist.clip_length(clipIndex);
+}
+
+
void Render::mltInsertSpace(const GenTime pos, int track, const GenTime duration) {
if (!m_mltProducer) {
kDebug() << "PLAYLIST NOT INITIALISED //////";
void mltUpdateClip(ItemInfo info, QDomElement element, Mlt::Producer *prod);
void mltCutClip(int track, GenTime position);
void mltInsertSpace(const GenTime pos, int track, const GenTime duration);
+ int mltGetSpaceLength(const GenTime pos, int track);
bool mltResizeClipEnd(ItemInfo info, GenTime clipDuration);
bool mltResizeClipStart(ItemInfo info, GenTime diff);
bool mltMoveClip(int startTrack, int endTrack, GenTime pos, GenTime moveStart, Mlt::Producer *prod);