]> git.sesse.net Git - kdenlive/commitdiff
Initial support for keyframes in track effects (WIP)
authorTill Theato <root@ttill.de>
Tue, 21 Dec 2010 20:05:33 +0000 (20:05 +0000)
committerTill Theato <root@ttill.de>
Tue, 21 Dec 2010 20:05:33 +0000 (20:05 +0000)
svn path=/trunk/kdenlive/; revision=5187

src/customtrackview.cpp
src/customtrackview.h
src/definitions.h
src/effectstackview.cpp
src/effectstackview.h
src/kdenlivedoc.cpp
src/kdenlivedoc.h
src/renderer.cpp
src/renderer.h

index 58e80084daaff6940c4906208745186fa7d0edca..802c258b002aab4660de6932bfc3cc25b34765a3 100644 (file)
@@ -1299,6 +1299,7 @@ void CustomTrackView::editItemDuration()
                 clipInfo.endPos = clipInfo.startPos + d.duration();
                 clipInfo.track = item->track();
                 MoveTransitionCommand *command = new MoveTransitionCommand(this, startInfo, clipInfo, true);
+                updateTrackDuration(clipInfo.track, command);
                 m_commandStack->push(command);
             } else {
                 // move and resize clip
@@ -1323,6 +1324,7 @@ void CustomTrackView::editItemDuration()
                     clipInfo.cropStart = d.cropStart();
                     new ResizeClipCommand(this, startInfo, clipInfo, true, false, moveCommand);
                 }
+                updateTrackDuration(clipInfo.track, moveCommand);
                 m_commandStack->push(moveCommand);
             }
         }
@@ -1407,6 +1409,7 @@ void CustomTrackView::insertClipCut(DocClipBase *clip, int in, int out)
     }
 
     AddTimelineClipCommand *command = new AddTimelineClipCommand(this, clip->toXML(), clip->getId(), pasteInfo, EffectsList(), m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT, true, false);
+    updateTrackDuration(pasteInfo.track, command);
     m_commandStack->push(command);
 
     selectClip(true, false);
@@ -2230,6 +2233,7 @@ void CustomTrackView::slotTransitionUpdated(Transition *tr, QDomElement old)
         return;
     }
     EditTransitionCommand *command = new EditTransitionCommand(this, tr->track(), tr->startPos(), old, xml, false);
+    updateTrackDuration(tr->track(), command);
     m_commandStack->push(command);
     setDocumentModified();
 }
@@ -2334,6 +2338,7 @@ void CustomTrackView::dropEvent(QDropEvent * event)
             adjustTimelineClips(m_scene->editMode(), item, ItemInfo(), addCommand);
 
             new AddTimelineClipCommand(this, item->xml(), item->clipProducer(), item->info(), item->effectList(), m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT, false, false, addCommand);
+            updateTrackDuration(clipInfo.track, addCommand);
 
             if (item->baseClip()->isTransparent() && getTransitionItemAtStart(info.startPos, info.track) == NULL) {
                 // add transparency transition
@@ -2874,6 +2879,7 @@ void CustomTrackView::slotRemoveSpace()
     }
 
     InsertSpaceCommand *command = new InsertSpaceCommand(this, clipsToMove, transitionsToMove, track, GenTime(-length, m_document->fps()), true);
+    updateTrackDuration(track, command);
     m_commandStack->push(command);
 }
 
@@ -2932,6 +2938,7 @@ void CustomTrackView::slotInsertSpace()
 
     if (!clipsToMove.isEmpty() || !transitionsToMove.isEmpty()) {
         InsertSpaceCommand *command = new InsertSpaceCommand(this, clipsToMove, transitionsToMove, track, spaceDuration, true);
+        updateTrackDuration(track, command);
         m_commandStack->push(command);
     }
 }
@@ -3026,8 +3033,12 @@ void CustomTrackView::deleteClip(const QString &clipId)
         }
     }
     deleteCommand->setText(i18np("Delete timeline clip", "Delete timeline clips", count));
-    if (count == 0) delete deleteCommand;
-    else m_commandStack->push(deleteCommand);
+    if (count == 0) {
+        delete deleteCommand;
+    } else {
+        updateTrackDuration(-1, deleteCommand);
+        m_commandStack->push(deleteCommand);
+    }
 }
 
 void CustomTrackView::setCursorPos(int pos, bool seek)
