About xvideo support for SDL?

Dear everybody,
when i run xvinfo, the result is as follows.

X-Video Extension version 2.2
screen #0
Adaptor #0: “Intel® Textured Overlay"
number of ports: 4
port base: 78
operations supported: PutImage
supported visuals:
depth 24, visualID 0x21
number of attributes: 4
"XV_BRIGHTNESS” (range -50 to 50)
client settable attribute

In SDL,

SDL_putenv(“SDL_VIDEODRIVER=x11”);
SDL_putenv(“SDL_VIDEO_X11_NODIRECTCOLOR=1”);
SDL_putenv(“SDL_VIDEO_YUV_HWACCEL=1”);

SDL_Surface *display = SDL_SetVideoMode(800, 600, 32,
SDL_HWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF|SDL_NOFRAME);
if(NULL == display){
printf("%s\n", SDL_GetError());
return 0;
}
if(SDL_HWSURFACE == (display->flags & SDL_HWSURFACE)){
printf(“HW XVideo accerlation!\n”);
}
else{
printf(“No HW XVideo accerlation!\n”);
}

the result is No HW XVideo accerlation?

Anybody know why?

2009-07-15

kedahanzi

2009/7/14 kedahanzi <kedahanzi at 163.com>:

if(SDL_HWSURFACE?==?(display->flags?&?SDL_HWSURFACE)){

the result is No?HW?XVideo?accerlation?

Anybody know why?

I’m not familiar with how XVideo is made available in SDL, but I know
that this test that you’re doing is not it.

In SDL 1.2, that was the SDL_Overlay business, instead of SDL_Surface.
It looks like in 1.3 you’re just supposed to create a streaming
texture with the appropriate pixel format flag?–