LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Windows data

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
0 Kudos
Message 1 of 17
(4,130 Views)
Hi Eman,
how often do you need a picture? Or do you need the "video" in real time?
Mike
0 Kudos
Message 2 of 17
(4,112 Views)
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
0 Kudos
Message 3 of 17
(4,106 Views)
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.
0 Kudos
Message 4 of 17
(4,100 Views)
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
0 Kudos
Message 5 of 17
(4,073 Views)

@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.
0 Kudos
Message 6 of 17
(4,066 Views)
Ok, thanks!
 
I will look more into that, and post my solution/any more problems I run into.
 
-Eman
0 Kudos
Message 7 of 17
(4,062 Views)
I have a Sensoray 2251 device that I am trying to get to display the video using labview.  I have used the import dll function to get the VI's.  I can start streaming, but I don't know how to get the video to display.  Any assistance?
0 Kudos
Message 8 of 17
(3,832 Views)

Hey goofylogic98,

 

Unfortunately, I am not familiar with the Sensoray 2251. Are you using the Call Library Node to call a .dll specific to that device? Is one of the outputs of that .dll image data? There are a few image containers that would be able to display that data as an image. For example, the Image Display indicator that comes with the Vision Development Module would be able to display images. 

 

Perhaps a little more clarification of where you are stuck would be helpful. Are you able to get arrays of data into LabVIEW and not be able to display them as images? Also, it might be helpful to start a new thread and simply reference this one. That way your question might get a little more attention as this thread is older and already seems to have some sort of resolution.

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 9 of 17
(3,765 Views)
The way I understand it is I have a VI built from the DLL call "Set Playback Window" that is looking for a hwnd input.  I don't know how to create a window nor find out what the hwnd of that window is in order to set the playback window.  I think this is a fairly easy problem, but just haven't done much with it.  Any help would be appreciated.
0 Kudos
Message 10 of 17
(3,748 Views)