@@ -3147,6 +3158,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
             }
             if (!clipsToMove.isEmpty() || !transitionsToMove.isEmpty()) {
                 InsertSpaceCommand *command = new InsertSpaceCommand(this, clipsToMove, transitionsToMove, track, timeOffset, false);
+                updateTrackDuration(track, command);
                 m_commandStack->push(command);
                 if (track != -1) track = m_document->tracksCount() - track;
                 kDebug() << "SPACER TRACK:" << track;
@@ -3287,6 +3299,9 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
                             }
                         }
                     }
+                    updateTrackDuration(info.track, moveCommand);
+                    if (m_dragItemInfo.track != info.track)
+                        updateTrackDuration(m_dragItemInfo.track, moveCommand);
                     m_commandStack->push(moveCommand);
                     //checkTrackSequence(m_dragItem->track());
                 } else {
@@ -3310,6 +3325,9 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
                     moveCommand->setText(i18n("Move transition"));
                     adjustTimelineTransitions(m_scene->editMode(), transition, moveCommand);
                     new MoveTransitionCommand(this, m_dragItemInfo, info, false, moveCommand);
+                    updateTrackDuration(info.track, moveCommand);
+                    if (m_dragItemInfo.track != info.track)
+                        updateTrackDuration(m_dragItemInfo.track, moveCommand);
                     m_commandStack->push(moveCommand);
                     setDocumentModified();
                 }
@@ -3329,7 +3347,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
 
             GenTime timeOffset = GenTime(m_dragItem->scenePos().x(), m_document->fps()) - m_dragItemInfo.startPos;
             const int trackOffset = (int)(m_dragItem->scenePos().y() / m_tracksHeight) - m_dragItemInfo.track;
-            //kDebug() << "// MOVED SEVERAL CLIPS" << timeOffset.frames(25);
+
             QUndoCommand *moveGroup = new QUndoCommand();
             moveGroup->setText(i18n("Move group"));
             if (timeOffset != GenTime() || trackOffset != 0) {
@@ -3394,6 +3412,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
                     }
                 }
                 new MoveGroupCommand(this, clipsToMove, transitionsToMove, timeOffset, trackOffset, false, moveGroup);
+                updateTrackDuration(-1, moveGroup);
                 m_commandStack->push(moveGroup);
 
                 //QPointF top = group->sceneBoundingRect().topLeft();
@@ -3470,6 +3489,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
                         ++itemcount;
                     }
                 }
+                updateTrackDuration(-1, resizeCommand);
                 m_commandStack->push(resizeCommand);
             }
         } else {
@@ -3721,6 +3741,7 @@ void CustomTrackView::deleteSelectedClips()
     else if (transitionCount > 0 && groupCount == 0 && clipCount == 0)
         deleteSelected->setText(i18np("Delete selected transition", "Delete selected transitions", transitionCount));
     else deleteSelected->setText(i18n("Delete selected items"));
+    updateTrackDuration(-1, deleteSelected);
     m_commandStack->push(deleteSelected);
 }
 
@@ -4179,14 +4200,11 @@ void CustomTrackView::moveClip(const ItemInfo start, const ItemInfo end, bool re
         emit displayMessage(i18n("Cannot move clip to position %1", m_document->timecode().getTimecodeFromFrames(end.startPos.frames(m_document->fps()))), ErrorMessage);
     }
     if (refresh) m_document->renderer()->doRefresh();
