I´m trying to make a video (also audio) player. For this i´m using the object mediaplayer, but i´m having some problems.
At the moment my player only have the common buttons (play, stop, etc) and a Panel where the video is displayed.
1) Now i´m trying to implement a trackbar. For this i use the TrackBar object (is there any other better?).
In the timer function i put something like this (to move the trackbar slider with the video):
TackBar->Position=MediaPlayer->Position*100/MediaPlayer->Length;
And in the OnChange event of Trackbar i put this:
MediaPlayer->Position = (MediaPlayer->Length * TrackBar->Position)/100;
But this code doesn't work because when the movie is playing (timer function) the trackbar is moving (OnChange) and then the OnCnahge event is executed (i only want this to happen when i move the slider). What should i do?
2) I want to know how can i resize my Panel with the dimensions of the video image? How can i make a fullscreeen option?
3) My player only handle avi files, but i want it to play other format files like .mov and also .mkv (dont know if you heard about this one). But when i try to play other format files i always get this message: "Cannot determine the devide type from the given filename extension.". How can i solve this?
4) How can i change the speaker volume?
Hope you can help me.
Thanks in advance.
At the moment my player only have the common buttons (play, stop, etc) and a Panel where the video is displayed.
1) Now i´m trying to implement a trackbar. For this i use the TrackBar object (is there any other better?).
In the timer function i put something like this (to move the trackbar slider with the video):
TackBar->Position=MediaPlayer->Position*100/MediaPlayer->Length;
And in the OnChange event of Trackbar i put this:
MediaPlayer->Position = (MediaPlayer->Length * TrackBar->Position)/100;
But this code doesn't work because when the movie is playing (timer function) the trackbar is moving (OnChange) and then the OnCnahge event is executed (i only want this to happen when i move the slider). What should i do?
2) I want to know how can i resize my Panel with the dimensions of the video image? How can i make a fullscreeen option?
3) My player only handle avi files, but i want it to play other format files like .mov and also .mkv (dont know if you heard about this one). But when i try to play other format files i always get this message: "Cannot determine the devide type from the given filename extension.". How can i solve this?
4) How can i change the speaker volume?
Hope you can help me.
Thanks in advance.