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
93dbb1f0
Commit
93dbb1f0
authored
Mar 28, 2021
by
Julius Künzel
Browse files
Start playback from beginning if on timeline ende at action start
BUG: 353051
Related to
#973
parent
a996c2c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/monitor/glwidget.cpp
View file @
93dbb1f0
...
...
@@ -1606,7 +1606,7 @@ void GLWidget::refreshSceneLayout()
rootObject
()
->
setProperty
(
"scaley"
,
double
(
m_rect
.
height
()
*
m_zoom
)
/
s
.
height
());
}
void
GLWidget
::
switchPlay
(
bool
play
,
double
speed
)
void
GLWidget
::
switchPlay
(
bool
play
,
int
offset
,
double
speed
)
{
if
(
!
m_producer
||
!
m_consumer
)
{
return
;
...
...
@@ -1615,9 +1615,10 @@ void GLWidget::switchPlay(bool play, double speed)
resetZoneMode
();
}
if
(
play
)
{
if
(
m_id
==
Kdenlive
::
ClipMonitor
&&
m_consumer
->
position
()
==
m_producer
->
get_out
()
&&
speed
>
0
)
{
if
(
(
m_id
==
Kdenlive
::
ClipMonitor
||
m_id
==
Kdenlive
::
ProjectMonitor
)
&&
m_consumer
->
position
()
==
m_producer
->
get_out
()
-
offset
&&
speed
>
0
)
{
m_producer
->
seek
(
0
);
}
qDebug
()
<<
"pos: "
<<
m_consumer
->
position
()
<<
"out-offset: "
<<
m_producer
->
get_out
()
-
offset
;
double
current_speed
=
m_producer
->
get_speed
();
m_producer
->
set_speed
(
speed
);
m_proxy
->
setSpeed
(
speed
);
...
...
src/monitor/glwidget.h
View file @
93dbb1f0
...
...
@@ -158,7 +158,7 @@ public slots:
void
slotZoom
(
bool
zoomIn
);
void
initializeGL
();
void
releaseAnalyse
();
void
switchPlay
(
bool
play
,
double
speed
=
1.0
);
void
switchPlay
(
bool
play
,
int
offset
=
0
,
double
speed
=
1.0
);
void
reloadProfile
();
/** @brief Update MLT's consumer scaling
* @returns true is scaling was changed
...
...
src/monitor/monitor.cpp
View file @
93dbb1f0
...
...
@@ -1308,7 +1308,7 @@ void Monitor::slotRewind(double speed)
}
}
updatePlayAction
(
true
);
m_glMonitor
->
switchPlay
(
true
,
speed
);
m_glMonitor
->
switchPlay
(
true
,
m_offset
,
speed
);
}
void
Monitor
::
slotForward
(
double
speed
,
bool
allowNormalPlay
)
...
...
@@ -1322,7 +1322,7 @@ void Monitor::slotForward(double speed, bool allowNormalPlay)
if
(
allowNormalPlay
)
{
m_glMonitor
->
purgeCache
();
updatePlayAction
(
true
);
m_glMonitor
->
switchPlay
(
true
,
1
);
m_glMonitor
->
switchPlay
(
true
,
m_offset
);
return
;
}
else
{
m_speedIndex
=
0
;
...
...
@@ -1336,7 +1336,7 @@ void Monitor::slotForward(double speed, bool allowNormalPlay)
speed
=
MonitorManager
::
speedArray
[
m_speedIndex
];
}
updatePlayAction
(
true
);
m_glMonitor
->
switchPlay
(
true
,
speed
);
m_glMonitor
->
switchPlay
(
true
,
m_offset
,
speed
);
}
void
Monitor
::
slotRewindOneFrame
(
int
diff
)
...
...
@@ -1454,7 +1454,7 @@ void Monitor::switchPlay(bool play)
if
(
!
KdenliveSettings
::
autoscroll
())
{
emit
pCore
->
autoScrollChanged
();
}
m_glMonitor
->
switchPlay
(
play
);
m_glMonitor
->
switchPlay
(
play
,
m_offset
);
}
void
Monitor
::
updatePlayAction
(
bool
play
)
...
...
@@ -1473,7 +1473,7 @@ void Monitor::slotSwitchPlay()
if
(
!
KdenliveSettings
::
autoscroll
())
{
emit
pCore
->
autoScrollChanged
();
}
m_glMonitor
->
switchPlay
(
m_playAction
->
isActive
());
m_glMonitor
->
switchPlay
(
m_playAction
->
isActive
()
,
m_offset
);
bool
showDropped
=
false
;
if
(
m_id
==
Kdenlive
::
ClipMonitor
)
{
showDropped
=
KdenliveSettings
::
displayClipMonitorInfo
()
&
0x20
;
...
...
@@ -1551,7 +1551,7 @@ void Monitor::updateClipProducer(const QString &playlist)
// TODO
// Mlt::Producer *prod = new Mlt::Producer(*m_glMonitor->profile(), playlist.toUtf8().constData());
// m_glMonitor->setProducer(prod, isActive(), render->seekFramePosition());
m_glMonitor
->
switchPlay
(
true
);
m_glMonitor
->
switchPlay
(
true
,
m_offset
);
}
void
Monitor
::
slotOpenClip
(
const
std
::
shared_ptr
<
ProjectClip
>
&
controller
,
int
in
,
int
out
)
...
...
Julius Künzel
@jlskuz
mentioned in issue
#1009 (closed)
·
Mar 28, 2021
mentioned in issue
#1009 (closed)
mentioned in issue #1009
Toggle commit list
Julius Künzel
@jlskuz
mentioned in commit
20d67257
·
Mar 29, 2021
mentioned in commit
20d67257
mentioned in commit 20d6725789aea63107ff9c7f9ff244a07a26a97f
Toggle commit list
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