Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

PAPlayer: add missing calls to IPlayerCallback's OnPlayBackResumed() and OnPlayBackPaused() #1371

Merged
merged 1 commit into from

1 participant

Sascha Montellese
Sascha Montellese
Owner

This adds missing calls to IPlayerCallback::OnPlayBackResumed() and OnPlayBackPaused() in PAPlayer::Pause() which went missing because of the AE merge.

I will need some help in finding out why OnPlayBackStarted() is called twice when playing a song. It is called once from CApplication::PlayFile() and once from PAPlayer (which is also the case when playing a video with DVDPlayer) but the difference is that when playing a video the call to OnPlayBackStarted() from DVDPlayer returns early because CApplication::m_bPlaybackStarting is still set (i.e. DVDPlayer calls the callback before CApplication::PlayFile() does) but with PAPlayer this works differently. First CApplication::PlayFile sets CApplication::m_bPlaybackStarting to false and calls OnPlayBackStarted() (which results in no early return) and then PAPlayer calls OnPlayBackStarted() so in the end OnPlayBackStarted() is fully executed twice. Does this have to do with video playback switching to fullscreen and music playback not? I'll try to figure it out but would appreciate any pointers/hints.

EDIT: OK this seems to have to do with how PAPlayer works in PAPlayer::OpenFile(). DVDPlayer::OpenFile() returns after OnPlayBackStarted() has been called from its thread whereas PAPlayer::OpenFile() almost returns immediatelly and before OnPlayBackStarted() has been called from its thread.

Sascha Montellese Montellese merged commit efcb312 into from
Sascha Montellese Montellese was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 4, 2012
  1. Sascha Montellese
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  xbmc/cores/paplayer/PAPlayer.cpp
2  xbmc/cores/paplayer/PAPlayer.cpp
View
@@ -731,11 +731,13 @@ void PAPlayer::Pause()
{
m_isPaused = false;
SoftStart();
+ m_callback.OnPlayBackResumed();
}
else
{
m_isPaused = true;
SoftStop(true, false);
+ m_callback.OnPlayBackPaused();
}
}
Something went wrong with that request. Please try again.