Discussion:
Get Windows data
(too old to reply)
Eman2334
2008-08-05 17:40:09 UTC
Permalink
Hi,
 
I am working on an application which aquires streaming video using a Sensoray 2250 on one computer and displays it on another. The method to stream the video takes a Windows refnum and proceeds to stream the video in the specified window. What I would like to do is send that data to another PC to be displayed there in real time, but Im not sure if this is possible. Since the streaming video is placed directly in the window and not a LabVIEW object, I cannot use shared variables or anything of the sort. I think I have to use the user32.dll to access the window properties, but I am not very familiar with Windows programming.
 
Any help would be greatly appreciated!
 
-Eman
MikeS81
2008-08-05 20:40:11 UTC
Permalink
Hi Eman, how often do you need a picture? Or do you need the "video" in real time?Mike
Eman2334
2008-08-05 21:10:08 UTC
Permalink
Mike,
 
I need the video in real time, or as close to it as possible. I am able to stream the video to a window on the same machine that is aquiring it using Windows references, but when passing the Windows refnum to another machine to display the video it doesnt mean anything to that machine.
 
Thank you for taking the time to help me!
 
-Eman
smercurio_fc
2008-08-05 21:10:10 UTC
Permalink
And it will never mean anything to that machine since that machine isn't the one that created the window. You need to have the other machine create a window and use that refnum.
Eman2334
2008-08-06 17:40:11 UTC
Permalink
Thanks for the response!
 
Let me rephrase my question though. I would like the machine that is aquiring the video stream to act as a "video server" of sorts, and the other machine to display it and control the vi which aquires the video remotely. What your suggesting is to have the machine displaying the video create a window, but the "video server" must have access to THAT window in order to display the streaming video in it. So accessing a window on one machine from another can be done still with references, by using a shared variable or something of that nature?
 
Thanks again
 
-Eman
smercurio_fc
2008-08-06 18:40:07 UTC
Permalink
Eman2334 wrote:So accessing a window on one machine from another can be done still with references, by using a shared variable or something of that nature?
I never said that. Window refnums are machine specific. If the streaming operation takes in a window handle then it assumes that the window is local. You can't pass in the refnum of a window created on another machine since it won't mean anything to the machine that's capturing the video. You need to separate the video capture from the video display. The video server will capture the video and send it over TCP/IP to the other machine. The other machine just reads whatever it gets and paints it on the screen. This other half you will need to do yourself. You can check to see what example programs came with the video streamer to see how the video gets displayed. I'm sure the API assumes certain things about the window.
Eman2334
2008-08-06 19:10:06 UTC
Permalink
Ok, thanks!
 
I will look more into that, and post my solution/any more problems I run into.
 
-Eman

Loading...