LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I play a video in varying frame rate which depends on real time data?

I have developed an application where I'm reading data from a device connected through a serial port. Now I want to display a video whose frame rate/playing speed changes according to the data that I get. The video file will be on a local drive, not a stream.
 
A pseudo code for the function to manage this, I am guessing, would be like the following;
 
10 Read Data D
20 Play Video for time T and with frame rate R
           where T is the time it takes to get a new data
               and R is a function of D
 
30 GoTo 10
 
I have checked the threads regarding the video applications but I'm really new to Labwindows/CVI and do not know what functions to use.
0 Kudos
Message 1 of 2
(3,071 Views)

Dear levent.tuter

Have a look at the example "C:\Programme\National Instruments\CVI81\samples\Vision\2. Functions\AVI\Read AVI Example.prj";
it can easily be extended to adapt the frame rate at run-time - just do something like

SetCtrlAttribute (panelHandle, PANEL_TIMER, ATTR_INTERVAL, (factor * 1.0 / (double)aviInfo.framesPerSecond));

Best regards

Philipp R.

 

0 Kudos
Message 2 of 2
(3,017 Views)