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
e79dc47e
Commit
e79dc47e
authored
Aug 14, 2008
by
Rafaël Carré
Committed by
Jean-Paul Saman
Nov 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
davinci decoder: Open Framebuffer by name (dm_vid0_fb)
Signed-off-by:
Jean-Paul Saman
<
jean-paul.saman@m2x.nl
>
parent
f152c5b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
1 deletion
+30
-1
modules/codec/davinci/viddec.c
modules/codec/davinci/viddec.c
+30
-1
No files found.
modules/codec/davinci/viddec.c
View file @
e79dc47e
...
...
@@ -79,6 +79,35 @@ struct decoder_sys_t
};
static
int
OpenFB
(
const
char
*
psz_name
)
{
int
i_fd
=
-
1
;
int
i_tries
=
0
;
/* begin with /dev/fb0 */
char
*
psz_device
;
struct
fb_fix_screeninfo
info
;
do
{
if
(
asprintf
(
&
psz_device
,
"/dev/fb%d"
,
i_tries
++
)
==
-
1
)
return
-
1
;
i_fd
=
open
(
psz_device
,
O_RDWR
);
free
(
psz_device
);
if
(
i_fd
==
-
1
)
return
-
1
;
/* check errno */
if
(
ioctl
(
i_fd
,
FBIOGET_FSCREENINFO
,
&
info
)
==
-
1
)
{
close
(
i_fd
);
continue
;
}
if
(
!
strcmp
(
info
.
id
,
psz_name
)
)
return
i_fd
;
close
(
i_fd
);
}
while
(
1
);
}
/*****************************************************************************
* OpenDecoder: probe the decoder and return score
*****************************************************************************/
...
...
@@ -192,7 +221,7 @@ int OpenVideoDecoder( vlc_object_t *p_this )
#ifdef DAVINCI_HACK
/* Open framebuffer */
if
(
(
p_sys
->
i_fd_fb
=
open
(
"/dev/fb1"
,
O_RDWR
)
)
==
-
1
)
if
(
(
p_sys
->
i_fd_fb
=
OpenFB
(
"dm_vid0_fb"
)
)
==
-
1
)
{
msg_Err
(
p_dec
,
"Failed to open framebuffer (%m)"
);
goto
error
;
...
...
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