コード例 #1
0
ファイル: CMultiSAP.cpp プロジェクト: hgl888/nashtest
//-------------------------------------------------------------------------
//  CmdPauseMovie
//-------------------------------------------------------------------------
void CMultiSAP::CmdPauseMovie(sMovieInfo * pMovInf)
{
    int nVMR = -1;

    if( NULL == pMovInf)
    {
        OutputDebugString(TEXT("Invalid parameter sent to CmdPauseMovie()\n"));
        return;
    }

    CMovie *pmovie = NULL;
    pmovie = m_movieList.GetMovie( pMovInf->pdwUserID );

    if( NULL == pmovie)
    {
        OutputDebugString(TEXT("CmdPauseMovie() received unrecognized UserID\n"));
        return;
    }

    OAFilterState State = pmovie->GetStateMovie();
    BOOL fPlaying = (State & State_Running);
    BOOL fPaused  = (State & State_Paused);

    if (fPlaying)
    {
        pmovie->PauseMovie();
    }
    else if (fPaused)
    {
        pmovie->PlayMovie();
    }

    return;
}
コード例 #2
0
ファイル: CMultiSAP.cpp プロジェクト: hgl888/nashtest
//-------------------------------------------------------------------------
//      Name:   CmdQuit
//      Desc:   correct termination of this thread upon the request from the dialog
//      Parameters:
//      Return:
//      Other:  (1) Stop all movies
//              (2) Set quit event
//-------------------------------------------------------------------------
void CMultiSAP::CmdQuit(sMovieInfo * pMovInf)
{
    for( int i=0; i<m_movieList.GetSize(); i++)
    {
        CMovie *pmovie = m_movieList.GetMovieByIndex(i);
        if( pmovie )
        {
            pmovie->PauseMovie();
            pmovie->StopMovie();
        }
    }

    return;
}