Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
luyikei
VLMC
Commits
54c27179
Commit
54c27179
authored
Nov 12, 2009
by
Hugo Beauzee-Luyssen
Browse files
"""Refactored""" loop mode
parent
667ced01
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Renderer/WorkflowRenderer.cpp
View file @
54c27179
...
...
@@ -28,6 +28,8 @@
#include
"Timeline.h"
#include
"SettingsManager.h"
#define LOOP_MODE
WorkflowRenderer
::
WorkflowRenderer
()
:
m_mainWorkflow
(
MainWorkflow
::
getInstance
()
),
m_stopping
(
false
),
...
...
@@ -96,6 +98,13 @@ void* WorkflowRenderer::lock( void* datas )
if
(
self
->
m_stopping
==
false
)
{
#ifdef LOOP_MODE
if
(
self
->
m_mainWorkflow
->
getCurrentFrame
()
==
self
->
m_mainWorkflow
->
getLengthFrame
()
)
{
self
->
m_mainWorkflow
->
stop
();
self
->
m_mainWorkflow
->
startRender
();
}
#endif
MainWorkflow
::
OutputBuffers
*
ret
=
self
->
m_mainWorkflow
->
getSynchroneOutput
();
memcpy
(
self
->
m_renderVideoFrame
,
(
*
(
ret
->
video
))
->
frame
.
octets
,
(
*
(
ret
->
video
))
->
nboctets
);
self
->
m_renderAudioSample
=
ret
->
audio
;
...
...
src/Workflow/ClipWorkflow.cpp
View file @
54c27179
...
...
@@ -72,7 +72,9 @@ void ClipWorkflow::checkStateChange()
void
ClipWorkflow
::
initialize
(
bool
preloading
/*= false*/
)
{
// qDebug() << "Setting state to initializing";
setState
(
Initializing
);
// qDebug() << "State is Initializing.";
if
(
m_clip
->
getParent
()
->
getFileType
()
==
Media
::
Image
)
m_vlcMedia
=
new
LibVLCpp
::
Media
(
"fake://"
+
m_clip
->
getParent
()
->
getFileInfo
()
->
absoluteFilePath
()
);
else
...
...
@@ -100,9 +102,11 @@ void ClipWorkflow::pauseAfterPlaybackStarted()
void
ClipWorkflow
::
loadingComplete
()
{
// qDebug() << "Loading complete, setting begin.";
adjustBegin
();
disconnect
(
m_mediaPlayer
,
SIGNAL
(
playing
()
),
this
,
SLOT
(
loadingComplete
()
)
);
setState
(
Ready
);
// qDebug() << "State is Ready";
}
void
ClipWorkflow
::
initializedMediaPlayer
()
...
...
src/Workflow/MainWorkflow.cpp
View file @
54c27179
...
...
@@ -32,8 +32,6 @@
//FIXME: remove this !
#include
"ClipWorkflow.h"
#define LOOP_MODE
LightVideoFrame
*
MainWorkflow
::
blackOutput
=
NULL
;
MainWorkflow
::
MainWorkflow
(
int
trackCount
)
:
...
...
@@ -148,10 +146,6 @@ void MainWorkflow::unpause()
void
MainWorkflow
::
nextFrame
()
{
++
m_currentFrame
;
#ifdef LOOP_MODE
if
(
m_currentFrame
==
m_lengthFrame
)
m_currentFrame
=
0
;
#endif
emit
frameChanged
(
m_currentFrame
);
emit
positionChanged
(
(
float
)
m_currentFrame
/
(
float
)
m_lengthFrame
);
...
...
src/Workflow/TrackWorkflow.cpp
View file @
54c27179
...
...
@@ -210,6 +210,7 @@ void TrackWorkflow::preloadClip( ClipWorkflow* cw )
void
TrackWorkflow
::
stopClipWorkflow
(
ClipWorkflow
*
cw
)
{
// qDebug() << "Stopping clip workflow";
cw
->
getStateLock
()
->
lockForRead
();
if
(
cw
->
getState
()
==
ClipWorkflow
::
Stopped
)
...
...
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