Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed OnPlayBackResumed not getting fired anymore. #10739

Merged
merged 1 commit into from Nov 1, 2016

Conversation

razzeee
Copy link
Member

@razzeee razzeee commented Oct 20, 2016

Description

Make sure OnPlayBackResumed get's fired when we resume.

Motivation and Context

http://trac.kodi.tv/ticket/16976#ticket

How Has This Been Tested?

Tested on windows 10 in the vs debugger

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

@@ -3104,7 +3104,6 @@ void CVideoPlayer::Pause()
if (GetSpeed() == 0)
{
SetSpeed(1);

This comment was marked as spam.

This comment was marked as spam.

@@ -3647,6 +3646,8 @@ void CVideoPlayer::SetSpeed(float speed)

m_newPlaySpeed = speed * DVD_PLAYSPEED_NORMAL;
SetPlaySpeed(speed * DVD_PLAYSPEED_NORMAL);
if (speed == 1)

This comment was marked as spam.

@razzeee razzeee force-pushed the fixe-onPLaybackResumed-event branch from fed3939 to 69ad77b Compare October 21, 2016 21:37
@razzeee
Copy link
Member Author

razzeee commented Oct 21, 2016

Updated

@garbear
Copy link
Member

garbear commented Oct 21, 2016

I don't think that this will work, because if you call SetSpeed(1) then SetSpeed(2) it will call m_callback.OnPlayBackPaused();

@razzeee
Copy link
Member Author

razzeee commented Oct 21, 2016

Right forgot about fast forward

@garbear
Copy link
Member

garbear commented Oct 21, 2016

add the new speed to the comparison.

if (old == 0 && new != 0) OnResume();
else if (old != 0 && new == 0) OnPause();

m_newPlaySpeed = speed * DVD_PLAYSPEED_NORMAL;
SetPlaySpeed(speed * DVD_PLAYSPEED_NORMAL);
if (m_oldPlayerSpeed == 0)

This comment was marked as spam.

@FernetMenta FernetMenta added this to the Krypton 17.0-beta5 milestone Oct 26, 2016
@FernetMenta FernetMenta added Type: Fix non-breaking change which fixes an issue v17 Krypton Component: Video labels Oct 26, 2016
@razzeee razzeee force-pushed the fixe-onPLaybackResumed-event branch from 69ad77b to 430fa45 Compare October 26, 2016 23:00
@razzeee
Copy link
Member Author

razzeee commented Oct 26, 2016

Updated, I hope I understood you this time :)

@@ -3647,6 +3645,14 @@ void CVideoPlayer::SetSpeed(float speed)

m_newPlaySpeed = speed * DVD_PLAYSPEED_NORMAL;
SetPlaySpeed(speed * DVD_PLAYSPEED_NORMAL);
if (m_newPlaySpeed == DVD_PLAYSPEED_NORMAL && m_playSpeed != DVD_PLAYSPEED_NORMAL)

This comment was marked as spam.

This comment was marked as spam.

m_callback.OnPlayBackResumed();
else if (m_newPlaySpeed == DVD_PLAYSPEED_PAUSE)
m_callback.OnPlayBackPaused();
}
SetPlaySpeed(speed * DVD_PLAYSPEED_NORMAL);

This comment was marked as spam.

This comment was marked as spam.

@@ -3646,6 +3644,13 @@ void CVideoPlayer::SetSpeed(float speed)
return;

m_newPlaySpeed = speed * DVD_PLAYSPEED_NORMAL;
if (m_newPlaySpeed != m_playSpeed)
{
if (m_newPlaySpeed == DVD_PLAYSPEED_NORMAL)

This comment was marked as spam.

@razzeee
Copy link
Member Author

razzeee commented Oct 30, 2016

Updated

@razzeee
Copy link
Member Author

razzeee commented Oct 30, 2016

jenkins build this please

if (m_newPlaySpeed == DVD_PLAYSPEED_NORMAL)
m_callback.OnPlayBackResumed();
else if (m_newPlaySpeed == DVD_PLAYSPEED_PAUSE)
m_callback.OnPlayBackPaused();

This comment was marked as spam.

This comment was marked as spam.

@razzeee razzeee force-pushed the fixe-onPLaybackResumed-event branch from 8e1f559 to 0d4eec0 Compare October 30, 2016 21:51
@razzeee
Copy link
Member Author

razzeee commented Oct 31, 2016

jenkins build this please

@MartijnKaijser
Copy link
Member

@FernetMenta all good now?
jenkins build this please

@FernetMenta
Copy link
Contributor

looks good

@MartijnKaijser MartijnKaijser merged commit aa3c8fa into xbmc:master Nov 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Video Type: Fix non-breaking change which fixes an issue v17 Krypton
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants