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
874fbae5
Commit
874fbae5
authored
Jan 28, 2010
by
Vincent Carrubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding width and height in LightVideoFrame and using it in blitinrectangle
parent
eb8f2eae
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
37 additions
and
38 deletions
+37
-38
src/EffectsEngine/EffectsEngine.cpp
src/EffectsEngine/EffectsEngine.cpp
+4
-4
src/EffectsEngine/EffectsEngine.pri
src/EffectsEngine/EffectsEngine.pri
+0
-13
src/EffectsEngine/Plugins/src/BlitInRectangle/BlitInRectangleEffectPlugin.cpp
...ugins/src/BlitInRectangle/BlitInRectangleEffectPlugin.cpp
+2
-2
src/EffectsEngine/PluginsAPI/InSlot.hpp
src/EffectsEngine/PluginsAPI/InSlot.hpp
+1
-1
src/EffectsEngine/PluginsAPI/LightVideoFrame.cpp
src/EffectsEngine/PluginsAPI/LightVideoFrame.cpp
+17
-8
src/EffectsEngine/PluginsAPI/LightVideoFrame.h
src/EffectsEngine/PluginsAPI/LightVideoFrame.h
+4
-2
src/Workflow/ImageClipWorkflow.cpp
src/Workflow/ImageClipWorkflow.cpp
+3
-1
src/Workflow/MainWorkflow.cpp
src/Workflow/MainWorkflow.cpp
+2
-1
src/Workflow/VideoClipWorkflow.cpp
src/Workflow/VideoClipWorkflow.cpp
+4
-6
No files found.
src/EffectsEngine/EffectsEngine.cpp
View file @
874fbae5
...
...
@@ -116,10 +116,10 @@ EffectsEngine::makePatch( void )
// TRANSITIONS
int
i
;
//
int i;
for
(
i
=
100
;
i
<
100000
;
i
+=
100
)
addTransition
(
1
,
2
,
i
,
i
+
50
);
//
for ( i = 100; i < 100000; i += 100 )
//
addTransition( 1, 2, i, i + 50);
}
else
...
...
@@ -197,7 +197,7 @@ EffectsEngine::render( void )
QWriteLocker
wl
(
&
m_rwl
);
if
(
m_processedInBypassPatch
==
false
)
{
configureTransitions
();
//
configureTransitions();
m_patch
->
render
();
}
else
...
...
src/EffectsEngine/EffectsEngine.pri
deleted
100644 → 0
View file @
eb8f2eae
HEADERS += EffectsEngine.h \
EffectNode.h \
EffectNodeFactory.h \
EffectPluginTypeManager.h \
EffectPluginTypeLoader.h \
SemanticObjectManager.hpp \
SimpleObjectsReferencer.hpp
SOURCES += EffectNodeFactory.cpp \
EffectPluginTypeManager.cpp \
EffectPluginTypeLoader.cpp \
EffectsEngine.cpp \
EffectNode.cpp
src/EffectsEngine/Plugins/src/BlitInRectangle/BlitInRectangleEffectPlugin.cpp
View file @
874fbae5
...
...
@@ -51,8 +51,8 @@ void BlitInRectangleEffectPlugin::render( void )
(
*
m_ien
->
getStaticVideoInput
(
"src"
))
>>
lvf1
;
(
*
m_ien
->
getStaticVideoInput
(
"dst"
))
>>
lvf2
;
QImage
src
(
lvf1
->
frame
.
octets
,
640
,
480
,
QImage
::
Format_RGB888
);
QImage
dst
(
lvf2
->
frame
.
octets
,
640
,
480
,
QImage
::
Format_RGB888
);
QImage
src
(
lvf1
->
frame
.
octets
,
lvf1
->
width
,
lvf1
->
height
,
QImage
::
Format_RGB888
);
QImage
dst
(
lvf2
->
frame
.
octets
,
lvf2
->
width
,
lvf2
->
height
,
QImage
::
Format_RGB888
);
QPainter
p
(
&
dst
);
p
.
drawImage
(
100
,
100
,
src
);
...
...
src/EffectsEngine/PluginsAPI/InSlot.hpp
View file @
874fbae5
...
...
@@ -104,7 +104,7 @@ private:
};
template
<
typename
T
>
T
InSlot
<
T
>::
s_defaultValue
=
0
;
T
InSlot
<
T
>::
s_defaultValue
;
/////////////////////////
//// PUBLICS METHODS ////
...
...
src/EffectsEngine/PluginsAPI/LightVideoFrame.cpp
View file @
874fbae5
...
...
@@ -41,6 +41,9 @@ VideoFrame::VideoFrame( void )
frame
.
octets
=
NULL
;
nboctets
=
0
;
nbpixels
=
0
;
width
=
0
;
height
=
0
;
ptsDiff
=
0
;
}
VideoFrame
::
VideoFrame
(
const
VideoFrame
&
tocopy
)
:
QSharedData
(
tocopy
)
...
...
@@ -49,6 +52,8 @@ VideoFrame::VideoFrame( const VideoFrame& tocopy ) : QSharedData( tocopy )
{
nboctets
=
tocopy
.
nboctets
;
nbpixels
=
tocopy
.
nboctets
/
Pixel
::
NbComposantes
;
width
=
tocopy
.
width
;
height
=
tocopy
.
height
;
ptsDiff
=
tocopy
.
ptsDiff
;
frame
.
octets
=
new
quint8
[
tocopy
.
nboctets
];
...
...
@@ -85,21 +90,25 @@ LightVideoFrame::operator=( const LightVideoFrame& tocopy )
return
*
this
;
}
LightVideoFrame
::
LightVideoFrame
(
quint32
nboctets
)
LightVideoFrame
::
LightVideoFrame
(
quint32
width
,
quint32
height
)
{
m_videoFrame
=
new
VideoFrame
;
m_videoFrame
->
nboctets
=
nboctets
;
m_videoFrame
->
nbpixels
=
nboctets
/
Pixel
::
NbComposantes
;
m_videoFrame
->
frame
.
octets
=
new
quint8
[
nboctets
];
m_videoFrame
->
width
=
width
;
m_videoFrame
->
height
=
height
;
m_videoFrame
->
nbpixels
=
m_videoFrame
->
width
*
m_videoFrame
->
height
;
m_videoFrame
->
nboctets
=
m_videoFrame
->
nbpixels
*
Pixel
::
NbComposantes
;
m_videoFrame
->
frame
.
octets
=
new
quint8
[
m_videoFrame
->
nboctets
];
m_videoFrame
->
ptsDiff
=
0
;
}
LightVideoFrame
::
LightVideoFrame
(
const
quint8
*
tocopy
,
quint32
nboctets
)
LightVideoFrame
::
LightVideoFrame
(
const
quint8
*
tocopy
,
quint32
width
,
quint32
height
)
{
m_videoFrame
=
new
VideoFrame
;
m_videoFrame
->
nboctets
=
nboctets
;
m_videoFrame
->
nbpixels
=
nboctets
/
Pixel
::
NbComposantes
;
m_videoFrame
->
frame
.
octets
=
new
quint8
[
nboctets
];
m_videoFrame
->
width
=
width
;
m_videoFrame
->
height
=
height
;
m_videoFrame
->
nbpixels
=
m_videoFrame
->
width
*
m_videoFrame
->
height
;
m_videoFrame
->
nboctets
=
m_videoFrame
->
nbpixels
*
Pixel
::
NbComposantes
;
m_videoFrame
->
frame
.
octets
=
new
quint8
[
m_videoFrame
->
nboctets
];
m_videoFrame
->
ptsDiff
=
0
;
memcpy
(
m_videoFrame
->
frame
.
octets
,
tocopy
,
m_videoFrame
->
nboctets
);
...
...
src/EffectsEngine/PluginsAPI/LightVideoFrame.h
View file @
874fbae5
...
...
@@ -51,6 +51,8 @@ struct VideoFrame : public QSharedData
VideoFrame
(
const
VideoFrame
&
tocopy
);
RawVideoFrame
frame
;
quint32
width
;
quint32
height
;
quint32
nbpixels
;
quint32
nboctets
;
qint64
ptsDiff
;
...
...
@@ -62,8 +64,8 @@ public:
LightVideoFrame
();
LightVideoFrame
(
const
LightVideoFrame
&
tocopy
);
LightVideoFrame
(
quint32
nboctets
);
LightVideoFrame
(
const
quint8
*
tocopy
,
quint32
nboctets
);
LightVideoFrame
(
quint32
width
,
quint32
height
);
LightVideoFrame
(
const
quint8
*
tocopy
,
quint32
width
,
quint32
height
);
~
LightVideoFrame
();
LightVideoFrame
&
operator
=
(
const
LightVideoFrame
&
tocopy
);
...
...
src/Workflow/ImageClipWorkflow.cpp
View file @
874fbae5
...
...
@@ -91,7 +91,9 @@ ImageClipWorkflow::lock(ImageClipWorkflow *cw, void **pp_ret, int size )
cw
->
m_renderLock
->
lock
();
if
(
cw
->
m_buffer
==
NULL
)
{
cw
->
m_buffer
=
new
LightVideoFrame
(
size
);
// cw->m_buffer = new LightVideoFrame( size );
cw
->
m_buffer
=
new
LightVideoFrame
(
MainWorkflow
::
getInstance
()
->
getWidth
(),
MainWorkflow
::
getInstance
()
->
getHeight
()
);
cw
->
m_stackedBuffer
=
new
StackedBuffer
(
cw
->
m_buffer
);
}
*
pp_ret
=
(
*
(
cw
->
m_buffer
))
->
frame
.
octets
;
...
...
src/Workflow/MainWorkflow.cpp
View file @
874fbae5
...
...
@@ -71,7 +71,8 @@ MainWorkflow::MainWorkflow( int trackCount ) :
}
m_outputBuffers
=
new
OutputBuffers
;
blackOutput
=
new
LightVideoFrame
(
m_width
*
m_height
*
Pixel
::
NbComposantes
);
blackOutput
=
new
LightVideoFrame
(
m_width
,
m_height
);
// FIX ME vvvvvv , It doesn't update meta info (nbpixels, nboctets, etc.
memset
(
(
*
blackOutput
)
->
frame
.
octets
,
0
,
(
*
blackOutput
)
->
nboctets
);
}
...
...
src/Workflow/VideoClipWorkflow.cpp
View file @
874fbae5
...
...
@@ -33,9 +33,8 @@ VideoClipWorkflow::VideoClipWorkflow( Clip *clip ) :
{
for
(
unsigned
int
i
=
0
;
i
<
VideoClipWorkflow
::
nbBuffers
;
++
i
)
{
m_availableBuffers
.
enqueue
(
new
LightVideoFrame
(
MainWorkflow
::
getInstance
()
->
getWidth
()
*
MainWorkflow
::
getInstance
()
->
getHeight
()
*
Pixel
::
NbComposantes
)
);
m_availableBuffers
.
enqueue
(
new
LightVideoFrame
(
MainWorkflow
::
getInstance
()
->
getWidth
(),
MainWorkflow
::
getInstance
()
->
getHeight
()
)
);
}
debugType
=
2
;
}
...
...
@@ -122,9 +121,8 @@ VideoClipWorkflow::lock( VideoClipWorkflow *cw, void **pp_ret, int size )
cw
->
m_computedBuffersMutex
->
lock
();
if
(
cw
->
m_availableBuffers
.
isEmpty
()
==
true
)
{
lvf
=
new
LightVideoFrame
(
MainWorkflow
::
getInstance
()
->
getWidth
()
*
MainWorkflow
::
getInstance
()
->
getHeight
()
*
Pixel
::
NbComposantes
);
lvf
=
new
LightVideoFrame
(
MainWorkflow
::
getInstance
()
->
getWidth
(),
MainWorkflow
::
getInstance
()
->
getHeight
()
);
}
else
lvf
=
cw
->
m_availableBuffers
.
dequeue
();
...
...
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