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
d0b09d6f
Commit
d0b09d6f
authored
Dec 29, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Linux FB: use vlc_strerror_c()
parent
d9964088
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
modules/video_output/fb.c
modules/video_output/fb.c
+10
-9
No files found.
modules/video_output/fb.c
View file @
d0b09d6f
...
...
@@ -33,7 +33,7 @@
#include <signal.h>
/* SIGUSR1, SIGUSR2 */
#include <fcntl.h>
/* open() */
#include <unistd.h>
/* close() */
#include <errno.h>
#include <termios.h>
/* struct termios */
#include <sys/ioctl.h>
#include <sys/mman.h>
/* mmap() */
...
...
@@ -450,7 +450,7 @@ static int TtyInit(vout_display_t *vd)
sigemptyset(&sig_tty.sa_mask);
if (sigaction(SIGUSR1, &sig_tty, &sys->sig_usr1) ||
sigaction(SIGUSR2, &sig_tty, &sys->sig_usr2)) {
msg_Err(vd, "cannot set signal handler (%
m)"
);
msg_Err(vd, "cannot set signal handler (%
s)", vlc_strerror_c(errno)
);
/* FIXME SIGUSR1 could have succeed */
goto error_signal;
}
...
...
@@ -458,7 +458,7 @@ static int TtyInit(vout_display_t *vd)
/* Set-up tty according to new signal handler */
if
(
-
1
==
ioctl
(
sys
->
tty
,
VT_GETMODE
,
&
sys
->
vt_mode
))
{
msg_Err
(
vd
,
"cannot get terminal mode (%
m)"
);
msg_Err
(
vd
,
"cannot get terminal mode (%
s)"
,
vlc_strerror_c
(
errno
)
);
goto
error
;
}
struct
vt_mode
vt_mode
=
sys
->
vt_mode
;
...
...
@@ -468,7 +468,7 @@ static int TtyInit(vout_display_t *vd)
vt_mode
.
acqsig
=
SIGUSR2
;
if
(
-
1
==
ioctl
(
sys
->
tty
,
VT_SETMODE
,
&
vt_mode
))
{
msg_Err
(
vd
,
"cannot set terminal mode (%
m)"
);
msg_Err
(
vd
,
"cannot set terminal mode (%
s)"
,
vlc_strerror_c
(
errno
)
);
goto
error
;
}
return
VLC_SUCCESS
;
...
...
@@ -519,7 +519,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
sys
->
fd
=
vlc_open
(
psz_device
,
O_RDWR
);
if
(
sys
->
fd
==
-
1
)
{
msg_Err
(
vd
,
"cannot open %s (%
m)"
,
psz_device
);
msg_Err
(
vd
,
"cannot open %s (%
s)"
,
psz_device
,
vlc_strerror_c
(
errno
)
);
free
(
psz_device
);
return
VLC_EGENERIC
;
}
...
...
@@ -527,7 +527,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
/* Get framebuffer device information */
if
(
ioctl
(
sys
->
fd
,
FBIOGET_VSCREENINFO
,
&
sys
->
var_info
))
{
msg_Err
(
vd
,
"cannot get fb info (%
m)"
);
msg_Err
(
vd
,
"cannot get fb info (%
s)"
,
vlc_strerror_c
(
errno
)
);
close
(
sys
->
fd
);
return
VLC_EGENERIC
;
}
...
...
@@ -546,7 +546,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
sys
->
var_info
.
yoffset
=
0
;
if
(
ioctl
(
sys
->
fd
,
FBIOPUT_VSCREENINFO
,
&
sys
->
var_info
))
{
msg_Err
(
vd
,
"cannot set fb info (%
m)"
);
msg_Err
(
vd
,
"cannot set fb info (%
s)"
,
vlc_strerror_c
(
errno
)
);
close
(
sys
->
fd
);
return
VLC_EGENERIC
;
}
...
...
@@ -555,7 +555,8 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
/* Get some information again, in the definitive configuration */
if
(
ioctl
(
sys
->
fd
,
FBIOGET_FSCREENINFO
,
&
fix_info
)
||
ioctl
(
sys
->
fd
,
FBIOGET_VSCREENINFO
,
&
sys
->
var_info
))
{
msg_Err
(
vd
,
"cannot get additional fb info (%m)"
);
msg_Err
(
vd
,
"cannot get additional fb info (%s)"
,
vlc_strerror_c
(
errno
));
/* Restore fb config */
ioctl
(
sys
->
fd
,
FBIOPUT_VSCREENINFO
,
&
sys
->
old_info
);
...
...
@@ -642,7 +643,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
sys
->
fd
,
0
);
if
(
sys
->
video_ptr
==
MAP_FAILED
)
{
msg_Err
(
vd
,
"cannot map video memory (%
m)"
);
msg_Err
(
vd
,
"cannot map video memory (%
s)"
,
vlc_strerror_c
(
errno
)
);
if
(
sys
->
var_info
.
bits_per_pixel
==
8
)
{
free
(
sys
->
palette
);
...
...
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