06-21-2010 04:54 PM
Has anyone used the Microsoft Expression Encoder SDK with LabVIEW. I have had some success, but I have been unable to get the live encoding option to paint the video. I have attached a VI with the C code that I have been attempting to translate into LabVIEW, but I haven't been able to get the video to display. Any suggestions are greatly appreciated.
06-22-2010 05:15 PM
Hello Chris,
Unfortunately, I don't have the Microsoft Expression Encoder SDK but I did look through the Paint to Window section of the code to see if I can find any differences between the C code and the VI. I did notice one difference between the two with the HandleRef. For the HandleRef, there are two different constructors: HandleRef() and HandleRef(Object wrapper, IntPtr handle). In the C code in the comments of the VI, I noticed this command:
source.PreviewWindow = new Microsoft.Expression.Encoder.Live.PreviewWindow( new System.Runtime.InteropServices.HandleRef(w, w.Handle) );
The HandleRef commands in this code uses this constructor, HandleRef(Object wrapper, IntPtr handle), instead of HandleRef() which is what you are using in the LabVIEW code. If you double click on the constructor, you can change the constructor to the other one.
I hope this information helps.