Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
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
libva
Commits
943686a9
Commit
943686a9
authored
Jun 04, 2010
by
Austin Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow up the change of "LIBVA_DRIVER_NAME", remove it from va_android.cpp
Signed-off-by:
Austin Yuan
<
shengquan.yuan@gmail.com
>
parent
cb2ba3ed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
110 deletions
+92
-110
va/android/va_android.cpp
va/android/va_android.cpp
+90
-108
va/glx/va_glx.c
va/glx/va_glx.c
+0
-2
va/va.h
va/va.h
+2
-0
No files found.
va/android/va_android.cpp
View file @
943686a9
...
...
@@ -47,12 +47,6 @@
static
VADisplayContextP
pDisplayContexts
=
NULL
;
static
int
vaDisplayIsValid
(
VADisplay
dpy
)
{
VADisplayContextP
pDisplayContext
=
(
VADisplayContextP
)
dpy
;
return
pDisplayContext
&&
(
pDisplayContext
->
vadpy_magic
==
VA_DISPLAY_MAGIC
)
&&
pDisplayContext
->
vaIsValid
(
pDisplayContext
);
}
static
int
open_device
(
char
*
dev_name
)
{
struct
stat
st
;
...
...
@@ -85,7 +79,7 @@ static int open_device (char *dev_name)
static
int
va_DisplayContextIsValid
(
VADisplayContextP
pDisplayContext
)
)
{
VADisplayContextP
ctx
=
pDisplayContexts
;
...
...
@@ -149,16 +143,10 @@ static VAStatus va_DisplayContextGetDriverName (
return
VA_STATUS_ERROR_UNKNOWN
;
}
if
((
driver_name_env
=
getenv
(
"LIBVA_DRIVER_NAME"
))
!=
NULL
&&
geteuid
()
==
getuid
())
{
/* don't allow setuid apps to use LIBVA_DRIVER_NAME */
*
driver_name
=
strdup
(
driver_name_env
);
return
VA_STATUS_SUCCESS
;
}
else
{
/* TBD: other vendor driver names */
/* TBD: other vendor driver names */
vendor_id
=
devices
[
0
].
vendor_id
;
device_id
=
devices
[
0
].
device_id
;
*
driver_name
=
strdup
(
devices
[
0
].
driver_name
);
}
dri_state
->
driConnectedFlag
=
VA_DUMMY
;
...
...
@@ -174,6 +162,7 @@ static VAStatus va_DisplayContextGetDriverName (
struct
dri_state
*
dri_state
=
(
struct
dri_state
*
)
ctx
->
dri_state
;
char
*
driver_name_env
;
int
vendor_id
,
device_id
;
int
i
=
0
;
struct
{
int
vendor_id
;
...
...
@@ -193,13 +182,7 @@ static VAStatus va_DisplayContextGetDriverName (
return
VA_STATUS_ERROR_UNKNOWN
;
}
if
((
driver_name_env
=
getenv
(
"LIBVA_DRIVER_NAME"
))
!=
NULL
&&
geteuid
()
==
getuid
())
{
/* don't allow setuid apps to use LIBVA_DRIVER_NAME */
*
driver_name
=
strdup
(
driver_name_env
);
return
VA_STATUS_SUCCESS
;
}
else
{
/* TBD: other vendor driver names */
int
i
=
0
;
/* TBD: other vendor driver names */
while
(
devices
[
i
].
device_id
!=
0
)
{
if
((
devices
[
i
].
vendor_id
==
vendor_id
)
&&
...
...
@@ -216,7 +199,6 @@ static VAStatus va_DisplayContextGetDriverName (
return
VA_STATUS_ERROR_UNKNOWN
;
}
}
printf
(
"DRM device is opened, loading driver %s for device 0x%04x:0x%04x
\n
"
,
driver_name
,
vendor_id
,
device_id
);
...
...
va/glx/va_glx.c
View file @
943686a9
...
...
@@ -47,8 +47,6 @@
status = vtable->va##func##GLX args; \
} while (0)
// Check VADisplay is valid (from libva.so.*)
int
vaDisplayIsValid
(
VADisplay
dpy
);
// Destroy VA/GLX display context
static
void
va_DisplayContextDestroy
(
VADisplayContextP
pDisplayContext
)
...
...
va/va.h
View file @
943686a9
...
...
@@ -159,6 +159,8 @@ const char *vaErrorStr(VAStatus error_status);
*/
typedef
void
*
NativeDisplay
;
/* window system dependent */
int
vaDisplayIsValid
(
VADisplay
dpy
);
/*
* Initialize the library
*/
...
...
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