-    //kDebug() << " // MOVED CLIP TO: " << end.startPos.frames(25) << ", ITEM START: " << item->startPos().frames(25);
 }
 
 void CustomTrackView::moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> startTransition, const GenTime offset, const int trackOffset, bool reverseMove)
 {
     // Group Items
-    /*kDebug() << "//GRP MOVE, REVERS:" << reverseMove;
-    kDebug() << "// GROUP MOV; OFFSET: " << offset.frames(25) << ", TK OFF: " << trackOffset;*/
     resetSelectionGroup();
     m_scene->clearSelection();
 
@@ -4199,7 +4217,6 @@ void CustomTrackView::moveGroup(QList <ItemInfo> startClip, QList <ItemInfo> sta
             startClip[i].startPos = startClip.at(i).startPos - offset;
             startClip[i].track = startClip.at(i).track - trackOffset;
         }
-        //kDebug()<<"//LKING FR CLIP AT:"<<startClip.at(i).startPos.frames(25)<<", TK:"<<startClip.at(i).track;
         ClipItem *clip = getClipItemAt(startClip.at(i).startPos, startClip.at(i).track);
         if (clip) {
             clip->setItemLocked(false);
@@ -4310,10 +4327,10 @@ void CustomTrackView::moveTransition(const ItemInfo start, const ItemInfo end, b
         kDebug() << "----------------  ERROR, CANNOT find transition to move... ";// << startPos.x() * m_scale * FRAME_SIZE + 1 << ", " << startPos.y() * m_tracksHeight + m_tracksHeight / 2;
         return;
     }
-    //kDebug() << "----------------  Move TRANSITION FROM: " << startPos.x() << ", END:" << endPos.x() << ",TRACKS: " << oldtrack << " TO " << newtrack;
+
     bool snap = KdenliveSettings::snaptopoints();
     KdenliveSettings::setSnaptopoints(false);
-    //kDebug()<<"///  RESIZE TRANS START: ("<< startPos.x()<<"x"<< startPos.y()<<") / ("<<endPos.x()<<"x"<< endPos.y()<<")";
+
     if (end.endPos - end.startPos == start.endPos - start.startPos) {
         // Transition was moved
         item->setPos((int) end.startPos.frames(m_document->fps()), (end.track) * m_tracksHeight + 1);
@@ -4367,6 +4384,7 @@ void CustomTrackView::resizeClip(const ItemInfo start, const ItemInfo end, bool
 
     bool snap = KdenliveSettings::snaptopoints();
     KdenliveSettings::setSnaptopoints(false);
+
     if (resizeClipStart) {
         ItemInfo clipinfo = item->info();
         clipinfo.track = m_document->tracksCount() - clipinfo.track;
@@ -4636,8 +4654,10 @@ void CustomTrackView::prepareResizeClipEnd(AbstractClipItem* item, ItemInfo oldI
     if (item->parentItem() && item->parentItem() != m_selectionGroup)
         new RebuildGroupCommand(this, item->info().track, item->startPos(), command);
 
-    if (!hasParentCommand)
+    if (!hasParentCommand) {
+        updateTrackDuration(oldInfo.track, command);
         m_commandStack->push(command);
+    }
 }
 
 void CustomTrackView::updatePositionEffects(ClipItem * item, ItemInfo info)
@@ -5372,6 +5392,7 @@ void CustomTrackView::pasteClip()
             } else emit displayMessage(i18n("Cannot paste transition to selected place"), ErrorMessage);
         }
     }
+    updateTrackDuration(-1, pasteClips);
     m_commandStack->push(pasteClips);
 }
 
@@ -5400,7 +5421,6 @@ void CustomTrackView::pasteClipEffects()
         }
     }
 
-
     for (int i = 0; i < clips.count(); ++i) {
         if (clips.at(i)->type() == AVWIDGET) {
             ClipItem *item = static_cast < ClipItem *>(clips.at(i));
@@ -5626,6 +5646,7 @@ void CustomTrackView::slotInsertTrack(int ix)
         if (d.before_select->currentIndex() == 1)
             ix++;
         TrackInfo info;
+        info.duration = 0;
         info.isMute = false;
         info.isLocked = false;
         if (d.video_track->isChecked()) {
@@ -5830,8 +5851,10 @@ void CustomTrackView::splitAudio()
             }
         }
     }
-    if (splitCommand->childCount() > 0)
+    if (splitCommand->childCount()) {
+        updateTrackDuration(-1, splitCommand);
         m_commandStack->push(splitCommand);
+    }
 }
 
 void CustomTrackView::doSplitAudio(const GenTime &pos, int track, bool split)
