gbeauchesne / libva Goto Github PK
View Code? Open in Web Editor NEWPersonal repository of libva
License: Other
Personal repository of libva
License: Other
This project supports video-rotation according to reading the code. We can set the rotation-degree with attributiton of VADisplayAttribRotation, such of 90-degree,180-degree or 270-degree.
So I set this attributiton in my project to control real-video image. It doesn't work. I don't know where I make a mistake. Can you give me a tip? My testing code is listed as bellow:
...
/*************************************************************/
int i, num_display_attrs, max_display_attrs;
VADisplayAttribute *display_attrs = NULL;
/*************************************************************/
pstCtx->va_dpy = vaGetDisplay((void *)(&gx11_display));
va_status = vaInitialize(pstCtx->va_dpy, &major_ver, &minor_ver);
CHECK_VASTATUS(va_status, "vaInitialize");
/*****************************************************************/
max_display_attrs = vaMaxNumDisplayAttributes(pstCtx->va_dpy);
display_attrs = malloc(max_display_attrs * sizeof(display_attrs[0]));
if (!display_attrs)
{
printf("#########################max_display_attrs malloc failed\n");
free(display_attrs);
assert(0);
}
num_display_attrs = 0; /* XXX: workaround old GMA500 bug */
va_status = vaQueryDisplayAttributes(pstCtx->va_dpy, display_attrs, &num_display_attrs);
if (!vaapi_check_status(va_status, "vaQueryDisplayAttributes()"))
{
printf("#########################vaQueryDisplayAttributes\n");
free(display_attrs);
assert(0);
}
for (i = 0; i < num_display_attrs; i++) {
VADisplayAttribute * const display_attr = &display_attrs[i];
printf(" (%s/%s) min %d max %d value 0x%x\n",
(display_attr->flags & VA_DISPLAY_ATTRIB_GETTABLE) ? "get" : "---",
(display_attr->flags & VA_DISPLAY_ATTRIB_SETTABLE) ? "set" : "---",
display_attr->min_value,
display_attr->max_value,
display_attr->value);
}
VADisplayAttribute attr;
attr.type = VADisplayAttribRotation;
attr.value = VA_ROTATION_180;
attr.flags = VA_DISPLAY_ATTRIB_SETTABLE;
va_status = vaSetDisplayAttributes(pstCtx->va_dpy, &attr, 1);
if (!vaapi_check_status(va_status, "vaSetDisplayAttributes()"))
{
printf("###########################vaSetDisplayAttributes failed\n");
assert(0);
}
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.