Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
ea223bd6
Commit
ea223bd6
authored
Sep 17, 2013
by
Guillaume Roguez
Browse files
#30253: video: cleanup mixer background when resized.
parent
19a3a788
Changes
3
Hide whitespace changes
Inline
Side-by-side
daemon/src/video/video_base.cpp
View file @
ea223bd6
...
...
@@ -202,6 +202,14 @@ void VideoFrame::copy(VideoFrame &dst)
frame_
->
height
);
}
void
VideoFrame
::
clear
()
{
// FIXME: beurk!!!!
memset
(
frame_
->
data
[
0
],
0
,
frame_
->
linesize
[
0
]
*
frame_
->
height
);
memset
(
frame_
->
data
[
1
],
0
,
frame_
->
linesize
[
1
]
*
frame_
->
height
/
2
);
memset
(
frame_
->
data
[
2
],
0
,
frame_
->
linesize
[
2
]
*
frame_
->
height
/
2
);
}
void
VideoFrame
::
test
()
{
memset
(
frame_
->
data
[
0
],
0xaa
,
frame_
->
linesize
[
0
]
*
frame_
->
height
/
2
);
...
...
daemon/src/video/video_base.h
View file @
ea223bd6
...
...
@@ -203,6 +203,7 @@ public:
bool
allocBuffer
(
int
width
,
int
height
,
int
pix_fmt
);
int
blit
(
VideoFrame
&
src
,
int
xoff
,
int
yoff
);
void
copy
(
VideoFrame
&
src
);
void
clear
();
void
test
();
private:
...
...
daemon/src/video/video_mixer.cpp
View file @
ea223bd6
...
...
@@ -136,6 +136,11 @@ void VideoMixer::setDimensions(int width, int height)
width_
=
width
;
height_
=
height
;
// cleanup the previous frame to have a nice copy in rendering method
VideoFrameSP
previous_p
=
obtainLastFrame
();
if
(
previous_p
)
previous_p
->
clear
();
stop_sink
();
start_sink
();
}
...
...
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