@@ -5850,11 +5873,11 @@ void CustomTrackView::doSplitAudio(const GenTime &pos, int track, bool split)
             return;
 
         for (; freetrack > 0; freetrack--) {
-            kDebug() << "// CHK DOC TRK:" << freetrack << ", DUR:" << m_document->renderer()->mltTrackDuration(freetrack);
+            //kDebug() << "// CHK DOC TRK:" << freetrack << ", DUR:" << m_document->renderer()->mltTrackDuration(freetrack);
             if (m_document->trackInfoAt(freetrack - 1).type == AUDIOTRACK && !m_document->trackInfoAt(freetrack - 1).isLocked) {
-                kDebug() << "// CHK DOC TRK:" << freetrack << ", DUR:" << m_document->renderer()->mltTrackDuration(freetrack);
+                //kDebug() << "// CHK DOC TRK:" << freetrack << ", DUR:" << m_document->renderer()->mltTrackDuration(freetrack);
                 if (m_document->renderer()->mltTrackDuration(freetrack) < start || m_document->renderer()->mltGetSpaceLength(pos, freetrack, false) >= clip->cropDuration().frames(m_document->fps())) {
-                    kDebug() << "FOUND SPACE ON TRK: " << freetrack;
+                    //kDebug() << "FOUND SPACE ON TRK: " << freetrack;
                     break;
                 }
             }
@@ -6297,6 +6320,7 @@ void CustomTrackView::insertZoneOverwrite(QStringList data, int in)
     addCommand->setText(i18n("Insert clip"));
     adjustTimelineClips(OVERWRITEEDIT, NULL, info, addCommand);
     new AddTimelineClipCommand(this, clip->toXML(), clip->getId(), info, EffectsList(), true, false, true, false, addCommand);
+    updateTrackDuration(info.track, addCommand);
     m_commandStack->push(addCommand);
 
     selectClip(true, false, m_selectedTrack, in);
@@ -6551,7 +6575,39 @@ void CustomTrackView::updateTrackNames(int track, bool added)
             }
         }
     }
-
     emit tracksChanged();
 }
 
+void CustomTrackView::updateTrackDuration(int track, QUndoCommand *command)
+{
+    Q_UNUSED(command);
+
+    QList<int> tracks;
+    if (track >= 0) {
+        tracks << m_document->tracksCount() - track - 1;
+    } else {
+        // negative track number -> update all tracks
+        for (int i = 0; i < m_document->tracksCount(); ++i)
+            tracks << i;
+    }
+    int t, duration;
+    for (int i = 0; i < tracks.count(); ++i) {
+        t = tracks.at(i);
+        // t + 1 because of black background track
+        duration = m_document->renderer()->mltTrackDuration(t + 1);
+        if (duration != m_document->trackDuration(t)) {
+            m_document->setTrackDuration(t, duration);
+
+            // update effects
+            EffectsList effects = m_document->getTrackEffects(t);
+            for (int j = 0; j < effects.count(); ++j) {
+                /* TODO
+                 * - lookout for keyframable parameters and update them so all keyframes are in the new range (0 - duration)
+                 * - update the effectstack if necessary
+                 */
+            }
+        }
+    }
+}
+
+
index afa0b44912c8de691c94dcca7a81cc23347da628..11e65110a256e0a2dd4d897812af5e9493ec7d37 100644 (file)
@@ -426,6 +426,13 @@ private:
      * if the name is still the default one. */
     void updateTrackNames(int track, bool added);
 
+    /** @brief Updates the duration stored in a track's TrackInfo.
+     * @param track Number of track as used in ItemInfo (not the numbering used in KdenliveDoc) (negative for all tracks)
+     * @param command If effects need to be updated the commands to do this will be attached to this undo command
+     * 
+     * In addition to update the duration in TrackInfo it updates effects with keyframes on the track. */
+    void updateTrackDuration(int track, QUndoCommand *command);
+
 private slots:
     void slotRefreshGuides();
     void slotEnableRefresh();
