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
696e11da
Commit
696e11da
authored
Apr 03, 2009
by
Austin Yuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vainfo: print more information about supported profile:entrypoints
Signed-off-by:
Austin Yuan
<
shengquan.yuan@intel.com
>
parent
d8618bcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
8 deletions
+60
-8
test/vainfo.c
test/vainfo.c
+60
-8
No files found.
test/vainfo.c
View file @
696e11da
...
@@ -29,6 +29,44 @@
...
@@ -29,6 +29,44 @@
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include <stdlib.h>
#define CHECK_VASTATUS(va_status,func, ret) \
if (va_status != VA_STATUS_SUCCESS) { \
fprintf(stderr,"%s failed with error code %d (%s),exit\n",func, vaErrorStr(va_status)); \
exit(ret); \
}
static
char
*
profile_string
(
VAProfile
profile
)
{
switch
(
profile
)
{
case
VAProfileMPEG2Simple
:
return
"VAProfileMPEG2Simple"
;
case
VAProfileMPEG2Main
:
return
"VAProfileMPEG2Main"
;
case
VAProfileMPEG4Simple
:
return
"VAProfileMPEG4Simple"
;
case
VAProfileMPEG4AdvancedSimple
:
return
"VAProfileMPEG4AdvancedSimple"
;
case
VAProfileMPEG4Main
:
return
"VAProfileMPEG4Main"
;
case
VAProfileH264Baseline
:
return
"VAProfileH264Baseline"
;
case
VAProfileH264Main
:
return
"VAProfileH264Main"
;
case
VAProfileH264High
:
return
"VAProfileH264High"
;
case
VAProfileVC1Simple
:
return
"VAProfileVC1Simple"
;
case
VAProfileVC1Main
:
return
"VAProfileVC1Main"
;
case
VAProfileVC1Advanced
:
return
"VAProfileVC1Advanced"
;
case
VAProfileH263Baseline
:
return
"VAProfileH263Baseline"
;
}
}
static
char
*
entrypoint_string
(
VAEntrypoint
entrypoint
)
{
switch
(
entrypoint
)
{
case
VAEntrypointVLD
:
return
"VAEntrypointVLD"
;
case
VAEntrypointIZZ
:
return
"VAEntrypointIZZ"
;
case
VAEntrypointIDCT
:
return
"VAEntrypointIDCT"
;
case
VAEntrypointMoComp
:
return
"VAEntrypointMoComp"
;
case
VAEntrypointDeblocking
:
return
"VAEntrypointDeblocking"
;
case
VAEntrypointEncSlice
:
return
"VAEntrypointEncSlice"
;
}
}
int
main
(
int
argc
,
const
char
*
argv
[])
int
main
(
int
argc
,
const
char
*
argv
[])
{
{
Display
*
dpy
;
Display
*
dpy
;
...
@@ -37,8 +75,11 @@ int main(int argc, const char* argv[])
...
@@ -37,8 +75,11 @@ int main(int argc, const char* argv[])
int
major_version
,
minor_version
;
int
major_version
,
minor_version
;
const
char
*
driver
;
const
char
*
driver
;
const
char
*
display
=
getenv
(
"DISPLAY"
);
const
char
*
display
=
getenv
(
"DISPLAY"
);
const
char
*
name
=
rindex
(
argv
[
0
],
'/'
);
const
char
*
name
=
rindex
(
argv
[
0
],
'/'
);
VAProfile
profile
;
VAEntrypoint
entrypoint
,
entrypoints
[
10
];
int
num_entrypoint
;
if
(
name
)
if
(
name
)
name
++
;
name
++
;
else
else
...
@@ -59,16 +100,27 @@ int main(int argc, const char* argv[])
...
@@ -59,16 +100,27 @@ int main(int argc, const char* argv[])
}
}
va_status
=
vaInitialize
(
va_dpy
,
&
major_version
,
&
minor_version
);
va_status
=
vaInitialize
(
va_dpy
,
&
major_version
,
&
minor_version
);
if
(
VA_STATUS_SUCCESS
!=
va_status
)
CHECK_VASTATUS
(
va_status
,
"vaInitialize"
,
3
);
{
fprintf
(
stderr
,
"%s: vaInitialize failed with error code %d (%s)
\n
"
,
name
,
va_status
,
vaErrorStr
(
va_status
));
return
3
;
}
printf
(
"%s: VA API version: %d.%d
\n
"
,
name
,
major_version
,
minor_version
);
printf
(
"%s: VA API version: %d.%d
\n
"
,
name
,
major_version
,
minor_version
);
driver
=
vaQueryVendorString
(
va_dpy
);
driver
=
vaQueryVendorString
(
va_dpy
);
printf
(
"%s: Driver version: %s
\n
"
,
name
,
driver
?
driver
:
"<unknown>"
);
printf
(
"%s: Driver version: %s
\n
"
,
name
,
driver
?
driver
:
"<unknown>"
);
printf
(
"%s: Supported profile and entrypoints
\n
"
,
name
);
for
(
profile
=
VAProfileMPEG2Simple
;
profile
<=
VAProfileH263Baseline
;
profile
++
)
{
char
*
profile_str
;
va_status
=
vaQueryConfigEntrypoints
(
va_dpy
,
profile
,
entrypoints
,
&
num_entrypoint
);
CHECK_VASTATUS
(
va_status
,
"vaQueryConfigEntrypoints"
,
4
);
profile_str
=
profile_string
(
profile
);
for
(
entrypoint
=
0
;
entrypoint
<
num_entrypoint
;
entrypoint
++
)
printf
(
" %32s:%s
\n
"
,
profile_str
,
entrypoint_string
(
entrypoints
[
entrypoint
]));
}
vaTerminate
(
va_dpy
);
vaTerminate
(
va_dpy
);
return
0
;
return
0
;
}
}
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