Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
5de1345f
Commit
5de1345f
authored
Dec 15, 2009
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_fb: only store the pitch in vout_display_sys_t
parent
8cc373ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
modules/video_output/fb.c
modules/video_output/fb.c
+9
-7
No files found.
modules/video_output/fb.c
View file @
5de1345f
...
...
@@ -129,7 +129,6 @@ struct vout_display_sys_t {
int
fd
;
/* device handle */
struct
fb_var_screeninfo
old_info
;
/* original mode information */
struct
fb_var_screeninfo
var_info
;
/* current mode information */
struct
fb_fix_screeninfo
fix_info
;
/* framebuffer fix information */
bool
has_pan
;
/* does device supports panning ? */
struct
fb_cmap
fb_cmap
;
/* original colormap */
uint16_t
*
palette
;
/* original palette */
...
...
@@ -138,6 +137,7 @@ struct vout_display_sys_t {
/* Video information */
uint32_t
width
;
uint32_t
height
;
uint32_t
line_length
;
int
bytes_per_pixel
;
/* Video memory */
...
...
@@ -308,7 +308,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
memset
(
&
rsc
,
0
,
sizeof
(
rsc
));
rsc
.
p
[
0
].
p_pixels
=
sys
->
video_ptr
;
rsc
.
p
[
0
].
i_lines
=
sys
->
var_info
.
yres
;
rsc
.
p
[
0
].
i_pitch
=
sys
->
fix_info
.
line_length
;
rsc
.
p
[
0
].
i_pitch
=
sys
->
line_length
;
sys
->
picture
=
picture_NewFromResource
(
&
vd
->
fmt
,
&
rsc
);
if
(
!
sys
->
picture
)
...
...
@@ -521,8 +521,9 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
return
VLC_EGENERIC
;
}
struct
fb_fix_screeninfo
fix_info
;
/* Get some information again, in the definitive configuration */
if
(
ioctl
(
sys
->
fd
,
FBIOGET_FSCREENINFO
,
&
sys
->
fix_info
)
||
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)"
);
...
...
@@ -544,6 +545,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
sys
->
height
=
sys
->
var_info
.
yres
;
sys
->
width
=
sys
->
var_info
.
xres_virtual
?
sys
->
var_info
.
xres_virtual
:
sys
->
var_info
.
xres
;
sys
->
line_length
=
fix_info
.
line_length
;
/* FIXME: if the image is full-size, it gets cropped on the left
* because of the xres / xres_virtual slight difference */
...
...
@@ -554,7 +556,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
sys
->
width
,
sys
->
height
);
sys
->
palette
=
NULL
;
sys
->
has_pan
=
(
sys
->
fix_info
.
ypanstep
||
sys
->
fix_info
.
ywrapstep
);
sys
->
has_pan
=
(
fix_info
.
ypanstep
||
fix_info
.
ywrapstep
);
switch
(
sys
->
var_info
.
bits_per_pixel
)
{
case
8
:
...
...
@@ -603,7 +605,7 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
return
VLC_EGENERIC
;
}
sys
->
video_size
=
sys
->
fix_info
.
line_length
*
sys
->
var_info
.
yres_virtual
;
sys
->
video_size
=
sys
->
line_length
*
sys
->
var_info
.
yres_virtual
;
/* Map a framebuffer at the beginning */
sys
->
video_ptr
=
mmap
(
NULL
,
sys
->
video_size
,
...
...
@@ -628,8 +630,8 @@ static int OpenDisplay(vout_display_t *vd, bool force_resolution)
msg_Dbg
(
vd
,
"framebuffer type=%d, visual=%d, ypanstep=%d, ywrap=%d, accel=%d"
,
sys
->
fix_info
.
type
,
sys
->
fix_info
.
visual
,
sys
->
fix_info
.
ypanstep
,
sys
->
fix_info
.
ywrapstep
,
sys
->
fix_info
.
accel
);
fix_info
.
type
,
fix_info
.
visual
,
fix_info
.
ypanstep
,
fix_info
.
ywrapstep
,
fix_info
.
accel
);
return
VLC_SUCCESS
;
}
...
...
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