Example #1
0
void Playlist::SetDead()
{
	PLEntry *ple = (PLEntry *) gf_list_get(m_entries, m_cur_entry);
	if (ple) {
		ple->m_bIsDead = GF_TRUE;
		UpdateEntry(m_cur_entry);
		m_all_dead_entries=-1;
		if (ple->m_bIsPlaying) PlayNext();
	}
}
Example #2
0
void GuiBGM::UpdateState()
{
    if(!IsPlaying())
    {
        if(loopMode == DIR_LOOP)
        {
            PlayNext();
        }
        else if(loopMode == RANDOM_BGM)
        {
            PlayRandom();
        }
    }
}
Example #3
0
LRESULT FMediaContainer::OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{

	bool bShift = ( GetKeyState(VK_SHIFT) & 0x8000) != 0;
	bool bCtrl  = ( GetKeyState(VK_CONTROL) & 0x8000) != 0;


	switch(wParam)
	{
	case 'A':
			if (m_pMediaPlayer.m_pPlayer != NULL)
				m_pMediaPlayer.m_pPlayer->SendCommand("cycle aspect ratio", NULL);
		break; 
	case 'F':
		g_MainFrame->SetFullScreen(!g_MainFrame->IsFullScreen());
		break; 
	case 'I':
		{
			g_MainFrame->ShowQuickBar(); 
		}
		break; 
	case 'S':
		{
			if (m_pMediaPlayer.m_pVideo.m_Clips.GetCount() > 1 && !m_pMediaPlayer.IsPlaylist())
			{
				BOOL bVisible = m_pMediaPlayer.m_pInfoBar.IsWindow() && m_pMediaPlayer.m_pInfoBar.IsWindowVisible(); 
				m_pMediaPlayer.ShowInfoBar(!bVisible); 
				if (m_pMediaPlayer.m_pInfoBar.IsWindow())
					m_pMediaPlayer.m_pInfoBar.m_pBrowser.CallJScript("showSubs"); 
			}
			else
			{
				DWORD dwFlags = 0; 
				if (m_pMediaPlayer.m_pPlayer != NULL)
					m_pMediaPlayer.m_pPlayer->SendCommand("cycle subtitles", NULL);
			}
		}
		break; 
	case VK_UP:
		m_pMediaPlayer.m_pControlBar->IncreaseVolume();
		break; 
	case VK_DOWN:
		m_pMediaPlayer.m_pControlBar->DecreaseVolume();
		break; 
	case VK_SPACE:
		m_pMediaPlayer.PauseResume();
		break; 
	case VK_LEFT:
		{
			dword dwMultiply = bShift ? 5 : 1;
			if (bCtrl)
				dwMultiply = 30; 

			MEDIA_TIME rtPos = m_pMediaPlayer.GetPosition(); 
			MEDIA_TIME OneSecond = 1000 * DURATION_MULT * dwMultiply; 
			if (rtPos < OneSecond)
				OneSecond = rtPos;
			m_pMediaPlayer.SeekPosition(rtPos - OneSecond);
		}
		break; 
	case VK_RIGHT:
		{
			dword dwMultiply = bShift ? 5 : 1; 
			if (bCtrl)
				dwMultiply = 30; 

			MEDIA_TIME rtPos = m_pMediaPlayer.GetPosition(); 
			MEDIA_TIME OneSecond = 1000 * DURATION_MULT * dwMultiply; 
			m_pMediaPlayer.SeekPosition(rtPos + OneSecond); 
		}
		break; 
	case VK_NEXT: //page down
		{
			PlayNext(TRUE); 
		}
		break; 
	case VK_PRIOR:
		{
			PlayPrev(TRUE); 
		}
		break; 
	}

	return 0; 
}
Example #4
0
/**
 *  Startet Abspielvorgang
 */
void MusicPlayer::Play()
{
    playing = true;

    PlayNext();
}