VIdeo Converence Software: Tk and thread synchronization
Paolo Pantaleo
paolopantaleo at gmail.com
Mon Oct 2 08:42:15 EDT 2006
Hi,
I am going on writing my video conference software. I wrote the video
grab, code/decode, and netwoark (multicast) transport.
I have one thread doing this:
[thread 1]
while True:
for some times:
my_socket.recv() #blocking here
store data
compute image #here we have a complete new image to display
Now, I was thinking to display the image in a Tk window. But I think
i will need a separate thread to run the mainloop() [thread 2], right?
How can I signale to the Tk thread that a new image is ready to be
shown? I was thinkin on using an event generated for the first
(network) thread. But I don't know how to do it exactly. Any
suggestion, please?
What if I access to Tk object form thread 1, is Tk thread safe?
Thnx
PAolo
--
if you have a minute to spend please visit my photogrphy site:
http://mypic.co.nr
More information about the Python-list
mailing list