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
37cf34be
Commit
37cf34be
authored
Jul 28, 2010
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VideoClipWorkflow: Save the effects to the project file.
parent
97346006
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
3 deletions
+29
-3
src/EffectsEngine/EffectInstance.cpp
src/EffectsEngine/EffectInstance.cpp
+2
-2
src/EffectsEngine/EffectInstance.h
src/EffectsEngine/EffectInstance.h
+1
-1
src/Workflow/ClipWorkflow.h
src/Workflow/ClipWorkflow.h
+4
-0
src/Workflow/VideoClipWorkflow.cpp
src/Workflow/VideoClipWorkflow.cpp
+21
-0
src/Workflow/VideoClipWorkflow.h
src/Workflow/VideoClipWorkflow.h
+1
-0
No files found.
src/EffectsEngine/EffectInstance.cpp
View file @
37cf34be
...
...
@@ -55,8 +55,8 @@ EffectInstance::process( double time, const quint32 *input, quint32 *output ) co
m_effect
->
m_f0r_update
(
m_instance
,
time
,
input
,
output
);
}
const
Effect
*
EffectInstance
::
effect
()
const
Effect
*
EffectInstance
::
effect
()
{
return
m_effect
;
}
src/EffectsEngine/EffectInstance.h
View file @
37cf34be
...
...
@@ -33,7 +33,7 @@ class EffectInstance
public:
void
init
(
quint32
width
,
quint32
height
);
void
process
(
double
time
,
const
quint32
*
input
,
quint32
*
output
)
const
;
const
Effect
*
effect
()
const
;
Effect
*
effect
();
private:
EffectInstance
(
Effect
*
effect
);
...
...
src/Workflow/ClipWorkflow.h
View file @
37cf34be
...
...
@@ -198,6 +198,10 @@ class ClipWorkflow : public QObject
void
stopRenderer
();
void
save
(
QXmlStreamWriter
&
project
)
const
;
virtual
void
saveEffects
(
QXmlStreamWriter
&
)
const
{
//Empty implementation, as some clipworkflow does not have effects for now.
}
private:
void
setState
(
State
state
);
...
...
src/Workflow/VideoClipWorkflow.cpp
View file @
37cf34be
...
...
@@ -221,6 +221,27 @@ VideoClipWorkflow::appendEffect( Effect *effect, qint64 start, qint64 end )
return
true
;
}
void
VideoClipWorkflow
::
saveEffects
(
QXmlStreamWriter
&
project
)
const
{
QReadLocker
lock
(
m_effectsLock
);
if
(
m_effects
.
size
()
<=
0
)
return
;
EffectsEngine
::
EffectList
::
const_iterator
it
=
m_effects
.
begin
();
EffectsEngine
::
EffectList
::
const_iterator
ite
=
m_effects
.
end
();
project
.
writeStartElement
(
"effects"
);
while
(
it
!=
ite
)
{
project
.
writeStartElement
(
"effect"
);
project
.
writeAttribute
(
"name"
,
(
*
it
)
->
effect
->
effect
()
->
name
()
);
project
.
writeAttribute
(
"start"
,
QString
::
number
(
(
*
it
)
->
start
)
);
project
.
writeAttribute
(
"end"
,
QString
::
number
(
(
*
it
)
->
end
)
);
project
.
writeEndElement
();
++
it
;
}
project
.
writeEndElement
();
}
void
VideoClipWorkflow
::
setTime
(
qint64
time
)
{
...
...
src/Workflow/VideoClipWorkflow.h
View file @
37cf34be
...
...
@@ -54,6 +54,7 @@ class VideoClipWorkflow : public ClipWorkflow
virtual
void
*
getOutput
(
ClipWorkflow
::
GetMode
mode
);
virtual
bool
appendEffect
(
Effect
*
effect
,
qint64
start
=
0
,
qint64
end
=
-
1
);
virtual
void
setTime
(
qint64
time
);
virtual
void
saveEffects
(
QXmlStreamWriter
&
project
)
const
;
static
const
quint32
nbBuffers
=
3
*
30
;
//3 seconds with an average fps of 30
...
...
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