+ QLocale locale;
+
+ MltVideoProfile profile;
+ QString resource;
+ QString service;
+ QString profilePath;
+ // Create MLT producer data
+ if (capture_device->itemData(capture_device->currentIndex()) == "v4l") {
+ // Capture using a video4linux device
+ profilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
+ profile = ProfilesDialog::getVideoProfile(profilePath);
+ service = "avformat-novalidate";
+ QString devicePath = capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 1).toString();
+ resource = QString("video4linux2:%1?width:%2&height:%3&frame_rate:%4").arg(devicePath).arg(profile.width).arg(profile.height).arg((double) profile.frame_rate_num / profile.frame_rate_den);
+ }
+ else {
+ // Decklink capture
+ profilePath = KdenliveSettings::current_profile();
+ profile = ProfilesDialog::getVideoProfile(profilePath);
+ service = "decklink";
+ resource = capture_device->itemData(capture_device->currentIndex(), Qt::UserRole + 1).toString();
+ }