Two Videos Next to Each Other in a SDL Application

Dear all
I modify ffplay from the ffmpeg project so it will be able
to show two videos next to each other.

With just one video the video shows fine in an SDL_DisplayYUVOverlay.

When I have two videos each have an YUVOverlay and when I call
SDL_DisplayYUVOverlay

I manipulate the dstrect so it becomes half size and for
the second video I add dstrect.x to dstrect.x.

Now the videos are shown next to each other.

BUT both videos show in in both places - the video
frames seems to jump all over!

Am I not using the correct method to update only part of
the window?

Thanks

Thomas S

This sounds like a deeper problem. Could ffmpeg have some common
variables that are overwritten by both videos?

Jonny DOn Wed, Apr 22, 2009 at 5:07 PM, Thomas Seilund wrote:

Dear all
I modify ffplay from the ffmpeg project so it will be able
to show two videos next to each other.

With just one video the video shows fine in an SDL_DisplayYUVOverlay.

When I have two videos each have an YUVOverlay and when I call
SDL_DisplayYUVOverlay

I manipulate the dstrect so it becomes half size and for
the second video I add dstrect.x to dstrect.x.

Now the videos are shown next to each other.

BUT both videos show in in both places - the video
frames seems to jump all over!

Am I not using the correct method to update only part of
the window?

Thanks

Thomas S


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

Jonathan Dearborn <grimfang4 gmail.com> writes:

This sounds like a deeper problem. Could ffmpeg have some common
variables that are overwritten by both videos?

Jonny D

Dear all
I modify ffplay from the ffmpeg project so it will be able
to show two videos next to each other.

With just one video the video shows fine in an SDL_DisplayYUVOverlay.

When I have two videos each have an YUVOverlay and when I call
SDL_DisplayYUVOverlay

I manipulate the dstrect so it becomes half size and for
the second video I add dstrect.x to dstrect.x.

Now the videos are shown next to each other.

BUT both videos show in in both places - the video
frames seems to jump all over!

Am I not using the correct method to update only part of
the window?

Thanks

Thomas S


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

I will look info ffmpeg.

Still, is it the right SDL technique when I only want to update part of
the screen (SDL_Surface)?

As I understand it an SDL_Overlay must be the same size as the SDL_Surface
it attaches to. As I don’t want to update all the SDL_Surface each time
I make the dstrect smaller before call of SDL_DisplayYUVOverlay!

Is this the correct way to code?

Thanks> On Wed, Apr 22, 2009 at 5:07 PM, Thomas Seilund <tps netmaster.dk> wrote: