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
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
05fda675
Commit
05fda675
authored
Nov 30, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix possible freeze changing monitor real time
CCBUG: 429228
parent
57a9f96f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
37 deletions
+14
-37
src/mainwindow.cpp
src/mainwindow.cpp
+5
-4
src/monitor/glwidget.cpp
src/monitor/glwidget.cpp
+4
-15
src/monitor/glwidget.h
src/monitor/glwidget.h
+2
-3
src/monitor/monitor.cpp
src/monitor/monitor.cpp
+2
-13
src/monitor/monitor.h
src/monitor/monitor.h
+1
-2
No files found.
src/mainwindow.cpp
View file @
05fda675
...
...
@@ -3619,15 +3619,16 @@ void MainWindow::slotSwitchMonitorOverlay(QAction *action)
void
MainWindow
::
slotSwitchDropFrames
(
bool
drop
)
{
m_clipMonitor
->
switchDropFrames
(
drop
);
m_projectMonitor
->
switchDropFrames
(
drop
);
KdenliveSettings
::
setMonitor_dropframes
(
drop
);
m_clipMonitor
->
restart
();
m_projectMonitor
->
restart
();
}
void
MainWindow
::
slotSetMonitorGamma
(
int
gamma
)
{
KdenliveSettings
::
setMonitor_gamma
(
gamma
);
m_clipMonitor
->
updateMonitorGamma
();
m_projectMonitor
->
updateMonitorGamma
();
m_clipMonitor
->
restart
();
m_projectMonitor
->
restart
();
}
void
MainWindow
::
slotInsertZoneToTree
()
...
...
src/monitor/glwidget.cpp
View file @
05fda675
...
...
@@ -1333,11 +1333,6 @@ std::shared_ptr<Mlt::Consumer> GLWidget::consumer()
return
m_consumer
;
}
void
GLWidget
::
updateGamma
()
{
reconfigure
();
}
void
GLWidget
::
resetConsumer
(
bool
fullReset
)
{
if
(
fullReset
&&
m_consumer
)
{
...
...
@@ -1770,20 +1765,14 @@ double GLWidget::playSpeed() const
return
0.0
;
}
void
GLWidget
::
setDropFrames
(
bool
drop
)
void
GLWidget
::
restart
(
)
{
// why this lock?
QMutexLocker
locker
(
&
m_mltMutex
);
if
(
m_consumer
)
{
int
dropFrames
=
1
;
if
(
!
drop
)
{
dropFrames
=
-
dropFrames
;
}
// Make sure to delete and rebuild consumer to match profile
m_consumer
->
purge
();
m_consumer
->
stop
();
m_consumer
->
set
(
"real_time"
,
dropFrames
);
if
(
m_consumer
->
start
()
==
-
1
)
{
qCWarning
(
KDENLIVE_LOG
)
<<
"ERROR, Cannot start monitor"
;
}
reconfigure
();
}
}
...
...
src/monitor/glwidget.h
View file @
05fda675
...
...
@@ -107,7 +107,6 @@ public:
QRect
displayRect
()
const
;
/** @brief set to true if we want to emit a QImage of the frame for analysis */
bool
sendFrameForAnalysis
;
void
updateGamma
();
/** @brief delete and rebuild consumer, for example when external display is switched */
void
resetConsumer
(
bool
fullReset
);
void
lockMonitor
();
...
...
@@ -128,8 +127,8 @@ public:
int
rulerHeight
()
const
;
/** @brief return current play producer's playing speed */
double
playSpeed
()
const
;
/** @brief
Turn drop frame feature on/off
*/
void
setDropFrames
(
bool
drop
);
/** @brief
Purge and restart consumer
*/
void
restart
(
);
/** @brief Returns current audio volume */
int
volume
()
const
;
/** @brief Set audio volume on consumer */
...
...
src/monitor/monitor.cpp
View file @
05fda675
...
...
@@ -1707,9 +1707,9 @@ void Monitor::updateClipZone(const QPoint zone)
m_controller
->
setZone
(
zone
);
}
void
Monitor
::
switchDropFrames
(
bool
drop
)
void
Monitor
::
restart
(
)
{
m_glMonitor
->
setDropFrames
(
drop
);
m_glMonitor
->
restart
(
);
}
void
Monitor
::
switchMonitorInfo
(
int
code
)
...
...
@@ -1731,17 +1731,6 @@ void Monitor::switchMonitorInfo(int code)
}
}
void
Monitor
::
updateMonitorGamma
()
{
if
(
isActive
())
{
stop
();
m_glMonitor
->
updateGamma
();
start
();
}
else
{
m_glMonitor
->
updateGamma
();
}
}
void
Monitor
::
slotEditMarker
()
{
if
(
m_editMarker
)
{
...
...
src/monitor/monitor.h
View file @
05fda675
...
...
@@ -125,8 +125,7 @@ public:
void
sendFrameForAnalysis
(
bool
analyse
);
void
updateAudioForAnalysis
();
void
switchMonitorInfo
(
int
code
);
void
switchDropFrames
(
bool
drop
);
void
updateMonitorGamma
();
void
restart
();
void
mute
(
bool
,
bool
updateIconOnly
=
false
)
override
;
/** @brief Returns the action displaying record toolbar */
QAction
*
recAction
();
...
...
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