]> git.sesse.net Git - kdenlive/commitdiff
Use the newly requested "list_devices" to query blackmagic devices
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 20 Mar 2012 08:22:57 +0000 (09:22 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Tue, 20 Mar 2012 08:22:57 +0000 (09:22 +0100)
src/renderer.cpp

index 13fb831f09aa90bdbce921cff816c71f4707cb28..ffc47964a166eec3a51434587514a1ee9496e00d 100644 (file)
@@ -4219,7 +4219,10 @@ bool Render::getBlackMagicDeviceList(KComboBox *devicelist)
     Mlt::Profile profile;
     Mlt::Producer bm(profile, "decklink");
     int found_devices = 0;
-    if (bm.is_valid()) found_devices = bm.get_int("devices");
+    if (bm.is_valid()) {
+       bm.set("list_devices", 1);
+       found_devices = bm.get_int("devices");
+    }
     if (found_devices <= 0) {
        devicelist->setEnabled(false);
        return false;
@@ -4237,7 +4240,10 @@ bool Render::getBlackMagicOutputDeviceList(KComboBox *devicelist)
     Mlt::Profile profile;
     Mlt::Consumer bm(profile, "decklink");
     int found_devices = 0;
-    if (bm.is_valid()) found_devices = bm.get_int("devices");
+    if (bm.is_valid()) {
+       bm.set("list_devices", 1);
+       found_devices = bm.get_int("devices");
+    }
     if (found_devices <= 0) {
        devicelist->setEnabled(false);
        return false;