]> git.sesse.net Git - kdenlive/blobdiff - src/wizard.cpp
Video4linux webcam, only show each format once in case the webcam answers same format...
[kdenlive] / src / wizard.cpp
index 7a8c12ef8a64ab7ecf4874ee3f623cb677beecf3..7574901ae0fd37bd1707fd2f5009223f77ac00ba 100644 (file)
@@ -219,7 +219,9 @@ void Wizard::slotUpdateCaptureParameters()
             itemSize = sizes.at(j).section("=", 0, 0);
             itemRates = sizes.at(j).section("=", 1, 1).split(",", QString::SkipEmptyParts);
             for (int k = 0; k < itemRates.count(); k++) {
-                m_capture.v4l_formats->addItem("[" + format + "] " + itemSize + " (" + itemRates.at(k) + ")", QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section('/', 0, 0) << itemRates.at(k).section('/', 1, 1));
+                QString formatDescription = "[" + format + "] " + itemSize + " (" + itemRates.at(k) + ")";
+                if (m_capture.v4l_formats->findText(formatDescription) == -1)
+                    m_capture.v4l_formats->addItem(formatDescription, QStringList() << format << itemSize.section('x', 0, 0) << itemSize.section('x', 1, 1) << itemRates.at(k).section('/', 0, 0) << itemRates.at(k).section('/', 1, 1));
             }
         }
     }