Advertisement
Guest User

Untitled

a guest
Jan 10th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. diff --git a/xbmc/ApplicationPlayer.cpp b/xbmc/ApplicationPlayer.cpp
  2. index 63f1975..eeb5c78 100644
  3. --- a/xbmc/ApplicationPlayer.cpp
  4. +++ b/xbmc/ApplicationPlayer.cpp
  5. @@ -586,6 +586,20 @@ void CApplicationPlayer::SetSubtitleVisible(bool bVisible)
  6. }
  7. }
  8.  
  9. +void CApplicationPlayer::SetTime(int64_t time)
  10. +{
  11. + std::shared_ptr<IPlayer> player = GetInternal();
  12. + if (player)
  13. + return player->SetTime(time);
  14. +}
  15. +
  16. +void CApplicationPlayer::SetTotalTime(int64_t time)
  17. +{
  18. + std::shared_ptr<IPlayer> player = GetInternal();
  19. + if (player)
  20. + player->SetTotalTime(time);
  21. +}
  22. +
  23. void CApplicationPlayer::AddSubtitle(const std::string& strSubPath)
  24. {
  25. std::shared_ptr<IPlayer> player = GetInternal();
  26. diff --git a/xbmc/ApplicationPlayer.h b/xbmc/ApplicationPlayer.h
  27. index 3752f6b..dfc6316 100644
  28. --- a/xbmc/ApplicationPlayer.h
  29. +++ b/xbmc/ApplicationPlayer.h
  30. @@ -176,6 +176,8 @@ public:
  31. void SetSubtitle(int iStream);
  32. void SetSubTitleDelay(float fValue = 0.0f);
  33. void SetSubtitleVisible(bool bVisible);
  34. + void SetTime(int64_t time);
  35. + void SetTotalTime(int64_t time);
  36. void SetVolume(float volume);
  37. bool SwitchChannel(const PVR::CPVRChannelPtr &channel);
  38. void ToFFRW(int iSpeed = 0);
  39. diff --git a/xbmc/network/AirTunesServer.cpp b/xbmc/network/AirTunesServer.cpp
  40. index 205b553..36b63f0 100644
  41. --- a/xbmc/network/AirTunesServer.cpp
  42. +++ b/xbmc/network/AirTunesServer.cpp
  43. @@ -415,11 +415,8 @@ void CAirTunesServer::AudioOutputFunctions::audio_set_progress(void *cls, void *
  44. duration /= m_sampleRate;
  45. position /= m_sampleRate;
  46.  
  47. - if (g_application.m_pPlayer->GetInternal())
  48. - {
  49. - g_application.m_pPlayer->GetInternal()->SetTime(position * 1000);
  50. - g_application.m_pPlayer->GetInternal()->SetTotalTime(duration * 1000);
  51. - }
  52. + g_application.m_pPlayer->SetTime(position * 1000);
  53. + g_application.m_pPlayer->SetTotalTime(duration * 1000);
  54. }
  55.  
  56. void CAirTunesServer::SetupRemoteControl()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement