widgets/bezierspline_ui.ui
widgets/monitoreditwidget_ui.ui
widgets/archivewidget_ui.ui
+ widgets/manageencodingprofile_ui.ui
)
set(kdenlive_SRCS
archivewidget.cpp
mltdevicecapture.cpp
abstractmonitor.cpp
+ encodingprofilesdialog.cpp
)
add_definitions(${KDE4_DEFINITIONS})
#include "abstractmonitor.h"
+#include <KDebug>
VideoPreviewContainer::VideoPreviewContainer(QWidget *parent) :
- QFrame(parent),
- m_image(new QImage())
+ QFrame(parent)
{
setFrameShape(QFrame::NoFrame);
setFocusPolicy(Qt::ClickFocus);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ connect(&m_refreshTimer, SIGNAL(timeout()), this, SLOT(update()));
+ m_refreshTimer.setSingleShot(false);
+ m_refreshTimer.setInterval(200);
+}
+
+VideoPreviewContainer::~VideoPreviewContainer()
+{
+ qDeleteAll(m_imageQueue);
}
void VideoPreviewContainer::setImage(QImage img)
{
- if (m_image) delete m_image;
- m_image = new QImage(img);
- update();
+ if (m_imageQueue.count() > 2) {
+ delete m_imageQueue.takeLast();//replace(10, new QImage(img));
+ }
+ m_imageQueue.prepend(new QImage(img));
+}
+
+void VideoPreviewContainer::stop()
+{
+ m_refreshTimer.stop();
+ qDeleteAll(m_imageQueue);
+ m_imageQueue.clear();
+}
+
+void VideoPreviewContainer::start()
+{
+ m_refreshTimer.start();
}
// virtual
void VideoPreviewContainer::paintEvent(QPaintEvent */*event*/)
{
- if (m_image->isNull()) return;
+ if (m_imageQueue.isEmpty()) return;
+ QImage *img = m_imageQueue.takeFirst();
QPainter painter(this);
- double ar = (double) m_image->width() / m_image->height();
+ double ar = (double) img->width() / img->height();
QRect rect = this->frameRect();
int paintW = rect.height() * ar + 0.5;
if (paintW > rect.width()) {
rect.setWidth(paintW);
}
- painter.drawImage(rect, *m_image);
+ painter.drawImage(rect, *img);
+ delete img;
}
#include <QImage>
#include <QPainter>
#include <QFrame>
+#include <QTimer>
class VideoPreviewContainer : public QFrame
{
Q_OBJECT
public:
VideoPreviewContainer(QWidget *parent = 0);
-
+ ~VideoPreviewContainer();
void setImage(QImage img);
+ void start();
+ void stop();
protected:
virtual void paintEvent(QPaintEvent */*event*/);
private:
- QImage *m_image;
+ QList <QImage *> m_imageQueue;
+ QTimer m_refreshTimer;
};
fprintf(stderr, "Could not open video output file \"%s\"\n", videopath.toUtf8().constData());
return;
}
- if (KdenliveSettings::hdmicaptureaudio()) {
+ /*if (KdenliveSettings::hdmicaptureaudio()) {
audioOutputFile = open(audiopath.toUtf8().constData(), O_WRONLY | O_CREAT | O_TRUNC, 0664);
if (audioOutputFile < 0) {
emit gotMessage(i18n("Could not open audio output file %1", audiopath));
fprintf(stderr, "Could not open video output file \"%s\"\n", audiopath.toUtf8().constData());
return;
}
- }
+ }*/
}
void BmdCaptureHandler::stopCapture()
}
//static
-bool BMInterface::getBlackMagicDeviceList(KComboBox *devicelist, KComboBox *modelist)
+bool BMInterface::getBlackMagicDeviceList(KComboBox *devicelist)
{
IDeckLinkIterator* deckLinkIterator;
IDeckLink* deckLink;
}
deckLinkIterator->Release();
- if(modelist != NULL && devicelist->count() > 0) {
- QStringList modes = devicelist->itemData(devicelist->currentIndex()).toStringList();
- modelist->insertItems(0, modes);
- }
return found;
}
public:
BMInterface();
~BMInterface();
- static bool getBlackMagicDeviceList(KComboBox *devicelist, KComboBox *modelist);
+ static bool getBlackMagicDeviceList(KComboBox *devicelist);
static bool getBlackMagicOutputDeviceList(KComboBox *devicelist);
static bool isSupportedProfile(int card, QMap< QString, QString > properties);
static QStringList supportedModes(int card);
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ ***************************************************************************/
+
+#include "encodingprofilesdialog.h"
+#include "kdenlivesettings.h"
+
+#include <KStandardDirs>
+#include <KDebug>
+#include <KMessageBox>
+#include <KIO/NetAccess>
+
+#include <QDir>
+#include <QCloseEvent>
+#include <QVBoxLayout>
+#include <QLineEdit>
+#include <QPlainTextEdit>
+
+EncodingProfilesDialog::EncodingProfilesDialog(int profileType, QWidget * parent) :
+ QDialog(parent),
+ m_configGroup(NULL)
+{
+ setupUi(this);
+ setWindowTitle(i18n("Manage Encoding Profiles"));
+ profile_type->addItem(i18n("Proxy clips"), 0);
+ profile_type->addItem(i18n("Video4Linux capture"), 1);
+ profile_type->addItem(i18n("Decklink capture"), 2);
+
+ button_add->setIcon(KIcon("list-add"));
+ button_edit->setIcon(KIcon("document-edit"));
+ button_delete->setIcon(KIcon("list-remove"));
+ button_download->setIcon(KIcon("download"));
+
+ QString profileFile = KStandardDirs::locateLocal("appdata", "encodingprofiles.rc");
+ if (!QFile::exists(profileFile)) {
+ // todo: copy global config file to local
+ //KIO::NetAccess::copy()
+ }
+ m_configFile = new KConfig(profileFile, KConfig::SimpleConfig);
+ profile_type->setCurrentIndex(profileType);
+ connect(profile_type, SIGNAL(currentIndexChanged(int)), this, SLOT(slotLoadProfiles()));
+ connect(profile_list, SIGNAL(currentRowChanged(int)), this, SLOT(slotShowParams()));
+ connect(button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteProfile()));
+ connect(button_add, SIGNAL(clicked()), this, SLOT(slotAddProfile()));
+ connect(button_edit, SIGNAL(clicked()), this, SLOT(slotEditProfile()));
+ profile_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
+ slotLoadProfiles();
+}
+
+EncodingProfilesDialog::~EncodingProfilesDialog()
+{
+ delete m_configGroup;
+ delete m_configFile;
+}
+
+void EncodingProfilesDialog::slotLoadProfiles()
+{
+ profile_list->blockSignals(true);
+ profile_list->clear();
+ QString group;
+ switch (profile_type->currentIndex()) {
+ case 0:
+ group = "proxy";
+ break;
+ case 1:
+ group = "video4linux";
+ break;
+ default:
+ case 2:
+ group = "decklink";
+ break;
+ }
+
+
+ m_configGroup = new KConfigGroup(m_configFile, group);
+ QMap< QString, QString > values = m_configGroup->entryMap();
+ QMapIterator<QString, QString> i(values);
+ while (i.hasNext()) {
+ i.next();
+ QListWidgetItem *item = new QListWidgetItem(i.key(), profile_list);
+ item->setData(Qt::UserRole, i.value());
+ //cout << i.key() << ": " << i.value() << endl;
+ }
+ profile_list->blockSignals(false);
+ profile_list->setCurrentRow(0);
+ button_delete->setEnabled(profile_list->count() > 0);
+ button_edit->setEnabled(profile_list->count() > 0);
+}
+
+void EncodingProfilesDialog::slotShowParams()
+{
+ profile_parameters->clear();
+ QListWidgetItem *item = profile_list->currentItem();
+ if (!item) return;
+ profile_parameters->setPlainText(item->data(Qt::UserRole).toString().section(";", 0, 0));
+}
+
+void EncodingProfilesDialog::slotDeleteProfile()
+{
+ QListWidgetItem *item = profile_list->currentItem();
+ if (!item) return;
+ QString profile = item->text();
+ m_configGroup->deleteEntry(profile);
+ slotLoadProfiles();
+}
+
+void EncodingProfilesDialog::slotAddProfile()
+{
+ QDialog *d = new QDialog(this);
+ QVBoxLayout *l = new QVBoxLayout;
+ l->addWidget(new QLabel(i18n("Profile name:")));
+ QLineEdit *pname = new QLineEdit;
+ l->addWidget(pname);
+ l->addWidget(new QLabel(i18n("Parameters:")));
+ QPlainTextEdit *pparams = new QPlainTextEdit;
+ l->addWidget(pparams);
+ l->addWidget(new QLabel(i18n("File extension:")));
+ QLineEdit *pext = new QLineEdit;
+ l->addWidget(pext);
+ QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
+ connect(box, SIGNAL(accepted()), d, SLOT(accept()));
+ connect(box, SIGNAL(rejected()), d, SLOT(reject()));
+ l->addWidget(box);
+ d->setLayout(l);
+
+ QListWidgetItem *item = profile_list->currentItem();
+ if (item) {
+ QString data = item->data(Qt::UserRole).toString();
+ pparams->setPlainText(data.section(";", 0, 0));
+ pext->setText(data.section(";", 1, 1));
+ }
+ if (d->exec() == QDialog::Accepted) {
+ m_configGroup->writeEntry(pname->text(), pparams->toPlainText() + ";" + pext->text());
+ slotLoadProfiles();
+ }
+ delete d;
+}
+
+void EncodingProfilesDialog::slotEditProfile()
+{
+ QDialog *d = new QDialog(this);
+ QVBoxLayout *l = new QVBoxLayout;
+ l->addWidget(new QLabel(i18n("Profile name:")));
+ QLineEdit *pname = new QLineEdit;
+ l->addWidget(pname);
+ l->addWidget(new QLabel(i18n("Parameters:")));
+ QPlainTextEdit *pparams = new QPlainTextEdit;
+ l->addWidget(pparams);
+ l->addWidget(new QLabel(i18n("File extension:")));
+ QLineEdit *pext = new QLineEdit;
+ l->addWidget(pext);
+ QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Save | QDialogButtonBox::Cancel);
+ connect(box, SIGNAL(accepted()), d, SLOT(accept()));
+ connect(box, SIGNAL(rejected()), d, SLOT(reject()));
+ l->addWidget(box);
+ d->setLayout(l);
+
+ QListWidgetItem *item = profile_list->currentItem();
+ if (item) {
+ pname->setText(item->text());
+ QString data = item->data(Qt::UserRole).toString();
+ pparams->setPlainText(data.section(";", 0, 0));
+ pext->setText(data.section(";", 1, 1));
+ pparams->setFocus();
+ }
+ if (d->exec() == QDialog::Accepted) {
+ m_configGroup->writeEntry(pname->text(), pparams->toPlainText() + ";" + pext->text());
+ slotLoadProfiles();
+ }
+ delete d;
+}
+
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2008 by Jean-Baptiste Mardelle (jb@kdenlive.org) *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
+ ***************************************************************************/
+
+
+#ifndef ENCODINGPROFILESDIALOG_H
+#define ENCODINGPROFILESDIALOG_H
+
+
+#include "definitions.h"
+#include "ui_manageencodingprofile_ui.h"
+
+class EncodingProfilesDialog : public QDialog, Ui::ManageEncodingProfile_UI
+{
+ Q_OBJECT
+
+public:
+ EncodingProfilesDialog(int profileType, QWidget * parent = 0);
+ ~EncodingProfilesDialog();
+
+protected:
+
+private slots:
+ void slotLoadProfiles();
+ void slotShowParams();
+ void slotDeleteProfile();
+ void slotAddProfile();
+ void slotEditProfile();
+
+private:
+ KConfig *m_configFile;
+ KConfigGroup *m_configGroup;
+};
+
+
+#endif
+
<default>ts</default>
</entry>
+ <entry name="proxy_profile" type="UInt">
+ <label>default v4l encoding profile.</label>
+ <default>0</default>
+ </entry>
+
<entry name="proxyparams" type="String">
<label>Proxy clips transcoding parameters.</label>
<default>-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k</default>
<entry name="v4l_parameters" type="String">
<label>Default video4linux format.</label>
- <default>f=mpeg acodec=mp2 ab=128k ar=48000 vcodec=mpeg2video minrate=0 b=4000k bf=2 b_strategy=1 trellis=1</default>
+ <default>f=mpeg acodec=mp2 ab=128k ar=48000 vcodec=mpeg2video minrate=0 b=4000k</default>
</entry>
<entry name="v4l_extension" type="String">
<label>Default video4linux file extension.</label>
- <default>mpeg</default>
+ <default>mpg</default>
</entry>
<entry name="v4l_format" type="UInt">
<label>Should we also capture audio.</label>
<default>false</default>
</entry>
+
+ <entry name="v4l_profile" type="UInt">
+ <label>default v4l encoding profile.</label>
+ <default>0</default>
+ </entry>
<entry name="rmd_capture_audio" type="Bool">
<label>capture audio.</label>
<default></default>
</entry>
- <entry name="hdmi_capturedevice" type="Int">
+ <entry name="decklink_capturedevice" type="UInt">
<label>default HDMI capture device.</label>
<default>0</default>
</entry>
-
- <entry name="hdmi_capturemode" type="Int">
- <label>default HDMI capture mode.</label>
+
+ <entry name="decklink_profile" type="UInt">
+ <label>default HDMI encoding profile.</label>
<default>0</default>
</entry>
- <entry name="hdmifilename" type="String">
+ <entry name="decklink_filename" type="String">
<label>default HDMI capture filename.</label>
<default>capture</default>
</entry>
-
- <entry name="hdmicaptureaudio" type="Bool">
- <label>Should we capture HDMI audio.</label>
- <default>true</default>
- </entry>
+
+ <entry name="decklink_parameters" type="String">
+ <label>Default Decklink encoding parameters.</label>
+ <default>vcodec=mpeg2video minrate=0 b=12000k acodec=mp2 ab=128k ar=48000 threads=2</default>
+ </entry>
+
+ <entry name="decklink_extension" type="String">
+ <label>Default Decklink capture file extension.</label>
+ <default>mpg</default>
+ </entry>
</group>
<group name="shuttle">
#include "profilesdialog.h"
#include "v4l/v4lcapture.h"
#include "blackmagic/devices.h"
+#include "encodingprofilesdialog.h"
#include "kdenlivesettings.h"
#include <KStandardDirs>
m_configProject.kcfg_proxyminsize->setEnabled(KdenliveSettings::generateproxy());
connect(m_configProject.kcfg_generateimageproxy, SIGNAL(toggled(bool)), m_configProject.kcfg_proxyimageminsize, SLOT(setEnabled(bool)));
m_configProject.kcfg_proxyimageminsize->setEnabled(KdenliveSettings::generateimageproxy());
- m_configProject.kcfg_proxyparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 5);
QWidget *p3 = new QWidget;
m_configTimeline.setupUi(p3);
m_configCapture.setupUi(p4);
#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD)
- m_configCapture.kcfg_v4l_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
// Video 4 Linux device detection
for (int i = 0; i < 10; i++) {
connect(m_configEnv.kp_audio, SIGNAL(clicked()), this, SLOT(slotEditAudioApplication()));
connect(m_configEnv.kp_player, SIGNAL(clicked()), this, SLOT(slotEditVideoApplication()));
+ loadEncodingProfiles();
checkProfile();
slotUpdateDisplay();
KdenliveSettings::setDvgrab_path(dvgrabpath);
}
-
- BMInterface::getBlackMagicDeviceList(m_configCapture.kcfg_hdmi_capturedevice, m_configCapture.kcfg_hdmi_capturemode);
- connect(m_configCapture.kcfg_hdmi_capturedevice, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateHDMIModes()));
+ // decklink profile
+ m_configCapture.decklink_showprofileinfo->setIcon(KIcon("help-about"));
+ m_configCapture.decklink_manageprofile->setIcon(KIcon("configure"));
+ m_configCapture.decklink_parameters->setVisible(false);
+ m_configCapture.decklink_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
+ m_configCapture.decklink_parameters->setPlainText(KdenliveSettings::decklink_parameters());
+ connect(m_configCapture.decklink_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
+ connect(m_configCapture.kcfg_decklink_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDecklinkProfile()));
+ connect(m_configCapture.decklink_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.decklink_parameters, SLOT(setVisible(bool)));
+
+ // v4l profile
+ m_configCapture.v4l_showprofileinfo->setIcon(KIcon("help-about"));
+ m_configCapture.v4l_manageprofile->setIcon(KIcon("configure"));
+ m_configCapture.v4l_parameters->setVisible(false);
+ m_configCapture.v4l_parameters->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
+ m_configCapture.v4l_parameters->setPlainText(KdenliveSettings::v4l_parameters());
+ connect(m_configCapture.v4l_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
+ connect(m_configCapture.kcfg_v4l_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateV4lProfile()));
+ connect(m_configCapture.v4l_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.v4l_parameters, SLOT(setVisible(bool)));
+
+ // proxy profile stuff
+ m_configProject.proxy_showprofileinfo->setIcon(KIcon("help-about"));
+ m_configProject.proxy_manageprofile->setIcon(KIcon("configure"));
+ m_configProject.proxyparams->setVisible(false);
+ m_configProject.proxyparams->setMaximumHeight(QFontMetrics(font()).lineSpacing() * 4);
+ m_configProject.proxyparams->setPlainText(KdenliveSettings::proxyparams());
+ connect(m_configProject.proxy_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
+ connect(m_configProject.proxy_showprofileinfo, SIGNAL(clicked(bool)), m_configProject.proxyparams, SLOT(setVisible(bool)));
+ connect(m_configProject.kcfg_proxy_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateProxyProfile()));
+
+
+ slotUpdateProxyProfile(-1);
+ slotUpdateV4lProfile(-1);
+ slotUpdateDecklinkProfile(-1);
+
+ BMInterface::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice);
+ if (m_configCapture.kcfg_decklink_capturedevice->count() > 0) {
+ QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
+ m_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
+ }
+ connect(m_configCapture.kcfg_decklink_capturedevice, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateHDMIModes()));
if (BMInterface::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device)) {
// Found blackmagic card
void KdenliveSettingsDialog::slotUpdateHDMIModes()
{
- QStringList modes = m_configCapture.kcfg_hdmi_capturedevice->itemData(m_configCapture.kcfg_hdmi_capturedevice->currentIndex()).toStringList();
- m_configCapture.kcfg_hdmi_capturemode->clear();
- m_configCapture.kcfg_hdmi_capturemode->insertItems(0, modes);
+ QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
+ m_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
}
void KdenliveSettingsDialog::slotUpdateRmdRegionStatus()
KdenliveSettings::setV4l_format(0);
}
+ // Check encoding profiles
+ QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
+ if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::v4l_parameters()) {
+ KdenliveSettings::setV4l_parameters(data.section(";", 0, 0));
+ KdenliveSettings::setV4l_extension(data.section(";", 1, 1));
+ }
+ data = m_configCapture.kcfg_decklink_profile->itemData(m_configCapture.kcfg_decklink_profile->currentIndex()).toString();
+ if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::decklink_parameters()) {
+ KdenliveSettings::setDecklink_parameters(data.section(";", 0, 0));
+ KdenliveSettings::setDecklink_extension(data.section(";", 1, 1));
+ }
+ data = m_configProject.kcfg_proxy_profile->itemData(m_configProject.kcfg_proxy_profile->currentIndex()).toString();
+ if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::proxyparams()) {
+ KdenliveSettings::setProxyparams(data.section(";", 0, 0));
+ KdenliveSettings::setProxyextension(data.section(";", 1, 1));
+ }
+
if (updateCapturePath) emit updateCaptureFolder();
resetProfile = true;
}
- if (m_configProject.kcfg_enableproxy->isChecked() != KdenliveSettings::enableproxy()) {
- KdenliveSettings::setEnableproxy(m_configProject.kcfg_enableproxy->isChecked());
- }
-
- if (m_configProject.kcfg_generateproxy->isChecked() != KdenliveSettings::generateproxy()) {
- KdenliveSettings::setGenerateproxy(m_configProject.kcfg_generateproxy->isChecked());
- }
-
- if (m_configProject.kcfg_proxyminsize->value() != KdenliveSettings::proxyminsize()) {
- KdenliveSettings::setProxyminsize(m_configProject.kcfg_proxyminsize->value());
- }
-
if (m_modified) {
// The transcoding profiles were modified, save.
m_modified = false;
ProfilesDialog::saveProfile(profile, vl4ProfilePath);
}
+void KdenliveSettingsDialog::slotManageEncodingProfile()
+{
+ int type = 0;
+ if (currentPage() == m_page4) {
+ if (m_configCapture.tabWidget->currentIndex() == 1) type = 1;
+ else if (m_configCapture.tabWidget->currentIndex() == 3) type = 2;
+ }
+ EncodingProfilesDialog *d = new EncodingProfilesDialog(type);
+ d->exec();
+ delete d;
+ loadEncodingProfiles();
+}
+
+void KdenliveSettingsDialog::loadEncodingProfiles()
+{
+ QString profileFile = KStandardDirs::locateLocal("appdata", "encodingprofiles.rc");
+ KConfig conf(profileFile, KConfig::SimpleConfig);
+ if (!QFile::exists(profileFile)) {
+ KConfigGroup g1(&conf, "video4linux");
+ g1.writeEntry("Normal MPEG", KdenliveSettings::v4l_parameters() + ";" + KdenliveSettings::v4l_extension());
+ KConfigGroup g2(&conf, "decklink");
+ g2.writeEntry("Normal MPEG", KdenliveSettings::decklink_parameters() + ";" + KdenliveSettings::decklink_extension());
+ KConfigGroup g3(&conf, "proxy");
+ g3.writeEntry("Normal MPEG", KdenliveSettings::proxyparams() + ";" + KdenliveSettings::proxyextension());
+ }
+
+ // Load v4l profiles
+ m_configCapture.kcfg_v4l_profile->blockSignals(true);
+ QString currentItem = m_configCapture.kcfg_v4l_profile->currentText();
+ m_configCapture.kcfg_v4l_profile->clear();
+ KConfigGroup group(&conf, "video4linux");
+ QMap< QString, QString > values = group.entryMap();
+ QMapIterator<QString, QString> i(values);
+ while (i.hasNext()) {
+ i.next();
+ if (!i.key().isEmpty()) m_configCapture.kcfg_v4l_profile->addItem(i.key(), i.value());
+ }
+ m_configCapture.kcfg_v4l_profile->blockSignals(false);
+ if (!currentItem.isEmpty()) m_configCapture.kcfg_v4l_profile->setCurrentIndex(m_configCapture.kcfg_v4l_profile->findText(currentItem));
+
+ // Load Decklink profiles
+ m_configCapture.kcfg_decklink_profile->blockSignals(true);
+ currentItem = m_configCapture.kcfg_decklink_profile->currentText();
+ m_configCapture.kcfg_decklink_profile->clear();
+ KConfigGroup group2(&conf, "decklink");
+ values = group2.entryMap();
+ QMapIterator<QString, QString> j(values);
+ while (j.hasNext()) {
+ j.next();
+ if (!j.key().isEmpty()) m_configCapture.kcfg_decklink_profile->addItem(j.key(), j.value());
+ }
+ m_configCapture.kcfg_decklink_profile->blockSignals(false);
+ if (!currentItem.isEmpty()) m_configCapture.kcfg_decklink_profile->setCurrentIndex(m_configCapture.kcfg_decklink_profile->findText(currentItem));
+
+ // Load Proxy profiles
+ m_configProject.kcfg_proxy_profile->blockSignals(true);
+ currentItem = m_configProject.kcfg_proxy_profile->currentText();
+ m_configProject.kcfg_proxy_profile->clear();
+ KConfigGroup group3(&conf, "proxy");
+ values = group3.entryMap();
+ QMapIterator<QString, QString> k(values);
+ while (k.hasNext()) {
+ k.next();
+ if (!k.key().isEmpty()) m_configProject.kcfg_proxy_profile->addItem(k.key(), k.value());
+ }
+ m_configProject.kcfg_proxy_profile->blockSignals(false);
+ if (!currentItem.isEmpty()) m_configProject.kcfg_proxy_profile->setCurrentIndex(m_configProject.kcfg_proxy_profile->findText(currentItem));
+}
+
+void KdenliveSettingsDialog::slotUpdateDecklinkProfile(int ix)
+{
+ if (ix == -1) ix = KdenliveSettings::decklink_profile();
+ else ix = m_configCapture.kcfg_decklink_profile->currentIndex();
+ QString data = m_configCapture.kcfg_decklink_profile->itemData(ix).toString();
+ if (data.isEmpty()) return;
+ m_configCapture.decklink_parameters->setPlainText(data.section(";", 0, 0));
+ //
+}
+
+void KdenliveSettingsDialog::slotUpdateV4lProfile(int ix)
+{
+ if (ix == -1) ix = KdenliveSettings::v4l_profile();
+ else ix = m_configCapture.kcfg_v4l_profile->currentIndex();
+ QString data = m_configCapture.kcfg_v4l_profile->itemData(ix).toString();
+ if (data.isEmpty()) return;
+ m_configCapture.v4l_parameters->setPlainText(data.section(";", 0, 0));
+ //
+}
+
+void KdenliveSettingsDialog::slotUpdateProxyProfile(int ix)
+{
+ if (ix == -1) ix = KdenliveSettings::v4l_profile();
+ else ix = m_configProject.kcfg_proxy_profile->currentIndex();
+ QString data = m_configProject.kcfg_proxy_profile->itemData(ix).toString();
+ if (data.isEmpty()) return;
+ m_configProject.proxyparams->setPlainText(data.section(";", 0, 0));
+ //
+}
+
#include "kdenlivesettingsdialog.moc"
void slotUpdateHDMIModes();
void slotUpdatev4lDevice();
void slotUpdatev4lCaptureProfile();
+ void slotManageEncodingProfile();
+ void slotUpdateDecklinkProfile(int ix = 0);
+ void slotUpdateProxyProfile(int ix = 0);
+ void slotUpdateV4lProfile(int ix = 0);
private:
KPageWidgetItem *m_page1;
void saveTranscodeProfiles();
void loadCurrentV4lProfileInfo();
void saveCurrentV4lProfile();
+ void loadEncodingProfiles();
signals:
void customChanged();
void MltDeviceCapture::stop()
{
bool isPlaylist = false;
+ m_captureDisplayWidget->stop();
if (m_mltConsumer) {
m_mltConsumer->set("refresh", 0);
m_mltConsumer->stop();
doCapture = 5;
}
-bool MltDeviceCapture::slotStartCapture(const QString ¶ms, const QString &path, const QString &playlist)
+bool MltDeviceCapture::slotStartCapture(const QString ¶ms, const QString &path, const QString &playlist, bool xmlPlaylist)
{
stop();
if (m_mltProfile) delete m_mltProfile;
// FIXME: the event object returned by the listen gets leaked...
m_mltConsumer->listen("consumer-frame-show", this, (mlt_listener) rec_consumer_frame_show);
tmp = qstrdup(playlist.toUtf8().constData());
- m_mltProducer = new Mlt::Producer(*m_mltProfile, "xml-string", tmp);
+ if (xmlPlaylist) {
+ // create an xml producer
+ m_mltProducer = new Mlt::Producer(*m_mltProfile, "xml-string", tmp);
+ }
+ else {
+ // create a producer based on mltproducer parameter
+ m_mltProducer = new Mlt::Producer(*m_mltProfile, tmp);
+ }
delete[] tmp;
if (m_mltProducer == NULL || !m_mltProducer->is_valid()) {
m_mltConsumer = NULL;
return 0;
}
+ m_captureDisplayWidget->start();
return 1;
}
/** @brief Starts the MLT Video4Linux process.
* @param surface The widget onto which the frame should be painted
*/
- bool slotStartCapture(const QString ¶ms, const QString &path, const QString &playlist);
+ bool slotStartCapture(const QString ¶ms, const QString &path, const QString &playlist, bool xmlPlaylist = true);
bool slotStartPreview(const QString &producer, bool xmlFormat = false);
/** @brief A frame arrived from the MLT Video4Linux process. */
void gotCapturedFrame(Mlt::Frame& frame);
void MonitorManager::activateMonitor(QString name)
{
- kDebug()<<"//ACTIVATING MON: "<<name;
if (m_blocked || m_clipMonitor == NULL || m_projectMonitor == NULL)
return;
if (m_activeMonitor && m_activeMonitor->name() == name)
return;
m_activeMonitor = NULL;
for (int i = 0; i < m_monitorsList.count(); i++) {
- kDebug()<<"PARSING: "<<m_monitorsList.at(i)->name();
if (m_monitorsList.at(i)->name() == name) {
m_activeMonitor = m_monitorsList.at(i);
emit raiseMonitor(m_activeMonitor);
capturefile = m_capturePath;
if (!capturefile.endsWith("/")) capturefile.append("/");
- capturename = KdenliveSettings::hdmifilename();
+ capturename = KdenliveSettings::decklink_filename();
capturename.append("xxx.raw");
capturefile.append(capturename);
video_frame->setPixmap(mergeSideBySide(KIcon("camera-photo").pixmap(QSize(50, 50)), i18n("Plug your camcorder and\npress play button\nto start preview.\nFiles will be saved in:\n%1", capturefile)));
m_manager->updateScopeSource();
}
profile = ProfilesDialog::getVideoProfile(path);
- producer = QString("decklink:%1").arg(KdenliveSettings::hdmi_capturedevice());
+ producer = QString("decklink:%1").arg(KdenliveSettings::decklink_capturedevice());
if (!m_captureDevice->slotStartPreview(producer)) {
// v4l capture failed to start
video_frame->setText(i18n("Failed to start Decklink,\ncheck your parameters..."));
m_playAction->setEnabled(false);
m_stopAction->setEnabled(true);
}
- //m_bmCapture->startPreview(KdenliveSettings::hdmi_capturedevice(), KdenliveSettings::hdmi_capturemode());
+ //m_bmCapture->startPreview(KdenliveSettings::decklink_capturedevice(), KdenliveSettings::hdmi_capturemode());
m_playAction->setEnabled(false);
m_stopAction->setEnabled(true);
m_recAction->setEnabled(true);
m_recAction->setChecked(false);
break;
case VIDEO4LINUX:
+ case BLACKMAGIC:
slotStopCapture();
m_isCapturing = false;
m_recAction->setChecked(false);
}
if (m_captureProcess->state() == QProcess::NotRunning) {
m_recAction->setChecked(true);
- QString extension = "mp4";
+ QString extension = "mpg";
if (device_selector->currentIndex() == SCREENGRAB) extension = "ogv"; //KdenliveSettings::screengrabextension();
else if (device_selector->currentIndex() == VIDEO4LINUX) extension = KdenliveSettings::v4l_extension();
+ else if (device_selector->currentIndex() == BLACKMAGIC) extension = KdenliveSettings::decklink_extension();
QString path = KUrl(m_capturePath).path(KUrl::AddTrailingSlash) + "capture0000." + extension;
int i = 1;
while (QFile::exists(path)) {
m_manager->updateScopeSource();
}
- playlist = QString("<producer id=\"producer0\" in=\"0\" out=\"99999\"><property name=\"mlt_type\">producer</property><property name=\"length\">100000</property><property name=\"eof\">pause</property><property name=\"resource\">%1</property><property name=\"mlt_service\">decklink</property></producer>").arg(KdenliveSettings::hdmi_capturedevice());
+ playlist = QString("<producer id=\"producer0\" in=\"0\" out=\"99999\"><property name=\"mlt_type\">producer</property><property name=\"length\">100000</property><property name=\"eof\">pause</property><property name=\"resource\">%1</property><property name=\"mlt_service\">decklink</property></producer>").arg(KdenliveSettings::decklink_capturedevice());
- if (m_captureDevice->slotStartCapture(KdenliveSettings::v4l_parameters(), m_captureFile.path(), playlist)) {
+ if (m_captureDevice->slotStartCapture(KdenliveSettings::decklink_parameters(), m_captureFile.path(), QString("decklink:%1").arg(KdenliveSettings::decklink_capturedevice()), false)) {
m_videoBox->setHidden(false);
m_isCapturing = true;
}
layout->addWidget(m_videoBox);
- if (BMInterface::getBlackMagicDeviceList(capture_device, NULL)) {
+ if (BMInterface::getBlackMagicDeviceList(capture_device)) {
// Found a BlackMagic device
}
if (QFile::exists(KdenliveSettings::video4vdevice())) {
<x>0</x>
<y>0</y>
<width>405</width>
- <height>563</height>
+ <height>532</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_8">
<string>Video4Linux</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
+ <item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_30">
<property name="text">
<string>Detected devices</string>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="4">
+ <item row="0" column="4" colspan="4">
<widget class="KComboBox" name="kcfg_detectedv4ldevices"/>
</item>
- <item row="1" column="0">
+ <item row="1" column="0" colspan="2">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Video device</string>
</property>
</widget>
</item>
- <item row="1" column="1" colspan="4">
+ <item row="1" column="4" colspan="4">
<widget class="KLineEdit" name="kcfg_video4vdevice">
<property name="text">
<string/>
</property>
</widget>
</item>
+ <item row="2" column="0" colspan="2">
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Capture format</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="4" colspan="4">
+ <widget class="KComboBox" name="kcfg_v4l_format"/>
+ </item>
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
</property>
</widget>
</item>
- <item row="3" column="1" colspan="4">
+ <item row="3" column="4" colspan="4">
<widget class="QLabel" name="p_size">
<property name="text">
<string>720x576</string>
</property>
</widget>
</item>
- <item row="4" column="1" colspan="4">
+ <item row="4" column="0" colspan="2">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Frame rate:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="4" colspan="4">
<widget class="QLabel" name="p_fps">
<property name="text">
<string>25/1</string>
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="5" column="0" colspan="2">
<widget class="QLabel" name="label_23">
<property name="text">
<string>Pixel aspect ratio:</string>
</property>
</widget>
</item>
- <item row="5" column="1" colspan="4">
+ <item row="5" column="4" colspan="4">
<widget class="QLabel" name="p_aspect">
<property name="text">
<string>59/54</string>
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="6" column="0" colspan="3">
<widget class="QLabel" name="label_31">
<property name="text">
<string>Display aspect ratio:</string>
</property>
</widget>
</item>
- <item row="6" column="1" colspan="4">
+ <item row="6" column="4" colspan="4">
<widget class="QLabel" name="p_display">
<property name="text">
<string>4/3</string>
</property>
</widget>
</item>
- <item row="7" column="0">
+ <item row="7" column="0" colspan="2">
<widget class="QLabel" name="label_32">
<property name="text">
<string>Colorspace</string>
</property>
</widget>
</item>
- <item row="7" column="1" colspan="4">
+ <item row="7" column="4" colspan="4">
<widget class="QLabel" name="p_colorspace">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="8" column="0">
+ <item row="8" column="0" colspan="2">
<widget class="QLabel" name="p_progressive">
<property name="text">
<string>Interlaced</string>
</property>
</widget>
</item>
- <item row="8" column="1" colspan="3">
+ <item row="8" column="4" colspan="2">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</spacer>
</item>
- <item row="8" column="4">
+ <item row="8" column="6" colspan="2">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Edit</string>
</property>
</widget>
</item>
- <item row="9" column="0" colspan="4">
+ <item row="9" column="0" rowspan="4" colspan="8">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
- <item row="12" column="0" colspan="4">
+ <item row="13" column="0" colspan="4">
+ <widget class="QCheckBox" name="kcfg_v4l_captureaudio">
+ <property name="text">
+ <string>Capture audio (ALSA)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="14" column="0" colspan="8">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
- <item row="13" column="0">
- <widget class="QLabel" name="label_12">
+ <item row="15" column="0" colspan="2">
+ <widget class="QLabel" name="label_24">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
</sizepolicy>
</property>
<property name="text">
- <string>Encoding parameters</string>
+ <string>Encoding profile</string>
</property>
</widget>
</item>
- <item row="14" column="0" colspan="5">
- <widget class="QPlainTextEdit" name="kcfg_v4l_parameters">
+ <item row="15" column="4">
+ <widget class="KComboBox" name="kcfg_v4l_profile">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="17" column="0" colspan="8">
+ <widget class="QPlainTextEdit" name="v4l_parameters">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
</widget>
</item>
- <item row="16" column="0">
+ <item row="18" column="1" colspan="4">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
- <item row="15" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>File extension</string>
- </property>
- </widget>
- </item>
- <item row="15" column="1" colspan="4">
- <widget class="QLineEdit" name="kcfg_v4l_extension">
- <property name="maxLength">
- <number>5</number>
+ <item row="13" column="4" colspan="4">
+ <widget class="KComboBox" name="kcfg_v4l_alsadevice">
+ <property name="enabled">
+ <bool>false</bool>
</property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Capture format</string>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
- <item row="2" column="1" colspan="4">
- <widget class="KComboBox" name="kcfg_v4l_format"/>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_4">
+ <item row="15" column="7">
+ <widget class="QToolButton" name="v4l_manageprofile">
<property name="text">
- <string>Frame rate:</string>
+ <string>...</string>
</property>
</widget>
</item>
- <item row="10" column="0">
- <widget class="QCheckBox" name="kcfg_v4l_captureaudio">
+ <item row="15" column="6">
+ <widget class="QToolButton" name="v4l_showprofileinfo">
<property name="text">
- <string>Capture audio (ALSA)</string>
+ <string>...</string>
</property>
- </widget>
- </item>
- <item row="10" column="1" colspan="4">
- <widget class="KComboBox" name="kcfg_v4l_alsadevice">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="checkable">
+ <bool>true</bool>
</property>
</widget>
</item>
<attribute name="title">
<string>Blackmagic</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout_10">
+ <layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="KComboBox" name="kcfg_hdmi_capturedevice">
+ <item row="0" column="1" colspan="8">
+ <widget class="KComboBox" name="kcfg_decklink_capturedevice">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_28">
- <property name="text">
- <string>Capture mode</string>
+ <item row="5" column="0" colspan="9">
+ <widget class="QPlainTextEdit" name="decklink_parameters">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="KComboBox" name="kcfg_hdmi_capturemode"/>
- </item>
- <item row="2" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="label_29">
<property name="text">
<string>Capture file name</string>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="kcfg_hdmifilename"/>
+ <item row="6" column="1" colspan="8">
+ <widget class="QLineEdit" name="kcfg_decklink_filename"/>
</item>
- <item row="4" column="1">
+ <item row="7" column="8">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
- <item row="3" column="0" colspan="2">
- <widget class="QCheckBox" name="kcfg_hdmicaptureaudio">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_16">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Capture audio</string>
+ <string>Encoding profile</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" colspan="6">
+ <widget class="KComboBox" name="kcfg_decklink_profile">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="8">
+ <widget class="QToolButton" name="decklink_manageprofile">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="7">
+ <widget class="QToolButton" name="decklink_showprofileinfo">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
</property>
</widget>
</item>
<rect>
<x>0</x>
<y>0</y>
- <width>333</width>
- <height>353</height>
+ <width>329</width>
+ <height>332</height>
</rect>
</property>
<property name="windowTitle">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
+ <item row="0" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_generateproxy">
<property name="text">
<string>Generate for videos larger than</string>
</property>
</widget>
</item>
- <item row="0" column="1">
+ <item row="0" column="2" colspan="3">
<widget class="KIntSpinBox" name="kcfg_proxyminsize">
<property name="suffix">
<string>pixels</string>
</property>
</widget>
</item>
- <item row="1" column="0">
+ <item row="1" column="0" colspan="2">
<widget class="QCheckBox" name="kcfg_generateimageproxy">
<property name="text">
<string>Generate for images larger than</string>
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="1" column="2" colspan="3">
<widget class="KIntSpinBox" name="kcfg_proxyimageminsize">
<property name="suffix">
<string>pixels</string>
</property>
</widget>
</item>
- <item row="2" column="0" colspan="2">
- <widget class="QLabel" name="label">
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_24">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>FFmpeg video transcoding parameters</string>
+ <string>Encoding profile</string>
</property>
</widget>
</item>
- <item row="3" column="0" colspan="2">
- <widget class="QPlainTextEdit" name="kcfg_proxyparams">
+ <item row="2" column="1" colspan="2">
+ <widget class="KComboBox" name="kcfg_proxy_profile">
<property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_2">
+ <item row="2" column="3">
+ <widget class="QToolButton" name="proxy_showprofileinfo">
<property name="text">
- <string>File extension</string>
+ <string>...</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
</property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="KLineEdit" name="kcfg_proxyextension">
+ <item row="2" column="4">
+ <widget class="QToolButton" name="proxy_manageprofile">
<property name="text">
- <string>avi</string>
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="5">
+ <widget class="QPlainTextEdit" name="proxyparams">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
</property>
</widget>
</item>
<extends>QSpinBox</extends>
<header>knuminput.h</header>
</customwidget>
- <customwidget>
- <class>KLineEdit</class>
- <extends>QLineEdit</extends>
- <header>klineedit.h</header>
- </customwidget>
<customwidget>
<class>KComboBox</class>
<extends>QComboBox</extends>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ManageEncodingProfile_UI</class>
+ <widget class="QDialog" name="ManageEncodingProfile_UI">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>444</width>
+ <height>337</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="4">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Editing profiles for</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4" colspan="2">
+ <widget class="KComboBox" name="profile_type"/>
+ </item>
+ <item row="1" column="0" colspan="6">
+ <widget class="QListWidget" name="profile_list">
+ <property name="alternatingRowColors">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="6">
+ <widget class="QPlainTextEdit" name="profile_parameters">
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QToolButton" name="button_add">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QToolButton" name="button_edit">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QToolButton" name="button_delete">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QToolButton" name="button_download">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="4">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>155</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="5">
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Close</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>ManageEncodingProfile_UI</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>ManageEncodingProfile_UI</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>