Skip to main content
Home Forums Silverlight Programming Programming with JavaScript Transmitting large amount of data from COM to Silverlight (through javascript)
1 replies. Latest Post by ggallind on July 8, 2009.
(0)
genLi
Member
0 points
3 Posts
07-07-2009 9:48 AM |
Hello all, I’m writing new version of client application (on Silverlight) for video surveillance system. In future I plan to stream directly to Silverlight, unfortunately now it’s not an option. Now I have COM object that can receive video stream from network. My question is: how can I transmit large amount of data (video samples ~ 2MB) from COM to Silverlight? I know that COM/Silverlight cooperation should be organized through HTMLBridge. So, using HTMLBridge, I pass C# array to method of COM object. In the COM object I receive IDispatch. I guess, this is an interface to the array, marshalled from javascript. I can invoke “length”, “splice”, “push” and index properties ('1', '2'…). The problem is that it takes a lot of time to copy 2 MB of data to array by element. I checked that marshalling shouldn't take so much time. Is there any other interfaces or methods on this object for fast memory copy? What other options are to pass large amount of data to Silverlight? Thank you! Best regards, genLi
ggallind
12 points
1 Posts
07-08-2009 7:40 AM |
I think you should change Silverlight to something else if you want to use COM.