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
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
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
Multimedia
Kdenlive
Commits
7207f91a
Commit
7207f91a
authored
Oct 29, 2018
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some bin clip properties not saved after change
parent
5cdfe091
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
src/bin/projectclip.cpp
src/bin/projectclip.cpp
+2
-2
src/jobs/loadjob.cpp
src/jobs/loadjob.cpp
+8
-2
src/mltcontroller/clipcontroller.cpp
src/mltcontroller/clipcontroller.cpp
+6
-3
No files found.
src/bin/projectclip.cpp
View file @
7207f91a
...
...
@@ -816,8 +816,8 @@ void ProjectClip::setProperties(const QMap<QString, QString> &properties, bool r
refreshPanel
=
true
;
}
// Some properties also need to be passed to track producers
QStringList
timelineProperties
{
QStringLiteral
(
"force_aspect_ratio"
),
QStringLiteral
(
"video_index"
),
QStringLiteral
(
"audio_index"
),
QStringLiteral
(
"set.force_full_luma"
),
QStringLiteral
(
"full_luma"
),
QStringLiteral
(
"threads"
),
QStringLiteral
(
"force_colorspace"
),
QStringLiteral
(
"force_tff"
),
QStringLiteral
(
"force_progressive"
),
QStringLiteral
(
"
force_fps"
),
QStringLiteral
(
"
video_index"
),
QStringLiteral
(
"audio_index"
)};
QStringList
forceReloadProperties
{
QStringLiteral
(
"
set.test_image"
),
QStringLiteral
(
"set.test_audio"
),
QStringLiteral
(
"autorotate"
),
QStringLiteral
(
"templatetext"
),
QStringLiteral
(
"resource
"
)};
QStringList
timelineProperties
{
QStringLiteral
(
"force_aspect_ratio"
),
QStringLiteral
(
"video_index"
),
QStringLiteral
(
"audio_index"
),
QStringLiteral
(
"set.force_full_luma"
),
QStringLiteral
(
"full_luma"
),
QStringLiteral
(
"threads"
),
QStringLiteral
(
"force_colorspace"
),
QStringLiteral
(
"force_tff"
),
QStringLiteral
(
"force_progressive"
),
QStringLiteral
(
"video_index"
),
QStringLiteral
(
"audio_index"
)};
QStringList
forceReloadProperties
{
QStringLiteral
(
"
autorotate"
),
QStringLiteral
(
"templatetext"
),
QStringLiteral
(
"resource"
),
QStringLiteral
(
"force_fps"
),
QStringLiteral
(
"set.test_image"
),
QStringLiteral
(
"set.test_audio
"
)};
QStringList
keys
{
QStringLiteral
(
"luma_duration"
),
QStringLiteral
(
"luma_file"
),
QStringLiteral
(
"fade"
),
QStringLiteral
(
"ttl"
),
QStringLiteral
(
"softness"
),
QStringLiteral
(
"crop"
),
QStringLiteral
(
"animation"
)};
QVector
<
int
>
updateRoles
;
while
(
i
.
hasNext
())
{
...
...
src/jobs/loadjob.cpp
View file @
7207f91a
...
...
@@ -246,8 +246,9 @@ bool LoadJob::startJob()
}
m_resource
=
Xml
::
getXmlProperty
(
m_xml
,
QStringLiteral
(
"resource"
));
ClipType
::
ProducerType
type
=
static_cast
<
ClipType
::
ProducerType
>
(
m_xml
.
attribute
(
QStringLiteral
(
"type"
)).
toInt
());
QString
service
=
Xml
::
getXmlProperty
(
m_xml
,
QStringLiteral
(
"mlt_service"
));
if
(
type
==
ClipType
::
Unknown
)
{
type
=
getTypeForService
(
Xml
::
getXmlProperty
(
m_xml
,
QStringLiteral
(
"mlt_service"
))
,
m_resource
);
type
=
getTypeForService
(
service
,
m_resource
);
}
switch
(
type
)
{
case
ClipType
::
Color
:
...
...
@@ -265,7 +266,12 @@ bool LoadJob::startJob()
break
;
case
ClipType
::
SlideShow
:
default:
m_producer
=
std
::
make_shared
<
Mlt
::
Producer
>
(
pCore
->
getCurrentProfile
()
->
profile
(),
nullptr
,
m_resource
.
toUtf8
().
constData
());
if
(
!
service
.
isEmpty
())
{
service
.
append
(
QChar
(
':'
));
m_producer
=
loadResource
(
m_resource
,
service
);
}
else
{
m_producer
=
std
::
make_shared
<
Mlt
::
Producer
>
(
pCore
->
getCurrentProfile
()
->
profile
(),
nullptr
,
m_resource
.
toUtf8
().
constData
());
}
break
;
}
if
(
!
m_producer
||
m_producer
->
is_blank
()
||
!
m_producer
->
is_valid
())
{
...
...
src/mltcontroller/clipcontroller.cpp
View file @
7207f91a
...
...
@@ -305,18 +305,20 @@ void ClipController::updateProducer(const std::shared_ptr<Mlt::Producer> &produc
}
else
{
m_usesProxy
=
false
;
}
passProperties
.
pass_list
(
*
m_properties
,
getPassPropertiesList
(
m_usesProxy
));
// This is necessary as some properties like set.test_audio are reset on producer creation
const
char
*
passList
=
getPassPropertiesList
(
m_usesProxy
);
passProperties
.
pass_list
(
*
m_properties
,
passList
);
delete
m_properties
;
*
m_masterProducer
=
producer
.
get
();
checkAudioVideo
();
m_properties
=
new
Mlt
::
Properties
(
m_masterProducer
->
get_properties
());
// Pass properties from previous producer
m_properties
->
pass_list
(
passProperties
,
getPassPropertiesList
(
m_usesProxy
));
m_producerLock
.
unlock
();
m_properties
->
pass_list
(
passProperties
,
passList
);
if
(
!
m_masterProducer
->
is_valid
())
{
qCDebug
(
KDENLIVE_LOG
)
<<
"// WARNING, USING INVALID PRODUCER"
;
}
else
{
m_effectStack
->
resetService
(
m_masterProducer
);
emitProducerChanged
(
m_controllerBinId
,
producer
);
// URL and name shoule not be updated otherwise when proxying a clip we cannot find back the original url
/*m_url = QUrl::fromLocalFile(m_masterProducer->get("resource"));
if (m_url.isValid()) {
...
...
@@ -324,6 +326,7 @@ void ClipController::updateProducer(const std::shared_ptr<Mlt::Producer> &produc
}
*/
}
m_producerLock
.
unlock
();
qDebug
()
<<
"// replace finished: "
<<
binId
()
<<
" : "
<<
m_masterProducer
->
get
(
"resource"
);
}
...
...
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