Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
844ff7d9
Commit
844ff7d9
authored
Jan 04, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout: add proper core-managed object variable for wall paper mode
parent
005ff29b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
3 deletions
+38
-3
src/playlist/engine.c
src/playlist/engine.c
+1
-0
src/video_output/video_output.c
src/video_output/video_output.c
+10
-3
src/video_output/vout_intf.c
src/video_output/vout_intf.c
+27
-0
No files found.
src/playlist/engine.c
View file @
844ff7d9
...
...
@@ -499,6 +499,7 @@ static void VariablesInit( playlist_t *p_playlist )
/* Variables to preserve video output parameters */
var_Create
(
p_playlist
,
"fullscreen"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_playlist
,
"video-on-top"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_playlist
,
"video-wallpaper"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
/* Audio output parameters */
var_Create
(
p_playlist
,
"mute"
,
VLC_VAR_BOOL
);
...
...
src/video_output/video_output.c
View file @
844ff7d9
...
...
@@ -574,7 +574,8 @@ void vout_ControlChangeSubMargin(vout_thread_t *vout, int margin)
static
void
VoutGetDisplayCfg
(
vout_thread_t
*
vout
,
vout_display_cfg_t
*
cfg
,
const
char
*
title
)
{
/* Load configuration */
cfg
->
is_fullscreen
=
var_CreateGetBool
(
vout
,
"fullscreen"
);
cfg
->
is_fullscreen
=
var_CreateGetBool
(
vout
,
"fullscreen"
)
||
var_InheritBool
(
vout
,
"video-wallpaper"
);
cfg
->
display
.
title
=
title
;
const
int
display_width
=
var_CreateGetInteger
(
vout
,
"width"
);
const
int
display_height
=
var_CreateGetInteger
(
vout
,
"height"
);
...
...
@@ -1324,9 +1325,15 @@ static int ThreadStart(vout_thread_t *vout, const vout_display_state_t *state)
vout_display_state_t
state_default
;
if
(
!
state
)
{
var_Create
(
vout
,
"video-wallpaper"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
VoutGetDisplayCfg
(
vout
,
&
state_default
.
cfg
,
vout
->
p
->
display
.
title
);
state_default
.
wm_state
=
var_CreateGetBool
(
vout
,
"video-on-top"
)
?
VOUT_WINDOW_STATE_ABOVE
:
VOUT_WINDOW_STATE_NORMAL
;
bool
below
=
var_InheritBool
(
vout
,
"video-wallpaper"
);
bool
above
=
var_CreateGetBool
(
vout
,
"video-on-top"
);
state_default
.
wm_state
=
below
?
VOUT_WINDOW_STATE_BELOW
:
above
?
VOUT_WINDOW_STATE_ABOVE
:
VOUT_WINDOW_STATE_NORMAL
;
state_default
.
sar
.
num
=
0
;
state_default
.
sar
.
den
=
0
;
...
...
src/video_output/vout_intf.c
View file @
844ff7d9
...
...
@@ -61,6 +61,8 @@ static int ZoomCallback( vlc_object_t *, char const *,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
AboveCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
WallPaperCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
FullscreenCallback
(
vlc_object_t
*
,
char
const
*
,
vlc_value_t
,
vlc_value_t
,
void
*
);
static
int
SnapshotCallback
(
vlc_object_t
*
,
char
const
*
,
...
...
@@ -275,6 +277,11 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Change
(
p_vout
,
"video-on-top"
,
VLC_VAR_SETTEXT
,
&
text
,
NULL
);
var_AddCallback
(
p_vout
,
"video-on-top"
,
AboveCallback
,
NULL
);
/* Add a variable to indicate if the window should be below all others */
var_Create
(
p_vout
,
"video-wallpaper"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_AddCallback
(
p_vout
,
"video-wallpaper"
,
WallPaperCallback
,
(
void
*
)(
uintptr_t
)
VOUT_WINDOW_STATE_BELOW
);
/* Add a variable to indicate whether we want window decoration or not */
var_Create
(
p_vout
,
"video-deco"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
...
...
@@ -327,6 +334,7 @@ void vout_IntfReinit( vout_thread_t *p_vout )
var_TriggerCallback
(
p_vout
,
"aspect-ratio"
);
var_TriggerCallback
(
p_vout
,
"video-on-top"
);
var_TriggerCallback
(
p_vout
,
"video-wallpaper"
);
var_TriggerCallback
(
p_vout
,
"video-filter"
);
var_TriggerCallback
(
p_vout
,
"sub-source"
);
...
...
@@ -631,6 +639,25 @@ static int AboveCallback( vlc_object_t *obj, char const *name,
return
VLC_SUCCESS
;
}
static
int
WallPaperCallback
(
vlc_object_t
*
obj
,
char
const
*
name
,
vlc_value_t
prev
,
vlc_value_t
cur
,
void
*
data
)
{
vout_thread_t
*
vout
=
(
vout_thread_t
*
)
obj
;
if
(
cur
.
b_bool
)
{
vout_ControlChangeWindowState
(
vout
,
VOUT_WINDOW_STATE_BELOW
);
vout_ControlChangeFullscreen
(
vout
,
true
);
}
else
{
var_TriggerCallback
(
obj
,
"fullscreen"
);
var_TriggerCallback
(
obj
,
"video-on-top"
);
}
(
void
)
name
;
(
void
)
prev
;
(
void
)
data
;
return
VLC_SUCCESS
;
}
static
int
FullscreenCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
...
...
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