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
3b1e01ab
Commit
3b1e01ab
authored
Dec 20, 2020
by
Jean-Baptiste Mardelle
Browse files
Reduce latency on forwards/backwards play
parent
b0ab640b
Pipeline
#44786
passed with stage
in 9 minutes and 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/monitor/glwidget.cpp
View file @
3b1e01ab
...
...
@@ -1606,14 +1606,21 @@ void GLWidget::switchPlay(bool play, double speed)
if
(
m_id
==
Kdenlive
::
ClipMonitor
&&
m_consumer
->
position
()
==
m_producer
->
get_out
()
&&
speed
>
0
)
{
m_producer
->
seek
(
0
);
}
double
current_speed
=
m_producer
->
get_speed
();
m_producer
->
set_speed
(
speed
);
if
(
speed
<=
1.
||
speed
>
6.
)
{
m_consumer
->
set
(
"scrub_audio"
,
0
);
}
else
{
m_consumer
->
set
(
"scrub_audio"
,
1
);
}
m_consumer
->
start
();
m_consumer
->
set
(
"refresh"
,
1
);
if
(
qFuzzyIsNull
(
current_speed
))
{
m_consumer
->
start
();
m_consumer
->
set
(
"refresh"
,
1
);
}
else
{
// Speed change, purge to reduce latency
m_consumer
->
purge
();
m_producer
->
seek
(
m_consumer
->
position
()
+
(
speed
>
1.
?
1
:
0
));
}
}
else
{
emit
paused
();
m_producer
->
set_speed
(
0
);
...
...
src/monitor/monitormanager.cpp
View file @
3b1e01ab
...
...
@@ -31,7 +31,7 @@
#include
"kdenlive_debug.h"
#include
<QObject>
const
double
MonitorManager
::
speedArray
[
5
]
=
{
1.
1
,
1.5
,
3.
,
5.5
,
10.
};
const
double
MonitorManager
::
speedArray
[
5
]
=
{
1.
5
,
2.
,
3.
,
5.5
,
10.
};
MonitorManager
::
MonitorManager
(
QObject
*
parent
)
:
QObject
(
parent
)
...
...
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