PDA

View Full Version : how to repeat a part of video in Qt player



herculis
25th August 2014, 11:42
i want to start a video from let say after one min and stop it after 3 min and start the video again from 1 min means like a loop and video is 7 min long.
Could anyone help me in this.

wysota
25th August 2014, 12:17
i want to start a video from let say after one min and stop it after 3 min and start the video again from 1 min means like a loop and video is 7 min long.
Could anyone help me in this.

What have you tried so far?

herculis
25th August 2014, 13:17
i can use qtimer and when the timer is off i can can call the repeat function but i dont know how qtimer can be connected to mediaplayer so that they both can pass the signal to each other

wysota
25th August 2014, 13:48
Why can't you connect to the positionChanged() signal in QMediaPlayer?

herculis
25th August 2014, 14:06
How to do that?
actually i am using position changed to update the slider means to move the silder.
Then also How can i use it can u please explain

wysota
25th August 2014, 14:19
How to do that?
actually i am using position changed to update the slider means to move the silder.
Then also How can i use it can u please explain

If position changed up to where you want to loop the recording, seek back to the start of the loop.

herculis
25th August 2014, 14:26
connect(&mediaPlayer, SIGNAL(positionChanged(7000)),this, SLOT(time()));
and time is a function which repeats the video but its not woking

anda_skoa
25th August 2014, 16:28
It is very unlikely that QMediaPlayer has a signal with a C++ type "7000" because 7000 is not a valid C++ type identifier.

It does, however, have a signal positionChanged(qint64).

Cheers,
_