Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLMC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
luyikei
VLMC
Commits
655474c3
Commit
655474c3
authored
Jun 02, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now the end of a track is correctly handled
parent
984ca291
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
src/Workflow/ClipWorkflow.cpp
src/Workflow/ClipWorkflow.cpp
+0
-2
src/Workflow/TrackWorkflow.cpp
src/Workflow/TrackWorkflow.cpp
+20
-0
src/Workflow/TrackWorkflow.h
src/Workflow/TrackWorkflow.h
+1
-0
src/gui/RenderPreviewWidget.cpp
src/gui/RenderPreviewWidget.cpp
+0
-1
No files found.
src/Workflow/ClipWorkflow.cpp
View file @
655474c3
...
...
@@ -116,8 +116,6 @@ void ClipWorkflow::unlock( ClipWorkflow* cw )
cw
->
m_usingBackBuffer
=
!
cw
->
m_usingBackBuffer
;
}
}
else
qDebug
()
<<
cw
->
m_state
;
cw
->
m_stateLock
->
unlock
();
cw
->
checkStateChange
();
}
...
...
src/Workflow/TrackWorkflow.cpp
View file @
655474c3
...
...
@@ -112,6 +112,11 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, bool needReposi
cw
->
getStateLock
()
->
unlock
();
cw
->
startRender
();
}
else
if
(
cw
->
getState
()
==
ClipWorkflow
::
EndReached
)
{
cw
->
getStateLock
()
->
unlock
();
//The stopClipWorkflow() method will take care of that.
}
else
{
// qDebug() << "Unexpected ClipWorkflow::State when rendering:" << cw->getState();
...
...
@@ -174,6 +179,16 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
}
}
bool
TrackWorkflow
::
checkEnd
(
qint64
currentFrame
)
const
{
if
(
m_clips
.
size
()
==
0
)
return
true
;
//This is the last video by chronological order :
QMap
<
qint64
,
ClipWorkflow
*>::
const_iterator
it
=
m_clips
.
end
()
-
1
;
//If it ends before the current frame, we reached end.
return
(
it
.
value
()
->
getClip
()
->
getLength
()
+
it
.
key
()
<
currentFrame
);
}
unsigned
char
*
TrackWorkflow
::
getOutput
(
qint64
currentFrame
)
{
unsigned
char
*
ret
=
TrackWorkflow
::
blackOutput
;
...
...
@@ -182,6 +197,11 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
static
qint64
lastFrame
=
0
;
bool
needRepositioning
;
if
(
checkEnd
(
currentFrame
)
==
true
)
{
emit
trackEndReached
();
//We continue, as there can be ClipWorkflow that required to be stopped.
}
needRepositioning
=
(
abs
(
currentFrame
-
lastFrame
)
>
1
)
?
true
:
false
;
while
(
it
!=
end
)
{
...
...
src/Workflow/TrackWorkflow.h
View file @
655474c3
...
...
@@ -58,6 +58,7 @@ class TrackWorkflow : public QObject
unsigned
char
*
renderClip
(
ClipWorkflow
*
cw
,
bool
needRepositioning
,
float
pos
);
void
preloadClip
(
ClipWorkflow
*
cw
);
void
stopClipWorkflow
(
ClipWorkflow
*
cw
);
bool
checkEnd
(
qint64
currentFrame
)
const
;
private:
QMap
<
qint64
,
ClipWorkflow
*>
m_clips
;
...
...
src/gui/RenderPreviewWidget.cpp
View file @
655474c3
...
...
@@ -79,7 +79,6 @@ void RenderPreviewWidget::stopPreview()
//This might be called multiple times, but this is due to Qt message loop
m_mediaPlayer
->
stop
();
m_isRendering
=
false
;
qDebug
()
<<
"Stopped"
;
}
void
RenderPreviewWidget
::
startPreview
(
Media
*
)
...
...
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