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
9b89f4ee
Commit
9b89f4ee
authored
May 28, 2021
by
Jean-Baptiste Mardelle
Browse files
No need to load bin thumbnails twice
parent
8a7bca29
Pipeline
#63351
passed with stage
in 9 minutes and 49 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
9b89f4ee
...
...
@@ -486,9 +486,8 @@ QPixmap ProjectClip::thumbnail(int width, int height)
return
m_thumbnail
.
pixmap
(
width
,
height
);
}
bool
ProjectClip
::
setProducer
(
std
::
shared_ptr
<
Mlt
::
Producer
>
producer
,
bool
replaceProducer
)
bool
ProjectClip
::
setProducer
(
std
::
shared_ptr
<
Mlt
::
Producer
>
producer
)
{
Q_UNUSED
(
replaceProducer
)
qDebug
()
<<
"################### ProjectClip::setproducer"
;
QMutexLocker
locker
(
&
m_producerMutex
);
FileStatus
::
ClipStatus
currentStatus
=
m_clipStatus
;
...
...
@@ -532,7 +531,6 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl
getFileHash
();
// set parent again (some info need to be stored in producer)
updateParent
(
parentItem
().
lock
());
ClipLoadTask
::
start
({
ObjectType
::
BinClip
,
m_binId
.
toInt
()},
QDomElement
(),
true
,
-
1
,
-
1
,
this
);
AudioLevelsTask
::
start
({
ObjectType
::
BinClip
,
m_binId
.
toInt
()},
this
,
false
);
pCore
->
bin
()
->
reloadMonitorIfActive
(
clipId
());
for
(
auto
&
p
:
m_audioProducers
)
{
...
...
src/bin/projectclip.h
View file @
9b89f4ee
...
...
@@ -297,7 +297,7 @@ public slots:
* @param replaceProducer If true, we replace existing producer with this one
* @returns true if producer was changed
* . */
bool
setProducer
(
std
::
shared_ptr
<
Mlt
::
Producer
>
producer
,
bool
replaceProducer
);
bool
setProducer
(
std
::
shared_ptr
<
Mlt
::
Producer
>
producer
);
void
importJsonMarkers
(
const
QString
&
json
);
...
...
src/jobs/cliploadtask.cpp
View file @
9b89f4ee
...
...
@@ -671,8 +671,7 @@ void ClipLoadTask::run()
if
(
!
m_isCanceled
)
{
auto
binClip
=
pCore
->
projectItemModel
()
->
getClipByBinID
(
QString
::
number
(
m_owner
.
second
));
if
(
binClip
)
{
QMetaObject
::
invokeMethod
(
binClip
.
get
(),
"setProducer"
,
Qt
::
QueuedConnection
,
Q_ARG
(
std
::
shared_ptr
<
Mlt
::
Producer
>
,
producer
),
Q_ARG
(
bool
,
true
));
QMetaObject
::
invokeMethod
(
binClip
.
get
(),
"setProducer"
,
Qt
::
QueuedConnection
,
Q_ARG
(
std
::
shared_ptr
<
Mlt
::
Producer
>
,
producer
));
if
(
m_xml
.
hasAttribute
(
QStringLiteral
(
"_checkProfile"
))
&&
producer
->
get_int
(
"video_index"
)
>
-
1
)
{
checkProfile
(
producer
);
}
...
...
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