index f67c473608d0b7886467d61fdd63301bf067f46d..fd63c745b81aaeb9a72bad9b5837c947f99d259c 100644 (file)
@@ -65,6 +65,7 @@ struct TrackInfo {
     bool isBlind;
     bool isLocked;
     EffectsList effectsList;
+    int duration;
 };
 
 struct ItemInfo {
index d6d79719ef1b861a68cf06ffac50fda5ac03c4c5..212a698cee38b0d5b39d971e1f722fb959b6831d 100644 (file)
@@ -208,6 +208,7 @@ void EffectStackView::slotTrackItemSelected(int ix, const TrackInfo info)
     m_clipref = NULL;
     m_trackMode = true;
     m_currentEffectList = info.effectsList;
+    m_trackInfo = info;
     kDebug() << "// TRACK; " << ix << ", EFFECTS: " << m_currentEffectList.count();
     setEnabled(true);
     m_ui.checkAll->setToolTip(QString());
@@ -283,8 +284,8 @@ void EffectStackView::setupListView(int ix)
         m_ui.buttonDown->setEnabled(false);
         m_ui.checkAll->setEnabled(false);
     } else {
-        if (ix < 0) ix = 0;
-        if (ix > m_ui.effectlist->count() - 1) ix = m_ui.effectlist->count() - 1;
+        qMin(ix, 0);
+        qMax(ix, m_ui.effectlist->count() - 1);
         m_ui.effectlist->setCurrentRow(ix);
         m_ui.checkAll->setEnabled(true);
     }
@@ -306,7 +307,7 @@ void EffectStackView::slotItemSelectionChanged(bool update)
         QDomElement eff = m_currentEffectList.at(activeRow);
         if (m_trackMode) {
             // showing track effects
-            m_effectedit->transferParamDesc(eff, 0, 0, -1);
+            m_effectedit->transferParamDesc(eff, 0, 0, m_trackInfo.duration);
         } else m_effectedit->transferParamDesc(eff,
                                                    0,
                                                    m_clipref->cropStart().frames(KdenliveSettings::project_fps()),
@@ -366,8 +367,8 @@ void EffectStackView::slotResetEffect()
         dom.setAttribute("kdenlive_ix", old.attribute("kdenlive_ix"));
         if (m_trackMode) {
             EffectsList::setParameter(dom, "in", QString::number(0));
-            EffectsList::setParameter(dom, "out", QString::number(0));
-            m_effectedit->transferParamDesc(dom, 0, 0, 0);//minx max frame
+            EffectsList::setParameter(dom, "out", QString::number(m_trackInfo.duration));
+            m_effectedit->transferParamDesc(dom, 0, 0, m_trackInfo.duration);//minx max frame
             emit updateEffect(NULL, m_trackindex, old, dom, activeRow);
         } else {
             m_clipref->initEffect(dom);
@@ -403,8 +404,11 @@ void EffectStackView::clear()
 
 void EffectStackView::slotSeekTimeline(int pos)
 {
-    if (!m_trackMode && m_clipref)
+    if (m_trackMode) {
+        emit seekTimeline(pos);
+    } else if (m_clipref) {
         emit seekTimeline(m_clipref->startPos().frames(KdenliveSettings::project_fps()) + pos);
+    }
 }
 
 void EffectStackView::slotUpdateCheckAllButton()
@@ -467,8 +471,13 @@ void EffectStackView::slotCheckMonitorPosition(int renderPos)
 
 void EffectStackView::slotRenderPos(int pos)
 {
-    if (m_clipref && m_effectedit && !m_trackMode)
-        m_effectedit->slotSyncEffectsPos(pos - m_clipref->startPos().frames(KdenliveSettings::project_fps()));
+    if (m_effectedit) {
+        if (m_trackMode) {
+            m_effectedit->slotSyncEffectsPos(pos);
+        } else if (m_clipref) {
+            m_effectedit->slotSyncEffectsPos(pos - m_clipref->startPos().frames(KdenliveSettings::project_fps()));
+        }
+    }
 }
 
 int EffectStackView::isTrackMode(bool *ok) const
index c86b6cfc153b95a3e7ac434d4378fa859e3eb7ae..1c7cb83006e3d6b6c34815eb22660745b6c59fee 100644 (file)
@@ -74,6 +74,9 @@ private:
     /** @brief The track index of currently edited track. */
     int m_trackindex;
 
+    /** If in track mode: Info of the edited track to be able to access its duration. */
+    TrackInfo m_trackInfo;
+
     /** @brief Sets the list of effects according to the clip's effect list.
     * @param ix Number of the effect to preselect */
     void setupListView(int ix);
index 861fc28fda179ff2c6125718f09b0590246fb5f5..aaa022eb1c0aafdca1df7473162062b8a06068fc 100644 (file)
@@ -311,6 +311,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(int videotracks, int audiotracks)
         audioTrack.isBlind = true;
         audioTrack.isLocked = false;
         audioTrack.trackName = QString("Audio ") + QString::number(audiotracks - i);
+        audioTrack.duration = 0;
         m_tracksList.append(audioTrack);
 
     }
@@ -321,6 +322,7 @@ QDomDocument KdenliveDoc::createEmptyDocument(int videotracks, int audiotracks)
         videoTrack.isBlind = false;
         videoTrack.isLocked = false;
         videoTrack.trackName = QString("Video ") + QString::number(videotracks - i);
+        videoTrack.duration = 0;
         m_tracksList.append(videoTrack);
     }
     return createEmptyDocument(m_tracksList);
