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
921cbf72
Commit
921cbf72
authored
Jun 02, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug when we started to render a clip from anywhere else than the beginning.
parent
60b0f66b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
src/Workflow/TrackWorkflow.cpp
src/Workflow/TrackWorkflow.cpp
+9
-9
src/Workflow/TrackWorkflow.h
src/Workflow/TrackWorkflow.h
+2
-1
No files found.
src/Workflow/TrackWorkflow.cpp
View file @
921cbf72
...
...
@@ -62,7 +62,8 @@ qint64 TrackWorkflow::getLength() const
return
m_length
;
}
unsigned
char
*
TrackWorkflow
::
renderClip
(
ClipWorkflow
*
cw
,
bool
needRepositioning
,
float
pos
)
unsigned
char
*
TrackWorkflow
::
renderClip
(
ClipWorkflow
*
cw
,
qint64
currentFrame
,
qint64
start
,
bool
needRepositioning
)
{
unsigned
char
*
ret
=
TrackWorkflow
::
blackOutput
;
...
...
@@ -89,6 +90,7 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, bool needReposi
cw
->
getStateLock
()
->
unlock
();
if
(
needRepositioning
==
true
)
{
float
pos
=
(
(
float
)(
currentFrame
-
start
)
/
(
float
)(
cw
->
getClip
()
->
getLength
())
);
cw
->
setPosition
(
pos
);
}
ret
=
cw
->
getOutput
();
...
...
@@ -103,6 +105,11 @@ unsigned char* TrackWorkflow::renderClip( ClipWorkflow* cw, bool needReposi
cw
->
getStateLock
()
->
unlock
();
cw
->
initialize
(
m_mediaPlayer
);
cw
->
startRender
();
if
(
start
!=
currentFrame
)
//Clip was not started as its real begining
{
float
pos
=
(
(
float
)(
currentFrame
-
start
)
/
(
float
)(
cw
->
getClip
()
->
getLength
())
);
cw
->
setPosition
(
pos
);
}
}
else
if
(
cw
->
getState
()
==
ClipWorkflow
::
Ready
||
cw
->
getState
()
==
ClipWorkflow
::
Initializing
)
...
...
@@ -211,14 +218,7 @@ unsigned char* TrackWorkflow::getOutput( qint64 currentFrame )
//Is the clip supposed to render now ?
if
(
start
<=
currentFrame
&&
currentFrame
<=
start
+
cw
->
getClip
()
->
getLength
()
)
{
if
(
needRepositioning
==
true
)
{
// qDebug() << "Repositionning to" << currentFrame << '(' << (float)( currentFrame - start ) / (float)(cw->getClip()->getLength()) << ')';
ret
=
renderClip
(
cw
,
true
,
(
(
float
)(
currentFrame
-
start
)
/
(
float
)(
cw
->
getClip
()
->
getLength
())
)
);
}
else
ret
=
renderClip
(
cw
,
false
,
0
);
ret
=
renderClip
(
cw
,
currentFrame
,
start
,
needRepositioning
);
lastFrame
=
currentFrame
;
}
//Is it about to be rendered ?
...
...
src/Workflow/TrackWorkflow.h
View file @
921cbf72
...
...
@@ -55,7 +55,8 @@ class TrackWorkflow : public QObject
private:
void
computeLength
();
unsigned
char
*
renderClip
(
ClipWorkflow
*
cw
,
bool
needRepositioning
,
float
pos
);
unsigned
char
*
renderClip
(
ClipWorkflow
*
cw
,
qint64
currentFrame
,
qint64
start
,
bool
needRepositioning
);
void
preloadClip
(
ClipWorkflow
*
cw
);
void
stopClipWorkflow
(
ClipWorkflow
*
cw
);
bool
checkEnd
(
qint64
currentFrame
)
const
;
...
...
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