Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
654e539f
Commit
654e539f
authored
Jun 13, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: Simplify get/set/toggle_fullscreen.
parent
662da2b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
38 deletions
+16
-38
src/control/video.c
src/control/video.c
+16
-38
No files found.
src/control/video.c
View file @
654e539f
...
...
@@ -60,70 +60,48 @@ void libvlc_set_fullscreen( libvlc_media_player_t *p_mi, int b_fullscreen,
libvlc_exception_t
*
p_e
)
{
/* We only work on the first vout */
vout_thread_t
*
p_vout1
=
GetVout
(
p_mi
,
p_e
);
vlc_value_t
val
;
int
i_ret
;
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
/* GetVout will raise the exception for us */
if
(
!
p_vout1
)
{
return
;
}
if
(
!
p_vout
)
return
;
if
(
b_fullscreen
)
val
.
b_bool
=
true
;
else
val
.
b_bool
=
false
;
i_ret
=
var_Set
(
p_vout1
,
"fullscreen"
,
val
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while setting fullscreen value"
);
var_SetBool
(
p_vout
,
"fullscreen"
,
b_fullscreen
);
vlc_object_release
(
p_vout
1
);
vlc_object_release
(
p_vout
);
}
int
libvlc_get_fullscreen
(
libvlc_media_player_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
/* We only work on the first vout */
vout_thread_t
*
p_vout
1
=
GetVout
(
p_mi
,
p_e
);
vlc_value_t
val
;
int
i_ret
;
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
int
i_ret
;
/* GetVout will raise the exception for us */
if
(
!
p_vout
1
)
if
(
!
p_vout
)
return
0
;
i_ret
=
var_Get
(
p_vout1
,
"fullscreen"
,
&
val
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while looking up fullscreen value"
);
i_ret
=
var_GetBool
(
p_vout
,
"fullscreen"
,
&
val
);
vlc_object_release
(
p_vout
1
);
vlc_object_release
(
p_vout
);
return
val
.
b_bool
==
true
?
1
:
0
;
return
i_ret
;
}
void
libvlc_toggle_fullscreen
(
libvlc_media_player_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
/* We only work on the first vout */
vout_thread_t
*
p_vout
1
=
GetVout
(
p_mi
,
p_e
);
vlc_value_t
val
;
int
i_
ret
;
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
bool
ret
;
/* GetVout will raise the exception for us */
if
(
!
p_vout1
)
return
;
if
(
!
p_vout
)
return
;
i_ret
=
var_Get
(
p_vout1
,
"fullscreen"
,
&
val
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while looking up fullscreen value"
);
val
.
b_bool
=
!
val
.
b_bool
;
i_ret
=
var_Set
(
p_vout1
,
"fullscreen"
,
val
);
if
(
i_ret
)
libvlc_exception_raise
(
p_e
,
"Unexpected error while setting fullscreen value"
);
ret
=
var_GetBool
(
p_vout
,
"fullscreen"
,
&
val
);
var_SetBool
(
p_vout1
,
"fullscreen"
,
!
ret
);
vlc_object_release
(
p_vout
1
);
vlc_object_release
(
p_vout
);
}
void
...
...
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