Commit 3f81e537 authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

[Code Gartening] Remove unused code

parent ee912b13
Pipeline #240320 failed with stage
in 6 minutes and 28 seconds
......@@ -1054,101 +1054,6 @@ void GLWidget::stopCapture()
}
}
int GLWidget::reconfigureMulti(const QString &params, const QString &path, Mlt::Profile *profile)
{
Q_UNUSED(params);
Q_UNUSED(path);
Q_UNUSED(profile);
// TODO Fix or delete
/*
QString serviceName = property("mlt_service").toString();
if ((m_consumer == nullptr) || !m_consumer->is_valid() || strcmp(m_consumer->get("mlt_service"), "multi") != 0) {
if (m_consumer) {
m_consumer->purge();
m_consumer->stop();
m_consumer.reset();
}
m_consumer.reset(new Mlt::FilteredConsumer(*profile, "multi"));
delete m_threadStartEvent;
m_threadStartEvent = nullptr;
delete m_threadStopEvent;
m_threadStopEvent = nullptr;
delete m_threadCreateEvent;
delete m_threadJoinEvent;
if (m_consumer) {
m_threadCreateEvent = m_consumer->listen("consumer-thread-create", this, (mlt_listener)onThreadCreate);
m_threadJoinEvent = m_consumer->listen("consumer-thread-join", this, (mlt_listener)onThreadJoin);
}
}
if (m_consumer->is_valid()) {
// build sub consumers
// m_consumer->set("mlt_image_format", "yuv422");
reloadProfile();
int volume = KdenliveSettings::volume();
m_consumer->set("0", serviceName.toUtf8().constData());
m_consumer->set("0.mlt_image_format", "yuv422");
m_consumer->set("0.terminate_on_pause", 0);
// m_consumer->set("0.preview_off", 1);
m_consumer->set("0.real_time", 0);
m_consumer->set("0.volume", (double)volume / 100);
if (serviceName.startsWith(QLatin1String("sdl_audio"))) {
#ifdef Q_OS_WIN
m_consumer->set("0.audio_buffer", 2048);
#else
m_consumer->set("0.audio_buffer", 512);
#endif
QString audioDevice = KdenliveSettings::audiodevicename();
if (!audioDevice.isEmpty()) {
m_consumer->set("audio_device", audioDevice.toUtf8().constData());
}
QString audioDriver = KdenliveSettings::audiodrivername();
if (!audioDriver.isEmpty()) {
m_consumer->set("audio_driver", audioDriver.toUtf8().constData());
}
}
m_consumer->set("1", "avformat");
m_consumer->set("1.target", path.toUtf8().constData());
// m_consumer->set("1.real_time", -KdenliveSettings::mltthreads());
m_consumer->set("terminate_on_pause", 0);
m_consumer->set("1.terminate_on_pause", 0);
// m_consumer->set("1.terminate_on_pause", 0);// was commented out. restoring it fixes mantis#3415 - FFmpeg recording freezes
QStringList paramList = params.split(' ', Qt::SkipEmptyParts);
for (int i = 0; i < paramList.count(); ++i) {
QString key = "1." + paramList.at(i).section(QLatin1Char('='), 0, 0);
QString value = paramList.at(i).section(QLatin1Char('='), 1, 1);
if (value == QLatin1String("%threads")) {
value = QString::number(QThread::idealThreadCount());
}
m_consumer->set(key.toUtf8().constData(), value.toUtf8().constData());
}
// Connect the producer to the consumer - tell it to "run" later
delete m_displayEvent;
// C & D
if (m_glslManager) {
// D
if (m_openGLSync) {
m_displayEvent = m_consumer->listen("consumer-frame-show", this, (mlt_listener)on_gl_frame_show);
} else {
// C
m_displayEvent = m_consumer->listen("consumer-frame-show", this, (mlt_listener)on_gl_nosync_frame_show);
}
} else {
// A & B
m_displayEvent = m_consumer->listen("consumer-frame-show", this, (mlt_listener)on_frame_show);
}
m_consumer->connect(*m_producer.get());
m_consumer->start();
return 0;
}
*/
return -1;
}
int GLWidget::reconfigure()
{
int error = 0;
......
......@@ -71,8 +71,6 @@ public:
void startGlsl();
void stopGlsl();
void clear();
// TODO: currently unused
int reconfigureMulti(const QString &params, const QString &path, Mlt::Profile *profile);
void stopCapture();
int displayWidth() const { return m_rect.width(); }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment