]> git.sesse.net Git - kdenlive/commitdiff
Merge branch 'master' into next
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 12 Nov 2011 19:34:02 +0000 (20:34 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 12 Nov 2011 19:34:02 +0000 (20:34 +0100)
19 files changed:
doc/index.docbook
src/clipmanager.cpp
src/clipmanager.h
src/docclipbase.cpp
src/docclipbase.h
src/kdenlive.desktop
src/kdenlive.notifyrc
src/projectlist.cpp
src/projectlist.h
src/widgets/audiospectrum_ui.ui
src/widgets/bezierspline_ui.ui
src/widgets/configproject_ui.ui
src/widgets/geometrywidget_ui.ui
src/widgets/histogram_ui.ui
src/widgets/spectrogram_ui.ui
src/widgets/vectorscope_ui.ui
src/widgets/waveform_ui.ui
src/widgets/wizardcapture_ui.ui
thumbnailer/westleypreview.desktop

index 65bf22a17d8f02d340dfc3284a2480831f60dc80..a974e3a3381240cf4e2a71cbd9f6219c8cf3924e 100644 (file)
     </caption>
   </mediaobject>
 </screenshot></para>
-<para>Let’s save the work via <menuchoice><guimenu>File</guimenu><guimenuitem>Save</guimenuitem></menuchoice>. This saves our project, &ie; where we placed the clips on the timeline, which effects we applied, and so on. It can <emphasis>not</emphasis> be played.<footnote><para>To be correct, it <emphasis>can</emphasis> be played using <screen>melt yourproject.kdenlive</screen>, but this is not the way you would want to present your final video since it is (most likely) too slow. Additionally, it only works if melt is installed.</para></footnote> The process of creating the final video is called <emphasis>Rendering</emphasis>.</para>
+<para>Let’s save the work via <menuchoice><guimenu>File</guimenu><guimenuitem>Save</guimenuitem></menuchoice>. This saves our project, &ie; where we placed the clips on the timeline, which effects we applied, and so on. It can <emphasis>not</emphasis> be played.<footnote><para>To be correct, it <emphasis>can</emphasis> be played using <varname>melt yourproject.kdenlive</varname>, but this is not the way you would want to present your final video since it is (most likely) too slow. Additionally, it only works if melt is installed.</para></footnote> The process of creating the final video is called <emphasis>Rendering</emphasis>.</para>
 </chapter>
 <chapter id="timeline"><title>Timeline</title> 
 <para>Now comes the actual editing. Project clips are combined to the final result on the timeline.  They get there by drag and drop: Drag some Napoli (assuming you are using the files provided above, as in the rest of this quick start tutorial; If not, please make sure your screen is waterproof, and perhaps tomatoproof), and drop it onto the first track in the timeline.</para>
     </caption>
   </mediaobject>
 </screenshot></para>
-<para>Now that the clips overlap, the transition can be added. This is done either by right-clicking on the upper clip and chosing <guilabel>Add Transition</guilabel> or, easier, by clicking the lower right corner of the Spoon clip. The latter by default adds a dissolve transition, which is in this case the best idea anyway since the Spoon is not required for playing anyway.</para>
+<para>Now that the clips overlap, the transition can be added. This is done either by right-clicking on the upper clip and choosing <guilabel>Add Transition</guilabel> or, easier, by clicking the lower right corner of the Spoon clip. The latter by default adds a dissolve transition, which is in this case the best idea anyway since the Spoon is not required for playing anyway.</para>
 <para>The dissolve transitions fades the first clip into the second one.</para>
 <para>
 <screenshot>
index 4c7db5873a2d4e05f9e2ac422abeb005ab01699a..a06874543bb3d5dbded0a5ea7c970fd28497b7b6 100644 (file)
@@ -325,15 +325,24 @@ void ClipManager::resetProducersList(const QList <Mlt::Producer *> prods, bool d
         }
     }
     QString id;
+    Mlt::Producer *prod;
+    QStringList brokenClips;
     for (int i = 0; i < prods.count(); i++) {
-        id = prods.at(i)->get("id");
+        prod = prods.at(i);
+        id = prod->get("id");
         if (id.contains('_')) id = id.section('_', 0, 0);
         DocClipBase *clip = getClipById(id);
-        if (clip) {
-            clip->setProducer(prods.at(i), false, true);
+        QString markup = prod->get("markup");
+        if (prod->is_blank() || !prod->is_valid() || !markup.isEmpty()) {
+            // The clip is broken (missing proxy or source clip)
+            kDebug()<<"// WARNING, CLIP "<<id<<" Cannot be loaded";
+            brokenClips << id;
+        }
+        else if (clip) {
+            clip->setProducer(prod, false, true);
         }
     }
-    emit checkAllClips(displayRatioChanged, fpsChanged);
+    emit checkAllClips(displayRatioChanged, fpsChanged, brokenClips);
 }
 
 void ClipManager::slotAddClipList(const KUrl::List urls, const QString &group, const QString &groupId)
