Change time display of Windows Media Player using an ActiveX Control within a GUI

1 view (last 30 days)
Dear all,
I created a GUI and implemented an AxctiveX Control to import an avifile. This works fine so far. I was also able to change the frame rate from the default value of 25 frames per second (fps) to the fps of my acquired videos (ca. 10 fps). With the chosen frame rate, the video needs 107 seconds now instead of 41 seconds. As I mentioned above, that is really nice, BUT
The problem is now the following: Under the video the time bar as well as the status of the Windows Media Player is shown. And this time bar ends always at 00:41 seconds (duration with default frame rate of 25 fps). Is it possible to change this time too? At the end of the video, 01:47 should be the value of the time bar due to the fact that this time is now required to watch the whole video?
Thank you in advance for the reply.
Regards
Sebastian

Answers (1)

Jeffrey Girard
Jeffrey Girard on 2 Dec 2014
You can hide the duration information from WMP by changing the uiMode to none:
axctl = actxcontrollist;
index = strcmp(axctl(:,1),'Windows Media Player');
handles.wmp = actxcontrol(axctl{index,2});
handles.wmp.uiMode = 'none';
Then you can create an edit box in MATLAB and update it with the "correct" timestamp.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!