10-21-2009 11:56 AM
The project that i am doing is on video conferencing. I have some problems sending the real time Video through TCP/IP. The source is a .Net refnum and i need to transmit the data through the Type Cast in string. So from the picture box i pass the data through Anything to Variant and then Variant to flatten string. This is for the server.
For the client, i create another Vi and with the new picture box, i pass the received data from the Type Cast through Anything to Variant and Variant to Data back to the Picture Box.However i am unable to get any images at the clientside. Is my concept wrong in doing this way?I tried passing data from the Type Cast back from flatten string back to variant but to no avail.
P.S : i am new to labview and hope that you would help me. Any help is greatly appreciated. Thanks
Solved! Go to Solution.
10-21-2009 12:59 PM
It is not just labVIEW but all computer languages that would have this issue.
References do not include the data, they are a way to find the data. They are much different than the number you get when you want service at the butcher shop so "you take a number". The butcher does not know your name, but will let you know it is your turn by calling out your number. Similarly the number you get at the butcher will not help out at the barber shop.
The refnum you have is a key number used to locate the data or resources assocaited with your widget. when you pass that number (ref) to a function that knows about it, the number is used to look up all of the details that go with that ref. The numbers are usually given to you when the resources are allocated and you open the gizmo.
So...
You are trying to use a ticket from the butcher to work at the barber shop!
What you will have to do is pull out the data associated with that ref and pass the data (not the ref to the data) to the client.
Ben
10-21-2009 01:05 PM
10-21-2009 01:13 PM
Blanko wrote:
ok, now i understand what you mean. Just to ask you, how cani pull out the data assosciated with the Ref so i can pass the data to the client. Anyway to do that?
I suggest you broden that target audience becuase I have no idea how to do that (without interupting on eof the other developers I work with).
Ben
"Jack of all trades but only a master of some"
10-21-2009 03:16 PM
10-22-2009 10:32 AM
10-22-2009 11:46 AM
In order to transfer the data from one computer to another you have to extract the data from the PictureBox control. The .NET classes are all documented in MSDN. The .NET PictureBox documentation is here. This will tell you what methods and properties you have to use to get to the image data. Specifically, the Image property will return the image being displayed as an Image class. This class has its own properties and methods. Now, with this class getting the raw data is not trivial. There is no "RawData" property. You could, instead, use the Save method and save the image to a Stream object though that's probably not going to buy you much. You could use the Save method and save the image to file and then transfer the file over TCP/IP. If you use the file save to file method then at the client end you would need to capture the data, save it to file and create an Image from file and then set the PictureBox's Image property to the Image object you just creted.
That's a lot of work and a lot of .NET calls. This will be quite slow.
10-23-2009 01:26 PM