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
21
Issues
21
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VideoLAN
VLMC
Commits
5c3a501a
Commit
5c3a501a
authored
Jul 30, 2010
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowRenderer: Initialize the effects at the right time.
Fixes a crash when starting the playback.
parent
876a7b7e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
src/EffectsEngine/EffectsEngine.cpp
src/EffectsEngine/EffectsEngine.cpp
+13
-0
src/EffectsEngine/EffectsEngine.h
src/EffectsEngine/EffectsEngine.h
+1
-0
src/Renderer/WorkflowRenderer.cpp
src/Renderer/WorkflowRenderer.cpp
+3
-1
No files found.
src/EffectsEngine/EffectsEngine.cpp
View file @
5c3a501a
...
...
@@ -179,3 +179,16 @@ EffectsEngine::saveEffects( const EffectList &effects, QXmlStreamWriter &project
}
project
.
writeEndElement
();
}
void
EffectsEngine
::
initEffects
(
const
EffectList
&
effects
,
quint32
width
,
quint32
height
)
{
EffectsEngine
::
EffectList
::
const_iterator
it
=
effects
.
begin
();
EffectsEngine
::
EffectList
::
const_iterator
ite
=
effects
.
end
();
while
(
it
!=
ite
)
{
(
*
it
)
->
effect
->
init
(
width
,
height
);
++
it
;
}
}
src/EffectsEngine/EffectsEngine.h
View file @
5c3a501a
...
...
@@ -56,6 +56,7 @@ class EffectsEngine : public QObject, public Singleton<EffectsEngine>
static
void
applyEffects
(
const
EffectList
&
effects
,
Workflow
::
Frame
*
frame
,
qint64
currentFrame
);
static
void
saveEffects
(
const
EffectList
&
effects
,
QXmlStreamWriter
&
project
);
static
void
initEffects
(
const
EffectList
&
effects
,
quint32
width
,
quint32
height
);
private:
EffectsEngine
();
...
...
src/Renderer/WorkflowRenderer.cpp
View file @
5c3a501a
...
...
@@ -117,6 +117,8 @@ WorkflowRenderer::setupRenderer( quint32 width, quint32 height, double fps )
sprintf
(
buffer
,
":imem-data=%"
PRId64
,
(
intptr_t
)
m_esHandler
);
m_media
->
addOption
(
buffer
);
m_media
->
addOption
(
":text-renderer dummy"
);
EffectsEngine
::
initEffects
(
m_effects
,
width
,
height
);
}
int
...
...
@@ -388,7 +390,7 @@ void
WorkflowRenderer
::
appendEffect
(
Effect
*
effect
,
qint64
start
,
qint64
end
)
{
EffectInstance
*
effectInstance
=
effect
->
createInstance
();
effectInstance
->
init
(
m_width
,
m_height
)
;
qDebug
()
<<
"width:"
<<
m_width
<<
m_height
;
QWriteLocker
lock
(
m_effectsLock
);
m_effects
.
push_back
(
new
EffectsEngine
::
EffectHelper
(
effectInstance
,
start
,
end
)
);
}
...
...
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