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
6d9c3d7b
Commit
6d9c3d7b
authored
Jul 14, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed debug
parent
2045a7d0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
23 deletions
+17
-23
src/Workflow/ClipWorkflow.cpp
src/Workflow/ClipWorkflow.cpp
+2
-2
src/Workflow/TrackWorkflow.cpp
src/Workflow/TrackWorkflow.cpp
+10
-15
src/gui/RenderPreviewWidget.cpp
src/gui/RenderPreviewWidget.cpp
+5
-6
No files found.
src/Workflow/ClipWorkflow.cpp
View file @
6d9c3d7b
...
...
@@ -87,7 +87,7 @@ void ClipWorkflow::lock( ClipWorkflow* cw, void** pp_ret )
// else
// {
*
pp_ret
=
cw
->
m_buffer
;
qDebug
()
<<
"Clip workflow locking <<<<<<<<<<<<<<<<<<<<<<<<<<"
;
//
qDebug() << "Clip workflow locking <<<<<<<<<<<<<<<<<<<<<<<<<<";
// }
}
...
...
@@ -124,7 +124,7 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
}
else
if
(
cw
->
m_state
==
Paused
)
{
qDebug
()
<<
"Forcing pause by pausing thread"
;
//
qDebug() << "Forcing pause by pausing thread";
cw
->
m_stateLock
->
unlock
();
QMutexLocker
lock
(
cw
->
m_condMutex
);
cw
->
m_waitCond
->
wait
(
cw
->
m_condMutex
);
...
...
src/Workflow/TrackWorkflow.cpp
View file @
6d9c3d7b
...
...
@@ -87,11 +87,11 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
cw
->
getStateLock
()
->
lockForRead
();
qDebug
()
<<
"Rendering clip"
;
//
qDebug() << "Rendering clip";
if
(
cw
->
getState
()
==
ClipWorkflow
::
Paused
&&
pauseAfterRender
==
false
)
{
cw
->
getStateLock
()
->
unlock
();
qDebug
()
<<
"Unpausing clip workflow"
;
//
qDebug() << "Unpausing clip workflow";
//If we must pause after render, we must NOT wake the renderer thread, or it could render more than one frame
// (since this is for the next/previous frame)
//However, if this is just for a classic unpause, with just don't give a shit :)
...
...
@@ -102,7 +102,6 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
{
//The rendering state meens... whell it means that the frame is
//beeing rendered, so we wait.
qDebug
()
<<
"State == rendering"
;
cw
->
getStateLock
()
->
unlock
();
while
(
cw
->
isRendering
()
==
true
)
{
...
...
@@ -127,7 +126,7 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentF
if
(
pauseAfterRender
==
true
)
{
cw
->
unpause
(
false
);
qDebug
()
<<
"Querying state back to pause after render"
;
//
qDebug() << "Querying state back to pause after render";
cw
->
queryStateChange
(
ClipWorkflow
::
Paused
);
}
cw
->
wake
();
...
...
@@ -260,14 +259,14 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
bool
needRepositioning
;
bool
oneFrameOnlyFlag
=
false
;
qDebug
()
<<
"Checking flag..."
;
//
qDebug() << "Checking flag...";
if
(
m_oneFrameOnly
==
1
)
{
qDebug
()
<<
"...Flag is activated"
;
//
qDebug() << "...Flag is activated";
oneFrameOnlyFlag
=
true
;
}
else
qDebug
()
<<
"...Flag is OFF"
;
//
else
//
qDebug() << "...Flag is OFF";
if
(
checkEnd
(
currentFrame
)
==
true
)
{
emit
trackEndReached
(
m_trackId
);
...
...
@@ -297,7 +296,7 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
if
(
oneFrameOnlyFlag
==
true
)
{
cw
->
pause
();
qDebug
()
<<
"Pausing back clip workflow"
;
//
qDebug() << "Pausing back clip workflow";
}
lastFrame
=
currentFrame
;
}
...
...
@@ -317,7 +316,7 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
}
if
(
oneFrameOnlyFlag
==
true
)
{
qDebug
()
<<
"Switching off m_oneFrameOnly"
;
//
qDebug() << "Switching off m_oneFrameOnly";
m_oneFrameOnly
=
0
;
}
return
ret
;
...
...
@@ -351,7 +350,7 @@ void TrackWorkflow::pauseClipWorkflow( ClipWorkflow* cw )
}
else
{
qDebug
()
<<
"Unexpected ClipWorkflow::State when pausing:"
<<
cw
->
getState
();
//
qDebug() << "Unexpected ClipWorkflow::State when pausing:" << cw->getState();
cw
->
getStateLock
()
->
unlock
();
}
bool
pausing
=
false
;
...
...
@@ -375,13 +374,11 @@ void TrackWorkflow::pause()
//FIXME: it's probably bad to iterate over every clip workflows.
while
(
it
!=
end
)
{
qDebug
()
<<
"Iterating..."
;
ClipWorkflow
*
cw
=
it
.
value
();
cw
->
getStateLock
()
->
lockForRead
();
if
(
cw
->
getState
()
!=
ClipWorkflow
::
Paused
)
{
qDebug
()
<<
"Pausing clip workflow"
;
cw
->
getStateLock
()
->
unlock
();
pauseClipWorkflow
(
cw
);
}
...
...
@@ -453,7 +450,5 @@ Clip* TrackWorkflow::removeClip( const QUuid& id )
void
TrackWorkflow
::
activateOneFrameOnly
()
{
qDebug
()
<<
"Activating flag"
;
m_oneFrameOnly
=
1
;
qDebug
()
<<
"Flag activated"
;
}
src/gui/RenderPreviewWidget.cpp
View file @
6d9c3d7b
...
...
@@ -84,7 +84,7 @@ void* RenderPreviewWidget::lock( void* datas )
if
(
self
->
m_oneFrameOnly
<
2
)
{
qDebug
()
<<
"
\n
Querying new picture"
;
//
qDebug() << "\nQuerying new picture";
void
*
ret
=
self
->
m_mainWorkflow
->
getOutput
();
self
->
m_lastFrame
=
static_cast
<
unsigned
char
*>
(
ret
);
return
ret
;
...
...
@@ -100,7 +100,7 @@ void RenderPreviewWidget::unlock( void* datas )
{
self
->
m_mediaPlayer
->
pause
();
self
->
m_oneFrameOnly
=
2
;
qDebug
()
<<
"Pausing RenderPreviewWidget"
;
//
qDebug() << "Pausing RenderPreviewWidget";
}
}
...
...
@@ -132,10 +132,10 @@ void RenderPreviewWidget::setPosition( float newPos )
void
RenderPreviewWidget
::
nextFrame
()
{
qDebug
()
<<
"Next frame :"
;
//
qDebug() << "Next frame :";
m_oneFrameOnly
=
1
;
m_mainWorkflow
->
nextFrame
();
qDebug
()
<<
"Activatign one frame only"
;
//
qDebug() << "Activatign one frame only";
m_mainWorkflow
->
activateOneFrameOnly
();
//Both media players should be stopped now... restauring playback
// m_framePlayed = 0;
...
...
@@ -159,7 +159,7 @@ void RenderPreviewWidget::togglePlayPause( bool forcePause )
{
if
(
m_paused
==
true
&&
forcePause
==
false
)
{
qDebug
()
<<
"Unpausing"
;
//
qDebug() << "Unpausing";
m_mediaPlayer
->
play
();
//This will automaticly unpause... no worries
// m_mainWorkflow->pause();
...
...
@@ -171,7 +171,6 @@ void RenderPreviewWidget::togglePlayPause( bool forcePause )
//So be careful about pausing two times :
if
(
m_paused
==
false
)
{
qDebug
()
<<
"Pausing"
;
m_mediaPlayer
->
pause
();
m_mainWorkflow
->
pause
();
m_paused
=
true
;
...
...
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