Next audio track from pause
Jeffrey Barish
jeffbarish73 at gmail.com
Fri Oct 14 17:04:52 UTC 2022
I am using playbin3 for audio playback. I am having a problem implementing
a "next" feature whereby playback jumps on request to the next track in a
list. My code works fine if I am playing a track at the time I activate the
next button. However, if I pause playback and then click next while
playback is still paused, there is a problem. What I am trying to achieve
in that case is that play will advance to the beginning of the next track
and remain paused until I click play. My code actually does this, but when
I eventually click play there is a long pause (about 7-8 seconds) before
play starts. In either case, I go to state NULL first and then set property
uri. I then restore the state to whatever value it had before clicking next
(PLAYING or PAUSED). I also tried setting the state to PLAYING in either
case, but then quickly setting the state to PAUSED if that was the initial
state. Yesterday there seemed to be a shorter delay with that hack, but
today I am not so sure (it was about 4 seconds when I tried it just now,
but it fluctuates quite a bit). I also tried putting in a seek_simple after
setting the state to NULL. That modification had no effect. There clearly
is something basic that I am missing, but I am out of ideas.
--
Jeffrey Barish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221014/898aa302/attachment.htm>
More information about the gstreamer-devel
mailing list