Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
9d0937b9
Commit
9d0937b9
authored
Jan 09, 2010
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing the concept of required_state, as it is made useless by the refactor.
parent
5421947d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
34 deletions
+0
-34
src/Workflow/ClipWorkflow.cpp
src/Workflow/ClipWorkflow.cpp
+0
-24
src/Workflow/ClipWorkflow.h
src/Workflow/ClipWorkflow.h
+0
-10
No files found.
src/Workflow/ClipWorkflow.cpp
View file @
9d0937b9
...
...
@@ -32,12 +32,10 @@
ClipWorkflow
::
ClipWorkflow
(
Clip
::
Clip
*
clip
)
:
m_mediaPlayer
(
NULL
),
m_requiredState
(
ClipWorkflow
::
None
),
m_clip
(
clip
),
m_state
(
ClipWorkflow
::
Stopped
)
{
m_stateLock
=
new
QReadWriteLock
;
m_requiredStateLock
=
new
QMutex
;
m_initWaitCond
=
new
WaitCondition
;
m_pausingStateWaitCond
=
new
WaitCondition
;
m_renderLock
=
new
QMutex
;
...
...
@@ -51,24 +49,11 @@ ClipWorkflow::~ClipWorkflow()
delete
m_renderLock
;
delete
m_pausingStateWaitCond
;
delete
m_initWaitCond
;
delete
m_requiredStateLock
;
delete
m_stateLock
;
delete
m_availableBuffersMutex
;
delete
m_computedBuffersMutex
;
}
void
ClipWorkflow
::
checkStateChange
()
{
QMutexLocker
lock
(
m_requiredStateLock
);
QWriteLocker
lock2
(
m_stateLock
);
if
(
m_requiredState
!=
ClipWorkflow
::
None
)
{
m_state
=
m_requiredState
;
// qDebug() << '[' << (void*)this << "] Applying required state change:" << m_state;
m_requiredState
=
ClipWorkflow
::
None
;
}
}
void
ClipWorkflow
::
initialize
()
{
if
(
m_clip
->
getParent
()
->
getFileType
()
==
Media
::
Image
)
...
...
@@ -140,8 +125,6 @@ void ClipWorkflow::stop()
MemoryPool
<
LibVLCpp
::
MediaPlayer
>::
getInstance
()
->
release
(
m_mediaPlayer
);
m_mediaPlayer
=
NULL
;
setState
(
Stopped
);
QMutexLocker
lock
(
m_requiredStateLock
);
m_requiredState
=
ClipWorkflow
::
None
;
delete
m_vlcMedia
;
}
else
...
...
@@ -168,12 +151,6 @@ void ClipWorkflow::setState( State state )
m_state
=
state
;
}
void
ClipWorkflow
::
queryStateChange
(
State
newState
)
{
QMutexLocker
lock
(
m_requiredStateLock
);
m_requiredState
=
newState
;
}
QReadWriteLock
*
ClipWorkflow
::
getStateLock
()
{
return
m_stateLock
;
...
...
@@ -245,7 +222,6 @@ void ClipWorkflow::commonUnlock()
// qDebug() << "feeding cont wait mutex acquired. Type:" << debugType;
m_feedingCondWait
->
wake
();
}
checkStateChange
();
}
void
ClipWorkflow
::
computePtsDiff
(
qint64
pts
)
...
...
src/Workflow/ClipWorkflow.h
View file @
9d0937b9
...
...
@@ -178,9 +178,6 @@ class ClipWorkflow : public QObject
private:
LibVLCpp
::
MediaPlayer
*
m_mediaPlayer
;
State
m_requiredState
;
QMutex
*
m_requiredStateLock
;
WaitCondition
*
m_initWaitCond
;
WaitCondition
*
m_pausingStateWaitCond
;
...
...
@@ -207,13 +204,6 @@ class ClipWorkflow : public QObject
qint64
m_pauseDuration
;
int
debugType
;
protected:
/**
* \warning Don't ever call this method from anywhere else than the unlock() method
*/
void
checkStateChange
();
private
slots
:
void
loadingComplete
();
void
clipEndReached
();
...
...
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