コード例 #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
//-------------------------------------------------------------------------
//  CmdGetMovieState
//
//  returns media control state of the movie (running, paused, or stopped)
//-------------------------------------------------------------------------
OAFilterState CMultiSAP::CmdGetMovieState(sMovieInfo* pMovInf)
{
    if( !pMovInf )
    {
        OutputDebugString(TEXT("CmdNotifySelected received a wrong parameter\n"));
        return 0;
    }

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

    if( NULL == pmovie)
    {
        OutputDebugString(TEXT("CmdNotifySelected received unrecognized UserID\n"));
        ZeroMemory( pMovInf, sizeof(sMovieInfo));
        return 0;
    }

    return pmovie->GetStateMovie();
}