Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
3e29e1b5
Commit
3e29e1b5
authored
Jul 23, 2009
by
Hugo Beauzee-Luyssen
Browse files
Resolved race condition when pausing render preview
parent
37a0076e
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/LibVLCpp/VLCMediaPlayer.cpp
View file @
3e29e1b5
...
...
@@ -174,7 +174,7 @@ void MediaPlayer::takeSnapshot( const char* outputFil
CheckVlcppException
(
m_ex
);
}
bool
MediaPlayer
::
isPlaying
()
bool
MediaPlayer
::
isPlaying
()
{
int
res
=
libvlc_media_player_is_playing
(
m_internalPtr
,
m_ex
);
CheckVlcppException
(
m_ex
);
...
...
src/Workflow/ClipWorkflow.cpp
View file @
3e29e1b5
...
...
@@ -93,7 +93,7 @@ void ClipWorkflow::lock( ClipWorkflow* cw, void** pp_ret )
// else
// {
*
pp_ret
=
cw
->
m_buffer
;
//
qDebug() << "Clip workflow locking <<<<<<<<<<<<<<<<<<<<<<<<<<";
qDebug
()
<<
"Clip workflow locking <<<<<<<<<<<<<<<<<<<<<<<<<<"
;
// }
}
...
...
@@ -114,8 +114,10 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
{
QMutexLocker
lock
(
cw
->
m_condMutex
);
qDebug
()
<<
"Setting state to Sleeping"
;
cw
->
m_state
=
Sleeping
;
cw
->
m_stateLock
->
unlock
();
//Signal that render has been completed.
cw
->
m_renderWaitCond
->
wake
();
qDebug
()
<<
"Entering condwait"
;
...
...
src/Workflow/TrackWorkflow.cpp
View file @
3e29e1b5
...
...
@@ -342,8 +342,9 @@ void TrackWorkflow::pauseClipWorkflow( ClipWorkflow* cw )
cw
->
getState
()
==
ClipWorkflow
::
EndReached
)
{
qDebug
()
<<
"Pausing a sleeping, ready or EndReached ClipWorkflow, state ="
<<
cw
->
getState
();
cw
->
getStateLock
()
->
unlock
();
cw
->
queryStateChange
(
ClipWorkflow
::
Pausing
);
qDebug
()
<<
"Unlocked state mutex"
;
cw
->
getStateLock
()
->
unlock
();
cw
->
wake
();
}
else
if
(
cw
->
getState
()
==
ClipWorkflow
::
Rendering
)
...
...
src/renderer/WorkflowRenderer.cpp
View file @
3e29e1b5
...
...
@@ -85,6 +85,9 @@ void* WorkflowRenderer::lock( void* datas )
{
WorkflowRenderer
*
self
=
reinterpret_cast
<
WorkflowRenderer
*>
(
datas
);
//If we're not playing, then where in a paused media player.
if
(
self
->
m_mediaPlayer
->
isPlaying
()
==
false
)
return
self
->
m_lastFrame
;
if
(
self
->
m_oneFrameOnly
<
2
)
{
qDebug
()
<<
"
\n
Querying new picture"
;
...
...
@@ -122,6 +125,7 @@ void WorkflowRenderer::checkActions()
switch
(
act
)
{
case
Pause
:
qDebug
()
<<
"Pausing WorkflowRenderer mediaPlayer"
;
m_mediaPlayer
->
pause
();
//This will also pause the MainWorkflow via a signal/slot
break
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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