Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Akhil K Gangadharan
kdenlive
Commits
92b88c61
Commit
92b88c61
authored
Feb 04, 2018
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compatibility with MLT >= 6.6.0
parent
bab0ebc5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
17 deletions
+57
-17
src/capture/mltdevicecapture.cpp
src/capture/mltdevicecapture.cpp
+2
-2
src/dialogs/kdenlivesettingsdialog.cpp
src/dialogs/kdenlivesettingsdialog.cpp
+3
-3
src/dialogs/wizard.cpp
src/dialogs/wizard.cpp
+12
-1
src/kdenlivesettings.kcfg
src/kdenlivesettings.kcfg
+6
-1
src/mainwindow.cpp
src/mainwindow.cpp
+1
-1
src/monitor/glwidget.cpp
src/monitor/glwidget.cpp
+33
-9
No files found.
src/capture/mltdevicecapture.cpp
View file @
92b88c61
...
...
@@ -92,7 +92,7 @@ bool MltDeviceCapture::buildConsumer(const QString &profileName)
}
qputenv
(
"SDL_VIDEO_ALLOW_SCREENSAVER"
,
"1"
);
// OpenGL monitor
m_mltConsumer
=
new
Mlt
::
Consumer
(
*
m_mltProfile
,
"sdl_audio"
);
m_mltConsumer
=
new
Mlt
::
Consumer
(
*
m_mltProfile
,
KdenliveSettings
::
audiobackend
().
toUtf8
().
constData
()
);
m_mltConsumer
->
set
(
"preview_off"
,
1
);
m_mltConsumer
->
set
(
"preview_format"
,
mlt_image_rgb24
);
m_showFrameEvent
=
m_mltConsumer
->
listen
(
"consumer-frame-show"
,
this
,
(
mlt_listener
)
consumer_gl_frame_show
);
...
...
@@ -396,7 +396,7 @@ bool MltDeviceCapture::slotStartCapture(const QString ¶ms, const QString &pa
qputenv
(
"SDL_VIDEO_ALLOW_SCREENSAVER"
,
"1"
);
// OpenGL monitor
previewProps
->
set
(
"mlt_service"
,
"sdl_audio"
);
previewProps
->
set
(
"mlt_service"
,
KdenliveSettings
::
audiobackend
().
toUtf8
().
constData
()
);
previewProps
->
set
(
"preview_off"
,
1
);
previewProps
->
set
(
"preview_format"
,
mlt_image_rgb24
);
previewProps
->
set
(
"terminate_on_pause"
,
0
);
...
...
src/dialogs/kdenlivesettingsdialog.cpp
View file @
92b88c61
...
...
@@ -547,7 +547,7 @@ void KdenliveSettingsDialog::initDevices()
KdenliveSettings
::
setV4l_alsadevice
(
ix
);
}
m_configSdl
.
kcfg_audio_backend
->
addItem
(
i18n
(
"SDL"
),
"sdl_audio"
);
m_configSdl
.
kcfg_audio_backend
->
addItem
(
i18n
(
"SDL"
),
KdenliveSettings
::
sdlAudioBackend
()
);
m_configSdl
.
kcfg_audio_backend
->
addItem
(
i18n
(
"RtAudio"
),
"rtaudio"
);
if
(
!
KdenliveSettings
::
audiobackend
().
isEmpty
())
{
...
...
@@ -555,7 +555,7 @@ void KdenliveSettingsDialog::initDevices()
m_configSdl
.
kcfg_audio_backend
->
setCurrentIndex
(
ix
);
KdenliveSettings
::
setAudio_backend
(
ix
);
}
m_configSdl
.
group_sdl
->
setEnabled
(
KdenliveSettings
::
audiobackend
()
==
QLatin1String
(
"sdl_audio"
));
m_configSdl
.
group_sdl
->
setEnabled
(
KdenliveSettings
::
audiobackend
()
.
startsWith
(
QLatin1String
(
"sdl"
)
));
loadCurrentV4lProfileInfo
();
}
...
...
@@ -926,7 +926,7 @@ void KdenliveSettingsDialog::slotCheckAlsaDriver()
void
KdenliveSettingsDialog
::
slotCheckAudioBackend
()
{
QString
value
=
m_configSdl
.
kcfg_audio_backend
->
itemData
(
m_configSdl
.
kcfg_audio_backend
->
currentIndex
()).
toString
();
m_configSdl
.
group_sdl
->
setEnabled
(
value
==
QLatin1String
(
"sdl_audio"
));
m_configSdl
.
group_sdl
->
setEnabled
(
value
.
startsWith
(
QLatin1String
(
"sdl_audio"
)
));
}
void
KdenliveSettingsDialog
::
loadTranscodeProfiles
()
...
...
src/dialogs/wizard.cpp
View file @
92b88c61
...
...
@@ -391,7 +391,18 @@ void Wizard::checkMltComponents()
}
delete
consumers
;
if
(
!
consumersItemList
.
contains
(
QStringLiteral
(
"sdl"
))
&&
!
consumersItemList
.
contains
(
QStringLiteral
(
"rtaudio"
)))
{
if
(
consumersItemList
.
contains
(
QStringLiteral
(
"sdl2"
)))
{
// MLT >= 6.6.0 and SDL2 module
KdenliveSettings
::
setSdlAudioBackend
(
QStringLiteral
(
"sdl2_audio"
));
KdenliveSettings
::
setAudiobackend
(
QStringLiteral
(
"sdl2_audio"
));
}
else
if
(
consumersItemList
.
contains
(
QStringLiteral
(
"sdl"
)))
{
// MLT < 6.6.0
KdenliveSettings
::
setSdlAudioBackend
(
QStringLiteral
(
"sdl_audio"
));
KdenliveSettings
::
setAudiobackend
(
QStringLiteral
(
"sdl_audio"
));
}
else
if
(
consumersItemList
.
contains
(
QStringLiteral
(
"rtaudio"
)))
{
KdenliveSettings
::
setSdlAudioBackend
(
QStringLiteral
(
"sdl2_audio"
));
KdenliveSettings
::
setAudiobackend
(
QStringLiteral
(
"rtaudio"
));
}
else
{
// SDL module
m_errors
.
append
(
i18n
(
"<li>Missing MLT module: <b>sdl</b> or <b>rtaudio</b><br/>required for audio output</li>"
));
m_systemCheckIsOk
=
false
;
...
...
src/kdenlivesettings.kcfg
View file @
92b88c61
...
...
@@ -281,6 +281,11 @@
<default>
false
</default>
</entry>
<entry
name=
"sdlAudioBackend"
type=
"String"
>
<label>
Detected audio backend.
</label>
<default></default>
</entry>
<entry
name=
"audio_backend"
type=
"Int"
>
<label>
Audio backend index used for sound output.
</label>
<default>
0
</default>
...
...
@@ -288,7 +293,7 @@
<entry
name=
"audiobackend"
type=
"String"
>
<label>
Audio backend used for sound output.
</label>
<default>
sdl_audio
</default>
<default></default>
</entry>
<entry
name=
"audio_driver"
type=
"UInt"
>
...
...
src/mainwindow.cpp
View file @
92b88c61
...
...
@@ -1638,7 +1638,7 @@ bool MainWindow::readOptions()
}
bool
firstRun
=
false
;
KConfigGroup
initialGroup
(
config
,
"version"
);
if
(
!
initialGroup
.
exists
())
{
if
(
!
initialGroup
.
exists
()
||
KdenliveSettings
::
sdlAudioBackend
().
isEmpty
()
)
{
// First run, check if user is on a KDE Desktop
firstRun
=
true
;
// this is our first run, show Wizard
...
...
src/monitor/glwidget.cpp
View file @
92b88c61
...
...
@@ -893,7 +893,7 @@ int GLWidget::reconfigureMulti(const QString ¶ms, const QString &path, Mlt::
m_consumer
->
set
(
"0.real_time"
,
0
);
m_consumer
->
set
(
"0.volume"
,
(
double
)
volume
/
100
);
if
(
serviceName
==
QLatin1String
(
"sdl_audio"
))
{
if
(
serviceName
.
startsWith
(
QLatin1String
(
"sdl"
)
))
{
#ifdef Q_OS_WIN
m_consumer
->
set
(
"0.audio_buffer"
,
2048
);
#else
...
...
@@ -963,18 +963,42 @@ int GLWidget::reconfigure(Mlt::Profile *profile)
//QString audioBackend = m_glslManager == nullptr ? KdenliveSettings::audiobackend() : QStringLiteral("rtaudio");
QString
audioBackend
=
KdenliveSettings
::
audiobackend
();
if
(
serviceName
.
isEmpty
()
||
serviceName
!=
audioBackend
)
{
m_consumer
=
new
Mlt
::
FilteredConsumer
(
*
m_monitorProfile
,
audioBackend
.
to
Utf8
().
constData
());
m_consumer
=
new
Mlt
::
FilteredConsumer
(
*
m_monitorProfile
,
audioBackend
.
to
Latin1
().
constData
());
if
(
m_consumer
->
is_valid
())
{
serviceName
=
audioBackend
;
setProperty
(
"mlt_service"
,
serviceName
);
}
else
{
// Fallback
serviceName
=
QStringLiteral
(
"sdl_audio"
);
// Warning, audio backend unavailable on system
delete
m_consumer
;
m_consumer
=
nullptr
;
QStringList
backends
=
{
"sdl2_audio"
,
"sdl_audio"
,
"rtaudio"
};
for
(
const
QString
&
bk
:
backends
)
{
if
(
bk
==
audioBackend
)
{
// Already tested
continue
;
}
m_consumer
=
new
Mlt
::
FilteredConsumer
(
*
m_monitorProfile
,
bk
.
toLatin1
().
constData
());
if
(
m_consumer
->
is_valid
())
{
if
(
audioBackend
==
KdenliveSettings
::
sdlAudioBackend
())
{
// switch sdl audio backend
KdenliveSettings
::
setSdlAudioBackend
(
bk
);
}
qDebug
()
<<
"++++++++
\n
Switching audio backend to: "
<<
bk
<<
"
\n
++++++++++"
;
KdenliveSettings
::
setAudiobackend
(
bk
);
serviceName
=
bk
;
setProperty
(
"mlt_service"
,
serviceName
);
break
;
}
else
{
delete
m_consumer
;
m_consumer
=
nullptr
;
}
}
if
(
!
m_consumer
)
{
qWarning
()
<<
"WARNING, NO AUDIO BACKEND FOUND"
;
return
-
1
;
}
}
delete
m_consumer
;
m_consumer
=
nullptr
;
setProperty
(
"mlt_service"
,
serviceName
);
}
m_consumer
=
new
Mlt
::
FilteredConsumer
(
*
m_monitorProfile
,
serviceName
.
toLatin1
().
constData
());
delete
m_threadStartEvent
;
m_threadStartEvent
=
nullptr
;
delete
m_threadStopEvent
;
...
...
@@ -1019,7 +1043,7 @@ int GLWidget::reconfigure(Mlt::Profile *profile)
}
int
volume
=
KdenliveSettings
::
volume
();
if
(
serviceName
==
QLatin1String
(
"sdl_audio"
))
{
if
(
serviceName
.
startsWith
(
QLatin1String
(
"sdl"
)
))
{
QString
audioDevice
=
KdenliveSettings
::
audiodevicename
();
if
(
!
audioDevice
.
isEmpty
())
{
m_consumer
->
set
(
"audio_device"
,
audioDevice
.
toUtf8
().
constData
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment