[Xbyamp-cvs] xbmp/player/UI ControlPanel.cpp,1.1,1.2 ControlPanel.h,1.1,1.2 MovieInterface.cpp,1.4,1
Status: Pre-Alpha
Brought to you by:
yamp
From: <ya...@us...> - 2002-12-05 18:07:53
|
Update of /cvsroot/xbyamp/xbmp/player/UI In directory sc8-pr-cvs1:/tmp/cvs-serv25608/UI Modified Files: ControlPanel.cpp ControlPanel.h MovieInterface.cpp Log Message: fixed hanging when playing mpeg1 over relax @ and of file Index: ControlPanel.cpp =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/UI/ControlPanel.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ControlPanel.cpp 28 Nov 2002 21:47:34 -0000 1.1 --- ControlPanel.cpp 5 Dec 2002 18:07:48 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- #include "ControlPanel.h" + #include "../xboxmediaplayer.h" ////////////////////////////////////////////////////////////////////// *************** *** 117,120 **** --- 118,126 ---- } + void CControlPanel::SetApplication(CApplication* Application) + { + m_pApplication=Application; + } + HRESULT CControlPanel::Destroy() { *************** *** 161,176 **** if (m_pMediaPlayer->SupportsSeek()) { ! BOOL bPlaying = m_pMediaPlayer->IsPlaying(); ! ! if (bPlaying) ! m_pMediaPlayer->Stop(); ! ! if( m_pMediaPlayer->GetPosition() < m_dwStepSize ) ! m_pMediaPlayer->SetPosition( 0 ); ! else ! m_pMediaPlayer->SetPosition( m_pMediaPlayer->GetPosition()-m_dwStepSize ); ! ! if (bPlaying) ! m_pMediaPlayer->Play(); } --- 167,171 ---- if (m_pMediaPlayer->SupportsSeek()) { ! m_pApplication->OnFastBackward(); } *************** *** 181,196 **** if (m_pMediaPlayer->SupportsSeek()) { ! BOOL bPlaying = m_pMediaPlayer->IsPlaying(); ! ! if (bPlaying) ! m_pMediaPlayer->Stop(); ! ! if( m_pMediaPlayer->GetPosition() + m_dwStepSize > m_pMediaPlayer->GetPlaybackTime() ) ! m_pMediaPlayer->SetPosition( m_pMediaPlayer->GetPlaybackTime() ); ! else ! m_pMediaPlayer->SetPosition( m_pMediaPlayer->GetPosition()+m_dwStepSize ); ! ! if (bPlaying) ! m_pMediaPlayer->Play(); } --- 176,180 ---- if (m_pMediaPlayer->SupportsSeek()) { ! m_pApplication->OnFastForward(); } Index: ControlPanel.h =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/UI/ControlPanel.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ControlPanel.h 28 Nov 2002 21:47:34 -0000 1.1 --- ControlPanel.h 5 Dec 2002 18:07:48 -0000 1.2 *************** *** 32,35 **** --- 32,37 ---- #define VOLUME_STEP 50 + class CApplication; + class CControlPanel { *************** *** 58,62 **** HRESULT Destroy(); ! private: --- 60,64 ---- HRESULT Destroy(); ! void SetApplication(CApplication* Application); private: *************** *** 79,82 **** --- 81,85 ---- DWORD m_dwStepSize; // Represents a change of 5% from the current position. + CApplication* m_pApplication; }; Index: MovieInterface.cpp =================================================================== RCS file: /cvsroot/xbyamp/xbmp/player/UI/MovieInterface.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MovieInterface.cpp 4 Dec 2002 20:56:49 -0000 1.4 --- MovieInterface.cpp 5 Dec 2002 18:07:49 -0000 1.5 *************** *** 65,68 **** --- 65,69 ---- return E_FAIL; + m_cplControls.SetApplication(m_pApplication); OutputDebugString("Movie UI ready.\n"); return S_OK; |