Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
617c3acb
Commit
617c3acb
authored
Jan 26, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix proxied playlists rendering blank and missing sound
Fixes
#928
parent
c05f9827
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/dialogs/renderwidget.cpp
View file @
617c3acb
...
...
@@ -1299,12 +1299,14 @@ void RenderWidget::prepareRendering(bool delayedRendering, const QString &chapte
QDomNodeList
producers
=
doc
.
elementsByTagName
(
QStringLiteral
(
"producer"
));
QString
producerResource
;
QString
producerService
;
QString
originalProducerService
;
QString
suffix
;
QString
prefix
;
for
(
int
n
=
0
;
n
<
producers
.
length
();
++
n
)
{
QDomElement
e
=
producers
.
item
(
n
).
toElement
();
producerResource
=
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"resource"
));
producerService
=
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"mlt_service"
));
originalProducerService
=
Xml
::
getXmlProperty
(
e
,
QStringLiteral
(
"kdenlive:original.mlt_service"
));
if
(
producerResource
.
isEmpty
()
||
producerService
==
QLatin1String
(
"color"
))
{
continue
;
}
...
...
@@ -1327,6 +1329,10 @@ void RenderWidget::prepareRendering(bool delayedRendering, const QString &chapte
producerResource
.
prepend
(
root
);
}
if
(
proxies
.
contains
(
producerResource
))
{
if
(
!
originalProducerService
.
isEmpty
()
&&
originalProducerService
!=
producerService
)
{
// Proxy clips can sometimes use a different mlt service, for example playlists (xml) will use avformat. Fix
Xml
::
setXmlProperty
(
e
,
QStringLiteral
(
"mlt_service"
),
originalProducerService
);
}
QString
replacementResource
=
proxies
.
value
(
producerResource
);
Xml
::
setXmlProperty
(
e
,
QStringLiteral
(
"resource"
),
prefix
+
replacementResource
+
suffix
);
if
(
producerService
==
QLatin1String
(
"timewarp"
))
{
...
...
src/jobs/proxyclipjob.cpp
View file @
617c3acb
...
...
@@ -141,6 +141,10 @@ bool ProxyJob::startJob()
continue
;
}
else
{
t
.
replace
(
QLatin1Char
(
' '
),
QLatin1String
(
"="
));
if
(
t
==
QLatin1String
(
"acodec=copy"
)
&&
type
==
ClipType
::
Playlist
)
{
// drop this for playlists, otherwise we have no sound in proxies
continue
;
}
}
mltParameters
<<
t
;
}
...
...
src/mltcontroller/clipcontroller.cpp
View file @
617c3acb
...
...
@@ -663,6 +663,10 @@ void ClipController::checkAudioVideo()
if
(
orig_service
.
startsWith
(
QStringLiteral
(
"avformat"
))
||
(
m_masterProducer
->
get_int
(
"audio_index"
)
+
m_masterProducer
->
get_int
(
"video_index"
)
>
0
))
{
m_hasAudio
=
m_masterProducer
->
get_int
(
"audio_index"
)
>=
0
;
m_hasVideo
=
m_masterProducer
->
get_int
(
"video_index"
)
>=
0
;
}
else
if
(
orig_service
==
QStringLiteral
(
"xml"
))
{
// Playlist, assume we have audio and video
m_hasAudio
=
true
;
m_hasVideo
=
true
;
}
else
{
// Assume image or text producer
m_hasAudio
=
false
;
...
...
Write
Preview
Supports
Markdown
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