Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
VideoLAN
VLMC
Commits
3b6e5ac8
Commit
3b6e5ac8
authored
Jan 08, 2010
by
Vincent Carrubba
Browse files
Applying HACKING rules on LightVideoFrame
parent
13dac61c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/EffectsEngine/PluginsAPI/LightVideoFrame.cpp
View file @
3b6e5ac8
...
...
@@ -34,16 +34,16 @@ VideoFrame::~VideoFrame()
{
if
(
frame
.
octets
!=
NULL
)
delete
[]
frame
.
octets
;
}
;
}
VideoFrame
::
VideoFrame
()
VideoFrame
::
VideoFrame
(
void
)
{
frame
.
octets
=
NULL
;
nboctets
=
0
;
nbpixels
=
0
;
}
VideoFrame
::
VideoFrame
(
VideoFrame
const
&
tocopy
)
:
QSharedData
(
tocopy
)
VideoFrame
::
VideoFrame
(
const
VideoFrame
&
tocopy
)
:
QSharedData
(
tocopy
)
{
if
(
tocopy
.
frame
.
octets
!=
NULL
)
{
...
...
@@ -70,27 +70,28 @@ VideoFrame::VideoFrame(VideoFrame const & tocopy) : QSharedData( tocopy )
LightVideoFrame
::
LightVideoFrame
()
{
m_videoFrame
=
new
VideoFrame
;
}
;
}
LightVideoFrame
::
LightVideoFrame
(
LightVideoFrame
const
&
tocopy
)
:
m_videoFrame
(
tocopy
.
m_videoFrame
)
LightVideoFrame
::
LightVideoFrame
(
const
LightVideoFrame
&
tocopy
)
:
m_videoFrame
(
tocopy
.
m_videoFrame
)
{
}
;
}
LightVideoFrame
&
LightVideoFrame
::
operator
=
(
LightVideoFrame
const
&
tocopy
)
LightVideoFrame
&
LightVideoFrame
::
operator
=
(
const
LightVideoFrame
&
tocopy
)
{
m_videoFrame
=
tocopy
.
m_videoFrame
;
return
(
*
this
)
;
}
;
return
*
this
;
}
LightVideoFrame
::
LightVideoFrame
(
quint32
nboctets
)
LightVideoFrame
::
LightVideoFrame
(
quint32
nboctets
)
{
m_videoFrame
=
new
VideoFrame
;
m_videoFrame
->
nboctets
=
nboctets
;
m_videoFrame
->
nbpixels
=
nboctets
/
Pixel
::
NbComposantes
;
m_videoFrame
->
frame
.
octets
=
new
quint8
[
nboctets
];
}
;
}
LightVideoFrame
::
LightVideoFrame
(
quint8
const
*
tocopy
,
quint32
nboctets
)
LightVideoFrame
::
LightVideoFrame
(
const
quint8
*
tocopy
,
quint32
nboctets
)
{
m_videoFrame
=
new
VideoFrame
;
m_videoFrame
->
nboctets
=
nboctets
;
...
...
@@ -98,28 +99,32 @@ LightVideoFrame::LightVideoFrame(quint8 const * tocopy, quint32 nboctets)
m_videoFrame
->
frame
.
octets
=
new
quint8
[
nboctets
];
memcpy
(
m_videoFrame
->
frame
.
octets
,
tocopy
,
m_videoFrame
->
nboctets
);
}
;
}
LightVideoFrame
::~
LightVideoFrame
()
{
}
;
}
VideoFrame
const
*
LightVideoFrame
::
operator
->
(
void
)
const
const
VideoFrame
*
LightVideoFrame
::
operator
->
(
void
)
const
{
return
(
m_videoFrame
.
data
()
)
;
}
;
return
m_videoFrame
.
data
();
}
VideoFrame
const
&
LightVideoFrame
::
operator
*
(
void
)
const
const
VideoFrame
&
LightVideoFrame
::
operator
*
(
void
)
const
{
return
(
*
m_videoFrame
)
;
}
;
return
*
m_videoFrame
;
}
VideoFrame
*
LightVideoFrame
::
operator
->
(
void
)
VideoFrame
*
LightVideoFrame
::
operator
->
(
void
)
{
return
(
m_videoFrame
.
data
()
)
;
}
;
return
m_videoFrame
.
data
();
}
VideoFrame
&
LightVideoFrame
::
operator
*
(
void
)
VideoFrame
&
LightVideoFrame
::
operator
*
(
void
)
{
return
(
*
m_videoFrame
)
;
}
;
return
*
m_videoFrame
;
}
src/EffectsEngine/PluginsAPI/LightVideoFrame.h
View file @
3b6e5ac8
...
...
@@ -26,11 +26,6 @@
#define LIGHTVIDEOFRAME_H_
#include
<QSharedDataPointer>
/* #include <QSharedData> */
/* #include <QDebug> */
/* #include <qmutex.h> */
/* #include <QWriteLocker> */
/* #include <QReadLocker> */
struct
Pixel
{
...
...
@@ -52,8 +47,8 @@ union RawVideoFrame
struct
VideoFrame
:
public
QSharedData
{
~
VideoFrame
();
VideoFrame
();
VideoFrame
(
VideoFrame
const
&
tocopy
);
VideoFrame
(
void
);
VideoFrame
(
const
VideoFrame
&
tocopy
);
RawVideoFrame
frame
;
quint32
nbpixels
;
...
...
@@ -65,16 +60,16 @@ class LightVideoFrame
public:
LightVideoFrame
();
LightVideoFrame
(
LightVideoFrame
const
&
tocopy
);
LightVideoFrame
(
quint32
nboctets
);
LightVideoFrame
(
quint8
const
*
tocopy
,
quint32
nboctets
);
LightVideoFrame
(
const
LightVideoFrame
&
tocopy
);
LightVideoFrame
(
quint32
nboctets
);
LightVideoFrame
(
const
quint8
*
tocopy
,
quint32
nboctets
);
~
LightVideoFrame
();
LightVideoFrame
&
operator
=
(
LightVideoFrame
const
&
tocopy
);
VideoFrame
const
*
operator
->
(
void
)
const
;
VideoFrame
const
&
operator
*
(
void
)
const
;
VideoFrame
*
operator
->
(
void
);
VideoFrame
&
operator
*
(
void
);
LightVideoFrame
&
operator
=
(
const
LightVideoFrame
&
tocopy
);
const
VideoFrame
*
operator
->
(
void
)
const
;
const
VideoFrame
&
operator
*
(
void
)
const
;
VideoFrame
*
operator
->
(
void
);
VideoFrame
&
operator
*
(
void
);
private:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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