Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
afababf2
Commit
afababf2
authored
Nov 15, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fb: fix working
parent
c1b694d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
modules/video_output/fb.c
modules/video_output/fb.c
+12
-8
No files found.
modules/video_output/fb.c
View file @
afababf2
...
...
@@ -105,7 +105,7 @@ static void GfxMode ( int i_tty );
#define HW_ACCEL_TEXT N_("Framebuffer uses hw acceleration.")
#define HW_ACCEL_LONGTEXT N_( \
"If your framebuffer
supports hardware acceleration or does
double buffering " \
"If your framebuffer
does not support hardware acceleration or
double buffering " \
"in hardware then you must disable this option. It then does double buffering " \
"in software." )
...
...
@@ -115,7 +115,7 @@ vlc_module_begin ()
set_subcategory
(
SUBCAT_VIDEO_VOUT
)
add_file
(
FB_DEV_VAR
,
"/dev/fb0"
,
NULL
,
DEVICE_TEXT
,
DEVICE_LONGTEXT
,
false
)
add_string
(
"fb-name"
,
"
dm_vid0_fb
"
,
NULL
,
NAME_TEXT
,
NAME_LONGTEXT
,
add_string
(
"fb-name"
,
""
,
NULL
,
NAME_TEXT
,
NAME_LONGTEXT
,
false
);
add_bool
(
"fb-tty"
,
1
,
NULL
,
TTY_TEXT
,
TTY_LONGTEXT
,
true
)
...
...
@@ -769,13 +769,15 @@ static int OpenFbByName( const char *psz_name )
{
int
i_fd
=
-
1
;
int
i
;
/* begins with /dev/fb0 */
char
*
psz_device
;
struct
fb_fix_screeninfo
info
;
for
(
i
=
0
;
i
<
FB_MAX
;
i
++
)
{
if
(
asprintf
(
&
psz_device
,
"/dev/fb%d"
,
i
++
)
==
-
1
)
char
*
psz_device
;
if
(
asprintf
(
&
psz_device
,
"/dev/fb%d"
,
i
)
==
-
1
)
return
-
1
;
i_fd
=
open
(
psz_device
,
O_RDWR
);
free
(
psz_device
);
...
...
@@ -788,7 +790,7 @@ static int OpenFbByName( const char *psz_name )
continue
;
}
if
(
!
strcmp
(
info
.
id
,
psz_name
)
)
if
(
strcmp
(
info
.
id
,
psz_name
)
==
0
)
return
i_fd
;
close
(
i_fd
);
...
...
@@ -806,16 +808,18 @@ static int OpenDisplay( vout_thread_t *p_vout )
struct
fb_fix_screeninfo
fix_info
;
/* framebuffer fix information */
/* Open framebuffer device */
if
(
(
psz_device
=
config_GetPsz
(
p_vout
,
"fb-name"
))
)
psz_device
=
var_CreateGetString
(
p_vout
,
"fb-name"
);
if
(
psz_device
)
{
if
(
(
p_sys
->
i_fd
=
OpenFbByName
(
psz_device
))
==
-
1
)
p_sys
->
i_fd
=
OpenFbByName
(
psz_device
);
if
(
p_sys
->
i_fd
==
-
1
)
{
msg_Err
(
p_vout
,
"cannot open fb by name %s (%m)"
,
psz_device
);
free
(
psz_device
);
return
VLC_EGENERIC
;
}
}
else
if
(
(
psz_device
=
config_GetPsz
(
p_vout
,
FB_DEV_VAR
))
)
else
if
(
(
psz_device
=
var_CreateGetString
(
p_vout
,
FB_DEV_VAR
))
)
{
p_sys
->
i_fd
=
open
(
psz_device
,
O_RDWR
);
if
(
p_sys
->
i_fd
==
-
1
)
...
...
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