LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft Expression Encoder Live Encoding

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.

Chris
Practical Physics, LLC
www.practicalphysicsllc.com
0 Kudos
Message 1 of 2
(2,780 Views)

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.


Jim St
National Instruments
RF Product Support Engineer
0 Kudos
Message 2 of 2
(2,755 Views)