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
c914ccda
Commit
c914ccda
authored
Jun 11, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VAAPI: provide more logs to understand what is happenning
parent
cfaaf916
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vaapi.c
+17
-2
No files found.
modules/codec/avcodec/vaapi.c
View file @
c914ccda
...
...
@@ -60,6 +60,8 @@ typedef struct
{
vlc_va_t
va
;
vlc_object_t
*
log
;
/* */
Display
*
p_display_x11
;
VADisplay
p_display
;
...
...
@@ -129,7 +131,6 @@ static int Open( vlc_va_vaapi_t *p_va, int i_codec_id )
}
/* */
memset
(
p_va
,
0
,
sizeof
(
*
p_va
)
);
p_va
->
i_config_id
=
VA_INVALID_ID
;
p_va
->
i_context_id
=
VA_INVALID_ID
;
p_va
->
image
.
image_id
=
VA_INVALID_ID
;
...
...
@@ -137,19 +138,28 @@ static int Open( vlc_va_vaapi_t *p_va, int i_codec_id )
/* Create a VA display */
p_va
->
p_display_x11
=
XOpenDisplay
(
NULL
);
if
(
!
p_va
->
p_display_x11
)
{
msg_Err
(
p_va
->
log
,
"Could not connect to X server"
);
goto
error
;
}
p_va
->
p_display
=
vaGetDisplay
(
p_va
->
p_display_x11
);
if
(
!
p_va
->
p_display
)
{
msg_Err
(
p_va
->
log
,
"Could not get a VAAPI device"
);
goto
error
;
}
if
(
vaInitialize
(
p_va
->
p_display
,
&
p_va
->
i_version_major
,
&
p_va
->
i_version_minor
)
)
{
msg_Err
(
p_va
->
log
,
"Failed to initialize the VAAPI device"
);
goto
error
;
}
/* Check if the selected profile is supported */
i_profiles_nb
=
vaMaxNumProfiles
(
p_va
->
p_display
);
p_profiles_list
=
calloc
(
i_profiles_nb
,
sizeof
(
VAProfile
)
);
if
(
!
p_profiles_list
)
if
(
!
p_profiles_list
)
goto
error
;
VAStatus
i_status
=
vaQueryConfigProfiles
(
p_va
->
p_display
,
p_profiles_list
,
&
i_profiles_nb
);
...
...
@@ -166,7 +176,10 @@ static int Open( vlc_va_vaapi_t *p_va, int i_codec_id )
}
free
(
p_profiles_list
);
if
(
!
b_supported_profile
)
{
msg_Dbg
(
p_va
->
log
,
"Codec and profile not supported by the hardware"
);
goto
error
;
}
/* Create a VA configuration */
VAConfigAttrib
attrib
;
...
...
@@ -506,6 +519,8 @@ vlc_va_t *vlc_va_NewVaapi( vlc_object_t *obj, int i_codec_id )
if
(
!
p_va
)
return
NULL
;
p_va
->
log
=
obj
;
if
(
Open
(
p_va
,
i_codec_id
)
)
{
free
(
p_va
);
...
...
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