Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
f5eab5ae
Commit
f5eab5ae
authored
Sep 27, 2004
by
gbazin
Browse files
* modules/video_filter/logo.c: implemented --logo-position for old filter as well.
parent
560287d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/video_filter/logo.c
View file @
f5eab5ae
...
...
@@ -226,7 +226,7 @@ struct vout_sys_t
picture_t
*
p_pic
;
int
i_width
,
i_height
;
int
posx
,
posy
;
int
pos
,
posx
,
posy
;
};
/*****************************************************************************
...
...
@@ -253,12 +253,15 @@ static int Create( vlc_object_t *p_this )
p_vout
->
pf_display
=
NULL
;
p_vout
->
pf_control
=
Control
;
var_Create
(
p_this
,
"logo-position"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_this
,
"logo-position"
,
&
val
);
p_sys
->
pos
=
val
.
i_int
;
var_Create
(
p_this
,
"logo-x"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_this
,
"logo-x"
,
&
val
);
p_sys
->
posx
=
val
.
i_int
>=
0
?
val
.
i_int
:
0
;
p_sys
->
posx
=
val
.
i_int
;
var_Create
(
p_this
,
"logo-y"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_this
,
"logo-y"
,
&
val
);
p_sys
->
posy
=
val
.
i_int
>=
0
?
val
.
i_int
:
0
;
p_sys
->
posy
=
val
.
i_int
;
p_sys
->
p_pic
=
LoadPNG
(
p_this
);
if
(
!
p_sys
->
p_pic
)
...
...
@@ -324,6 +327,29 @@ static int Init( vout_thread_t *p_vout )
return
VLC_EGENERIC
;
}
if
(
p_sys
->
posx
<
0
||
p_sys
->
posy
<
0
)
{
p_sys
->
posx
=
0
;
p_sys
->
posy
=
0
;
if
(
p_sys
->
pos
&
SUBPICTURE_ALIGN_BOTTOM
)
{
p_sys
->
posy
=
p_vout
->
render
.
i_height
-
p_sys
->
i_height
;
}
else
if
(
!
(
p_sys
->
pos
&
SUBPICTURE_ALIGN_TOP
)
)
{
p_sys
->
posy
=
p_vout
->
render
.
i_height
/
2
-
p_sys
->
i_height
/
2
;
}
if
(
p_sys
->
pos
&
SUBPICTURE_ALIGN_RIGHT
)
{
p_sys
->
posx
=
p_vout
->
render
.
i_width
-
p_sys
->
i_width
;
}
else
if
(
!
(
p_sys
->
pos
&
SUBPICTURE_ALIGN_LEFT
)
)
{
p_sys
->
posx
=
p_vout
->
render
.
i_width
/
2
-
p_sys
->
i_width
/
2
;
}
}
/* Try to open the real video output */
msg_Dbg
(
p_vout
,
"spawning the real video output"
);
...
...
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