On Wed, 16 Nov 2005, Smoof . wrote:
On Wed, 16 Nov 2005, Alex Deucher wrote:
On 11/16/05, Smoof . [EMAIL PROTECTED] wrote:
Hello,
I am writing an application that will display up to 9 independent
video
streams (each stream is 320 x 240). I'm new to Xv and may not be
using the
correct terminology so please bear with me. I have tried two
approaches:
The first approach was to create one large overlay using
XvShmCreateImage
and tile in the video frames. Once all frames are tiled in, use
XvShmPutImage to send them to the X server. This method works
perfectly.
However, my ultimate goal is to send each video stream to it's own GTK
widget so I can have each video stream playing in a window that can be
moved, be surrounded by buttons, minimized, etc...
I implemented this by creating a simple GTK app with three drawing
areas
(ultimately I will have 9) of 320x240 and used some GDK functions to
determine the X window id's for the widgets. I created a separate
overlay
(again using XvShmCreateImage) for each window. Then I call
XvShmPutImage
once for each window. Finally I call XFlush so send the requests to
the X
server. I tried using XSync but it seemed to interfere with the GTK
event
loop.
The problem with this second approach is that the overlays are
flashing blue
(the overlay color key from what I've read). So I looking for advice
on how
to update multiple overlays at a rate of 24fps without any flashing.
Or if
you don't think this is possible then please let me know and I'll just
have
to get by with my first implementation.
Most hardware only has one overlay so each widget will be fighting for
it. only the one that has it at any given moment will actually
display the video; the rest will show the colorkey.
Alex
Typically, a client will grab the Xv port when using it to prevent
other clients from being able to use the same Xv port. When a new
client can't grab one Xv port, it looks for another one. That mechanism
only works when there are different clients. If you want to do all
rendering from the same client, then you need to deliberately use
different ports for each Window. Some drivers export more than one
adaptor that supports XvImages and some adaptors have more than one
port. Overlay adaptors will typically only have a single port.
Run xvinfo for a summary of adaptors and their capabilities.
Mark.
My plan was to do all the rendering with the same client and I know that my
overlay adaptor only has a single port for the YUV420 format that I am
using.
Do you have non-overlay XvImage adaptors with more than one port?
NVIDIA drivers and some others offer this.
Mark.
___
Devel mailing list
Devel@XFree86.Org
http://XFree86.Org/mailman/listinfo/devel