Problem with SDL 1.3 in Qt Widget

Hi everybody,

I’m working on a video player that needs to play more video at the same time.
I get one window by widget, and one renderer by window to display a different color in each of them.
It Works.

The problem arises when I replace the color by a video texture,
I can’t resize my texture to the display zone when i call SDL_RenderCopy(m_sdl_renderer, video_texture, NULL,NULL);

I have a display of my picture but it is much smaller than the display area size.

Could you help me to resolve this problem ?

Thanks a lot

Cyrille Herlem

Ps: I use this code to display my texture

video_texture = SDL_CreateTextureFromSurface(m_sdl_renderer,frame_received);
if(video_texture)
{
SDL_RenderClear(m_sdl_renderer);
SDL_RenderCopy(m_sdl_renderer, video_texture, NULL,NULL);
//SDL_SetRenderDrawColor(m_sdl_renderer,255,0,0,0);
SDL_RenderPresent(m_sdl_renderer);
SDL_DestroyTexture(video_texture);
}

Hi, if i remember correctly I had a very similar problem, but only
when using the software renderer on a quite old sdl revision. Are you
up to date and using an accelerated renderer?
If not, could you post more code so that others can verify what’s going on?
Best,
VittorioOn Mon, Jul 25, 2011 at 10:10 AM, cyrille herlem wrote:

Hi everybody,

I’m working on a video player that needs to play more video at the same
time.
I get one window by widget, and one renderer by window to display a
different color in each of them.
It Works.

The problem arises when I replace the color by a video texture,
I can’t resize my texture to the display zone when i call
SDL_RenderCopy(m_sdl_renderer, video_texture, NULL,NULL);

I have a display of my picture but it is much smaller than the display area
size.

Could you help me to resolve this problem ?

Thanks a lot

Cyrille Herlem

Ps: I use this code to display my texture

video_texture = SDL_CreateTextureFromSurface(m_sdl_renderer,frame_received);
??? if(video_texture)
??? {
??? SDL_RenderClear(m_sdl_renderer);
??? SDL_RenderCopy(m_sdl_renderer, video_texture, NULL,NULL);
??? //SDL_SetRenderDrawColor(m_sdl_renderer,255,0,0,0);
??? SDL_RenderPresent(m_sdl_renderer);
??? SDL_DestroyTexture(video_texture);
??? }


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org