]> git.sesse.net Git - kdenlive/commitdiff
Add option to speed up project loading: Replace all avformat producers with avformat...
authorTill Theato <root@ttill.de>
Fri, 12 Nov 2010 23:21:58 +0000 (23:21 +0000)
committerTill Theato <root@ttill.de>
Fri, 12 Nov 2010 23:21:58 +0000 (23:21 +0000)
svn path=/trunk/kdenlive/; revision=5091

effects/frei0r_pixeliz0r.xml
src/abstractclipitem.h
src/kdenlivedoc.cpp
src/kdenlivesettings.kcfg
src/renderer.cpp
src/widgets/configmisc_ui.ui

index 11b7c8dbf80f3a3bbcdff3271300a73fb051631d..ab59583d697b2761657296d95ca17fca8dd347e8 100644 (file)
@@ -1,6 +1,6 @@
 <!DOCTYPE kpartgui>
 <effect tag="frei0r.pixeliz0r" id="frei0r.pixeliz0r">
-        <name>Pixelizor</name>
+        <name>Pixelize</name>
         <description>Pixelize input image.</description>
         <author>Gephex crew</author>
         <parameter type="simplekeyframe" name="BlockSizeX" default="10" min="0" max="1000" factor="1000">
index f24e0ab24ac6ab5abac6f600be1a7a8fe1c10eef..f42bcdd3ed8d7a5d5ecebd6d60f4cc66c40080ac 100644 (file)
@@ -67,7 +67,7 @@ public:
     bool isItemLocked() const;
     void closeAnimation();
 
-    virtual  OPERATIONTYPE operationMode(QPointF pos) = 0;
+    virtual OPERATIONTYPE operationMode(QPointF pos) = 0;
     virtual GenTime startPos() const ;
     virtual void setTrack(int track);
     virtual GenTime endPos() const ;
index b2383dc4ba017668b28aee923e908a3feb0a4203..fb87c65cb02731fa8c0fed7554599baf45ad0b97 100644 (file)
@@ -193,7 +193,8 @@ KdenliveDoc::KdenliveDoc(const KUrl &url, const KUrl &projectFolder, QUndoGroup
                                         break;
                                     }
                                 }
-                                progressDialog->progressBar()->setValue(i);
+                                if (i % 10 == 0)
+                                    progressDialog->progressBar()->setValue(i);
                             }
 
                             if (success) {
index aa4056fbc66cd6ae4a224b49ceb4264682ca3707..49d65f06879244d0113a8e6d1901d50290cd24eb 100644 (file)
       <label>Connect the corners in the widget for the c0rners effect with lines.</label>
       <default>false</default>
     </entry>
+    
+    <entry name="projectloading_avformatnovalidate" type="Bool">
+      <label>Do not validate the video files when loading a project for the sake of speed.</label>
+      <default>false</default>
+    </entry>
 
   </group>
 
index 26ecea8710d3c0ebc971781e9b6fa02fb1d730be..239a8e06a8b1646189a8707609e2488f923a47c6 100644 (file)
@@ -869,7 +869,7 @@ int Render::setSceneList(QString playlist, int position)
     m_isBlocked = true;
     int error = 0;
 
-    kDebug() << "//////  RENDER, SET SCENE LIST: " << playlist;
+    //kDebug() << "//////  RENDER, SET SCENE LIST: " << playlist;
 
     if (m_mltConsumer) {
         if (!m_mltConsumer->is_stopped()) {
@@ -926,6 +926,13 @@ int Render::setSceneList(QString playlist, int position)
     }
 
     blockSignals(true);
+
+    // TODO: Better way to do this
+    if (KdenliveSettings::projectloading_avformatnovalidate())
+        playlist.replace(">avformat</property>", ">avformat-novalidate</property>");
+    else
+        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()) {
@@ -2054,7 +2061,7 @@ int Render::mltChangeClipSpeed(ItemInfo info, ItemInfo speedIndependantInfo, dou
     QString id = clipparent.get("id");
     if (speed <= 0 && speed > -1) speed = 1.0;
     //kDebug() << "CLIP SERVICE: " << serv;
-    if (serv == "avformat" && (speed != 1.0 || strobe > 1)) {
+    if ((serv == "avformat" || serv == "avformat-novalidate") && (speed != 1.0 || strobe > 1)) {
         mlt_service_lock(service.get_service());
         QString url = QString::fromUtf8(clipparent.get("resource"));
         url.append('?' + QString::number(speed));
index 99eefb6d3369015fb54d083278295a09049c01f6..44d030bb0a64359cba7121f84cda294c384685aa 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>329</width>
-    <height>245</height>
+    <width>389</width>
+    <height>304</height>
    </rect>
   </property>
   <layout class="QGridLayout" name="gridLayout_4">
@@ -32,7 +32,7 @@
      </property>
     </widget>
    </item>
-   <item row="6" column="0" colspan="3">
+   <item row="7" column="0" colspan="3">
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
       <string>Default Durations</string>
      </layout>
     </widget>
    </item>
-   <item row="8" column="0" colspan="3">
+   <item row="9" column="0" colspan="3">
     <spacer>
      <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
     </widget>
    </item>
-   <item row="7" column="0">
+   <item row="8" column="0">
     <widget class="QCheckBox" name="kcfg_autoimagesequence">
      <property name="text">
       <string>Automatically import image sequences</string>
      </property>
     </widget>
    </item>
+   <item row="6" column="0">
+    <widget class="QCheckBox" name="kcfg_projectloading_avformatnovalidate">
+     <property name="text">
+      <string>Do not validate the video files when loading a project (faster)</string>
+     </property>
+    </widget>
+   </item>
   </layout>
  </widget>
  <customwidgets>