index a3787c0f329b6b4f1a3ca4a94326d58d35ef3eb5..9ac2cfd2dbcc1bf9e25d8bea670b5df2b7f48a83 100644 (file)
@@ -161,7 +161,7 @@ signals:
     void modifiedClip(const QString &);
     void missingClip(const QString &);
     void availableClip(const QString &);
-    void checkAllClips(bool displayRatioChanged, bool fpsChanged);
+    void checkAllClips(bool displayRatioChanged, bool fpsChanged, QStringList brokenClips);
 };
 
 #endif
index c1facc9a94de737a931a1e9658d50ce6124a6e57..9e581942067f82e7311b64653ab5b4b0c5bda40e 100644 (file)
@@ -413,6 +413,12 @@ void DocClipBase::clearThumbProducer()
     if (m_thumbProd) m_thumbProd->clearProducer();
 }
 
+void DocClipBase::reloadThumbProducer()
+{
+    if (m_thumbProd && !m_thumbProd->hasProducer())
+        m_thumbProd->setProducer(getProducer());
+}
+
 void DocClipBase::deleteProducers()
 {
     if (m_thumbProd) m_thumbProd->clearProducer();
@@ -699,6 +705,7 @@ Mlt::Producer *DocClipBase::getProducer(int track)
 Mlt::Producer *DocClipBase::cloneProducer(Mlt::Producer *source)
 {
     Mlt::Producer *result = NULL;
+    QString invalidClip = source->get("markup");
     QString url = QString::fromUtf8(source->get("resource"));
     if (KIO::NetAccess::exists(KUrl(url), KIO::NetAccess::SourceSide, 0)) {
         result = new Mlt::Producer(*(source->profile()), url.toUtf8().constData());
index 31a9a9825525d219007f8ebd0819d769c4e6c340..f84f8d84f1221adfeee77d5629cbd27d20d7cf65 100644 (file)
@@ -206,6 +206,7 @@ Q_OBJECT public:
     void setPlaceHolder(bool place);
     QPixmap extractImage(int frame, int width, int height);
     void clearThumbProducer();
+    void reloadThumbProducer();
     void cleanupProducers();
     bool isClean() const;
 
index ebb6457039793b861de7b98696d04911d5be6150..3253283f969ba0079c08262fc30b174af2e4fc6e 100644 (file)
@@ -12,12 +12,14 @@ Name[x-test]=xxKdenlivexx
 GenericName=Video Editor
 GenericName[cs]=Editor videí
 GenericName[de]=Video-Editor
+GenericName[nl]=Video-bewerker
 GenericName[pt]=Editor de Vídeo
 GenericName[sv]=Videoeditor
 GenericName[uk]=Відеоредактор
 GenericName[x-test]=xxVideo Editorxx
 Comment=Nonlinear video editor for KDE
 Comment[de]=Nichtlinearer Video-Editor für KDE
+Comment[nl]=Niet-lineaire video-bewerker voor KDE
 Comment[pt]=Editor de vídeo não-linear para o KDE
 Comment[sv]=Icke-linjär videoeditor för KDE
 Comment[uk]=Нелінійний редактор відео для KDE
index bff10575f881b6f1199018b3eff4b98b4ee80cf4..ee9443b35748989eb0d149de53cd449b47f34c2b 100644 (file)
@@ -4,6 +4,7 @@ Comment=Kdenlive
 Comment[cs]=Kdenlive
 Comment[de]=Kdenlive
 Comment[nds]=Kdenlive
+Comment[nl]=Kdenlive
 Comment[pt]=Kdenlive
 Comment[sv]=Kdenlive
 Comment[uk]=Kdenlive
@@ -12,12 +13,14 @@ Comment[x-test]=xxKdenlivexx
 [Event/RenderFinished]
 Name=Rendering finished
 Name[cs]=Renderování bylo dokončeno
+Name[nl]=Weergave uitwerken beëindigd
 Name[pt]=A geração terminou
 Name[sv]=Framställning klar
 Name[uk]=Обробку завершено
 Name[x-test]=xxRendering finishedxx
 Comment=Rendering is over
 Comment[cs]=Renderování je hotové
+Comment[nl]=Weergave uitwerken is gereed
 Comment[pt]=A geração terminou
 Comment[sv]=Framställning är gjord
 Comment[uk]=Виконання обробки завершено
@@ -27,12 +30,14 @@ Action=Popup
 [Event/RenderStarted]
 Name=Rendering started
 Name[cs]=Renderování začalo
+Name[nl]=Weergave uitwerken begonnen
 Name[pt]=A geração foi iniciada
 Name[sv]=Framställning startad
 Name[uk]=Обробку розпочато
 Name[x-test]=xxRendering startedxx
 Comment=Rendering was started
 Comment[cs]=Renderování bylo začato
+Comment[nl]=Weergave uitwerken is begonnen
 Comment[pt]=A geração foi iniciada
 Comment[sv]=Framställning har startats
 Comment[uk]=Було розпочато обробку
@@ -41,11 +46,13 @@ Action=Popup
 
 [Event/FrameCaptured]
 Name=Frame captured
+Name[nl]=Frame opgenomen
 Name[pt]=Imagem capturada
 Name[sv]=Ram lagrad
 Name[uk]=Захоплено кадр
 Name[x-test]=xxFrame capturedxx
 Comment=A frame was captured to disk
+Comment[nl]=Een frame is op schijf opgenomen
 Comment[pt]=Foi capturada uma imagem para o disco
 Comment[sv]=En ram har lagrats på disk
 Comment[uk]=Було захоплено кадр, програма зберегла його на диску
@@ -55,6 +62,7 @@ Action=Sound
 
 [Event/ReadyToCapture]
 Name=Ready to capture
+Name[nl]=Gereed om op te nemen
 Name[pt]=Pronto para capturar
 Name[sv]=Klar att lagra
 Name[uk]=Приготовано до захоплення
@@ -73,10 +81,10 @@ Name[sv]=Fel
 Name[uk]=Помилка
 Name[x-test]=xxErrorxx
 Comment=An error occurred in Kdenlive
-Comment[de]=Es ist ein Fehler in Kdenlive aufgetreten
+Comment[nl]=Er is een fout opgetreden in Kdenlive
 Comment[pt]=Ocorreu um erro no Kdenlive
 Comment[sv]=Ett fel uppstod i Kdenlive
 Comment[uk]=У коді Kdenlive сталася помилка
-Comment[x-test]=xxAn error occured in Kdenlivexx
+Comment[x-test]=xxAn error occurred in Kdenlivexx
 Sound=KDE-Sys-Warning.ogg
 Action=Sound
index 73f91d4fdf6efd94333c18bfca4ba26b8fba21e7..7226b22e7083d1d4335a9c5c07cc439d7bfe6441 100644 (file)
@@ -1227,7 +1227,7 @@ void ProjectList::getCachedThumbnail(SubProjectItem *item)
     else requestClipThumbnail(parentItem->clipId() + '#' + QString::number(pos));
 }
 
-void ProjectList::updateAllClips(bool displayRatioChanged, bool fpsChanged)
+void ProjectList::updateAllClips(bool displayRatioChanged, bool fpsChanged, QStringList brokenClips)
 {
     if (!m_allClipsProcessed) m_listView->setEnabled(false);
     m_listView->setSortingEnabled(false);
@@ -1270,6 +1270,13 @@ void ProjectList::updateAllClips(bool displayRatioChanged, bool fpsChanged)
             item = static_cast <ProjectItem *>(*it);
             clip = item->referencedClip();
             if (item->referencedClip()->getProducer() == NULL) {
+                bool replace = false;
+                if (brokenClips.contains(item->clipId())) {
+                    // if this is a proxy clip, disable proxy
+                    item->setProxyStatus(NOPROXY);
+                    clip->setProperty("proxy", "-");
+                    replace = true;
+                }
                 if (clip->isPlaceHolder() == false && !item->isProxyRunning()) {
                     QDomElement xml = clip->toXML();
                     if (fpsChanged) {
@@ -1277,7 +1284,7 @@ void ProjectList::updateAllClips(bool displayRatioChanged, bool fpsChanged)
                         xml.removeAttribute("file_hash");
                         xml.removeAttribute("proxy_out");
                     }
-                    bool replace = xml.attribute("replace") == "1";
+                    if (!replace) replace = xml.attribute("replace") == "1";
                     if (replace) resetThumbsProducer(clip);
                     m_render->getFileProperties(xml, clip->getId(), m_listView->iconSize().height(), replace);
                 }
@@ -1469,6 +1476,7 @@ void ProjectList::slotRemoveInvalidProxy(const QString &id, bool durationError)
 {
     ProjectItem *item = getItemById(id);
     if (item) {
+        kDebug()<<"// Proxy for clip "<<id<<" is invalid, delete";
         item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsDragEnabled | Qt::ItemIsEnabled | Qt::ItemIsEditable | Qt::ItemIsDropEnabled);
         if (durationError) {
             kDebug() << "Proxy duration is wrong, try changing transcoding parameters.";
@@ -1482,6 +1490,14 @@ void ProjectList::slotRemoveInvalidProxy(const QString &id, bool durationError)
         if (proxyFolder.isParentOf(KUrl(path))) {
             QFile::remove(path);
         }
+        if (item->referencedClip()->getProducer() == NULL) {
+            // Clip has no valid producer, request it
+            slotProxyCurrentItem(false, item);
+        }
+        else {
+            // refresh thumbs producer
+            item->referencedClip()->reloadThumbProducer();
+        }
     }
     m_processingClips.removeAll(id);
     m_thumbnailQueue.removeAll(id);
@@ -1633,7 +1649,7 @@ void ProjectList::setDocument(KdenliveDoc *doc)
     connect(m_doc->clipManager(), SIGNAL(modifiedClip(const QString &)), this, SLOT(slotModifiedClip(const QString &)));
     connect(m_doc->clipManager(), SIGNAL(missingClip(const QString &)), this, SLOT(slotMissingClip(const QString &)));
     connect(m_doc->clipManager(), SIGNAL(availableClip(const QString &)), this, SLOT(slotAvailableClip(const QString &)));
-    connect(m_doc->clipManager(), SIGNAL(checkAllClips(bool, bool)), this, SLOT(updateAllClips(bool, bool)));
+    connect(m_doc->clipManager(), SIGNAL(checkAllClips(bool, bool, QStringList)), this, SLOT(updateAllClips(bool, bool, QStringList)));
 }
 
 QList <DocClipBase*> ProjectList::documentClipList() const
@@ -2618,9 +2634,11 @@ void ProjectList::updateProxyConfig()
     else delete command;
 }
 
-void ProjectList::slotProxyCurrentItem(bool doProxy)
+void ProjectList::slotProxyCurrentItem(bool doProxy, ProjectItem *itemToProxy)
 {
-    QList<QTreeWidgetItem *> list = m_listView->selectedItems();
+    QList<QTreeWidgetItem *> list;
+    if (itemToProxy == NULL) list = m_listView->selectedItems();
+    else list << itemToProxy;
     QTreeWidgetItem *listItem;
     QUndoCommand *command = new QUndoCommand();
     if (doProxy) command->setText(i18np("Add proxy clip", "Add proxy clips", list.count()));
@@ -2649,7 +2667,7 @@ void ProjectList::slotProxyCurrentItem(bool doProxy)
             ProjectItem *item = static_cast <ProjectItem*>(listItem);
             CLIPTYPE t = item->clipType();
             if ((t == VIDEO || t == AV || t == UNKNOWN || t == IMAGE || t == PLAYLIST) && item->referencedClip()) {
-                if ((doProxy && item->hasProxy()) || (!doProxy && !item->hasProxy())) continue;
+                if ((doProxy && item->hasProxy()) || (!doProxy && !item->hasProxy() && item->referencedClip()->getProducer() != NULL)) continue;
                 DocClipBase *clip = item->referencedClip();
                 if (!clip || !clip->isClean() || m_render->isProcessing(item->clipId())) {
                     kDebug()<<"//// TRYING TO PROXY: "<<item->clipId()<<", but it is busy";
@@ -2667,6 +2685,10 @@ void ProjectList::slotProxyCurrentItem(bool doProxy)
                     // We need to insert empty proxy so that undo will work
                     oldProps.insert("proxy", QString());
                 }
+                else if (item->referencedClip()->getProducer() == NULL) {
+                    // Force clip reload
+                    newProps.insert("resource", item->referencedClip()->getProperty("resource"));
+                }
                 new EditClipCommand(this, item->clipId(), oldProps, newProps, true, command);
             }
         }
index 6f1815e44506c074393550c6a95efd609bff0466..02c32199612b8e9c7db42807411ceeaf77fea6eb 100644 (file)
@@ -241,7 +241,7 @@ public:
 
 public slots:
     void setDocument(KdenliveDoc *doc);
-    void updateAllClips(bool displayRatioChanged, bool fpsChanged);
+    void updateAllClips(bool displayRatioChanged, bool fpsChanged, QStringList brokenClips);
     void slotReplyGetImage(const QString &clipId, const QImage &img);
     void slotReplyGetImage(const QString &clipId, const QString &name, int width, int height);
     void slotReplyGetFileProperties(const QString &clipId, Mlt::Producer *producer, const stringMap &properties, const stringMap &metadata, bool replace);
@@ -380,7 +380,7 @@ private slots:
     void slotGotProxy(const QString &proxyPath);
     void slotGotProxy(ProjectItem *item);
     /** @brief Enable / disable proxy for current clip. */
-    void slotProxyCurrentItem(bool doProxy);
+    void slotProxyCurrentItem(bool doProxy, ProjectItem *itemToProxy = NULL);
     /** @brief Put clip in the proxy waiting list. */
     void slotCreateProxy(const QString id);
     /** @brief Stop creation of this clip's proxy. */
index 27f8bab77d975897e46e09dc6977ff2ea37b925a..84619533a229deb4dc28d6582a134b37f476e1f9 100644 (file)
@@ -10,9 +10,6 @@
     <height>300</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout_2">
    <item row="1" column="5">
     <widget class="QComboBox" name="windowSize"/>
index 276fbb2a3b30fe2385580433ac7b2f6a4728d0c1..62465c64c0d39ba585be0f860d17259b6f4f3d30 100644 (file)
@@ -10,9 +10,6 @@
     <height>75</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout">
    <property name="margin">
     <number>0</number>
index 03e948fd6704dcd0b7ad2434cf78d487a59b2d34..94f1658561785e6e93d85ba4b1fa8676b73c45a8 100644 (file)
@@ -10,9 +10,6 @@
     <height>332</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout_4">
    <property name="leftMargin">
     <number>0</number>
index 026c21766aa0f8af58311e75855aa8e2906ea69c..56296b394912d262366ab48239554a3a5b4dccb2 100644 (file)
@@ -10,9 +10,6 @@
     <height>85</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout_3">
    <property name="horizontalSpacing">
     <number>0</number>
index 722ce22a7f33c7e4efb0fbc5e90d47cce3b30da8..1aebcd0d636e97712bcb066dfb70eb150af555ec 100644 (file)
@@ -10,9 +10,6 @@
     <height>296</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="1">
     <widget class="QCheckBox" name="cbY">
index c061538f1e33d28e24c7f1fe5bd0d0c7664a9cf3..316a02af5d51cf0f4bf8e5e58fd5a83d3653b4e8 100644 (file)
@@ -10,9 +10,6 @@
     <height>300</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="5">
     <widget class="QComboBox" name="windowSize"/>
index db0e35a84e627f27836e543d21c3c4573c08b405..997eb164d61ce9db727491ab456f28a57fbfb1d2 100644 (file)
@@ -22,9 +22,6 @@
     <height>450</height>
    </size>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0">
     <widget class="QLabel" name="lblPaintMode">
index d07563c23509570a35176ca4e6a661cd2fee963d..4e0c7ea05ab9730e5a8b269f31c8c9536d0cdfeb 100644 (file)
@@ -10,9 +10,6 @@
     <height>300</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout">
    <property name="horizontalSpacing">
     <number>5</number>
index 96b1b7508679c2b1ff414310655101aa6fc7b2be..1c204c748584a7d2ad668be9551adb0a15b6e544 100644 (file)
@@ -10,9 +10,6 @@
     <height>110</height>
    </rect>
   </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
   <layout class="QGridLayout" name="gridLayout">
    <item row="0" column="0" colspan="4">
     <widget class="QLabel" name="label">
index fec9097a021475811b302cf7ddd33ce8bed79ab8..72f4bc7fd363a505ee09d7c48d421ec6a027689e 100644 (file)
@@ -3,6 +3,7 @@ Type=Service
 Name=MLT Playlist
 Name[cs]=Seznam skladeb MLT
 Name[de]=MLT-Wiedergabeliste
+Name[nl]=MLT-afspeellijst
 Name[pt]=Lista de Reprodução MLT
 Name[sv]=MLT-spellista
 Name[uk]=Список відтворення MLT