@@ -1219,6 +1221,16 @@ void KdenliveDoc::switchTrackVideo(int ix, bool hide)
     m_tracksList[ix].isBlind = hide; // !m_tracksList.at(ix).isBlind;
 }
 
+int KdenliveDoc::trackDuration(int ix)
+{
+    return m_tracksList.at(ix).duration; 
+}
+
+void KdenliveDoc::setTrackDuration(int ix, int duration)
+{
+    m_tracksList[ix].duration = duration;
+}
+
 void KdenliveDoc::insertTrack(int ix, TrackInfo type)
 {
     if (ix == -1) m_tracksList << type;
index ad9b7a82e44778ad5a12528a735212c4b917bb53..e5cc2a2353631ac8ae3662c244e6cb1ca5f9b37d 100644 (file)
@@ -126,13 +126,24 @@ Q_OBJECT public:
     void switchTrackVideo(int ix, bool hide);
     void switchTrackAudio(int ix, bool hide);
     void switchTrackLock(int ix, bool lock);
+    bool isTrackLocked(int ix) const;
+
+    /** @brief Sets the duration of track @param ix to @param duration.
+     * This does not! influence the actual track but only the value in its TrackInfo. */
+    void setTrackDuration(int ix, int duration);
+
+    /** @brief Returns the duration of track @param ix.
+     *
+     * The returned duration might differ from the actual track duration!
+     * It is the one stored in the track's TrackInfo. */
+    int trackDuration(int ix);
+
     void cachePixmap(const QString &fileId, const QPixmap &pix) const;
     void setProjectFolder(KUrl url);
     QString getLadspaFile() const;
     void setZone(int start, int end);
     QPoint zone() const;
     int setSceneList();
-    bool isTrackLocked(int ix) const;
     void setDocumentProperty(const QString &name, const QString &value);
     const QString getDocumentProperty(const QString &name) const;
 
index 203cef2b2cdfdbf2fa0764eb91619957c108046c..5f888ca9512dd7688d30dd5a33e6f624c533f279 100644 (file)
@@ -2306,7 +2306,7 @@ bool Render::mltAddTrackEffect(int track, EffectsParameterList params)
     Mlt::Producer trackProducer(tractor.track(track));
     Mlt::Playlist trackPlaylist((mlt_playlist) trackProducer.get_service());
     Mlt::Service trackService(trackProducer.get_service()); //trackPlaylist
-    return mltAddEffect(trackService, params, 15000, true);
+    return mltAddEffect(trackService, params, trackProducer.get_playtime() - 1, true);
 }
 
 
index 146e3324b70d2d6bfb8e74668c70db2e19626ea7..11d2d3e8d0c788ca8b6cd9f655344f5a379eb69b 100644 (file)
@@ -188,7 +188,10 @@ Q_OBJECT public:
     void mltCutClip(int track, GenTime position);
     void mltInsertSpace(QMap <int, int> trackClipStartList, QMap <int, int> trackTransitionStartList, int track, const GenTime duration, const GenTime timeOffset);
     int mltGetSpaceLength(const GenTime pos, int track, bool fromBlankStart);
+
+    /** @brief Returns the duration/length of @param track as reported by the track producer. */
     int mltTrackDuration(int track);
+
     bool mltResizeClipEnd(ItemInfo info, GenTime clipDuration);
     bool mltResizeClipStart(ItemInfo info, GenTime diff);
     bool mltResizeClipCrop(ItemInfo info, GenTime diff);