07-30-2009 05:19 AM
Hi,
Is it possible to control the functions of quicktime or windows media player using the system exec. I have tried imbedding quicktime and windows media into an activeX container but i am constantly having trouble with video flicker etc. The video runs without no problem on its own so i was wondering if it would be possible to control the functions of the quicktime and windows media player using the system exec in LabView.
Cheers for any help
James
07-30-2009 06:33 AM
James,
i am not sure if it is possible to use System Exec in order to start a video playing in WMP or Quicktime.
I suggest you to use ActiveX. ActiveX has two major features:
a) Embedd: This is what you have already tried. In my experience, flickering of videos while embedding WMP is created by too many elements on the frontpanel. Please check for performance issues in the graphical update of your UI (see Style Guides regarding Front Panel in the LV Help).
b) Control: You use ActiveX to control an external application. The Server (the application you want to control) has to supply different commands to interact with it. The Client (your application) can use those commands in order to remotly control the Server.
Option b) is maybe what you are currently looking for.
hope this helps,
Norbert
07-31-2009 05:40 AM
Hi James,
Unfortunately Media Player does not have the command line inputs required for full control via the system exec VI. The best you can do is open the player and start it playing a particular file. See here for parameters.
The best thing you can do is follow Norbert's advice and use ActiveX. Try removing everything from the Front Panel except the ActiveX control and see if you still have the Video Flicker. Also placing the ActiveX control over a background image could cause these problems.
Hope this helps,
John
08-03-2009 09:31 AM
Hi,
Thanks for the replies. All i have on the front panel is an activeX controller with the embedded quicktime in it and nothing else. Basically the user touches the "screen", in this case it breaks an IR beam, which then stops, starts, rewinds, forwards etc the film. I had it working with one film but when i loaded another film in it started to flicker. It flickers on the original film as well.
I am sure there is a way round this and using your advice and some time i am sure there will be a solution. I will post it if i figure it out.
Cheers
James
08-03-2009 09:58 AM
Hi James,
I did have another thought with this one.
If you set up global hotkeys in the media player for things such as play pause etc you could then pragmatically press those keys in LabVIEW.
I am unsure if you can do this in QuickTime or media player but I know it is possible in Winamp.
You could open the program using the system exec and load the video and then emulate the global hotkeys for control such as pause.
It is not the most direct method but may provide the functionality you require.
Hope this helps and post back if you have any other ideas.
John