Esempio n. 1
0
bool FFmpegPlayer::handleCommand(const Command cmd)
{
    switch (cmd)
    {
    case CMD_PLAY:
        cmdPlay();
        return true;

    case CMD_PAUSE:
        cmdPause();
        return true;

    case CMD_REWIND:
        cmdRewind();
        return true;

    case CMD_SEEK:
        cmdSeek(m_seek_time);
        return true;

    case CMD_STOP:
        cmdPause();
        return false;

    case CMD_ACTOUTPUT:
        cmdActivateOutput();
        return true;

    default:
        //OSG_WARN << "FFmpegPlayer::handleCommand() Unsupported command" << std::endl;
        av_log(NULL, AV_LOG_WARNING, "FFmpegPlayer::handleCommand() Unsupported command");
        return false;
    }
}
Esempio n. 2
0
bool FFmpegImageStream::handleCommand(const Command cmd)
{
    switch (cmd)
    {
    case CMD_PLAY:
        cmdPlay();
        return true;

    case CMD_PAUSE:
        cmdPause();
        return true;

    case CMD_REWIND:
        cmdRewind();
        return true;

    case CMD_SEEK:
        cmdSeek(m_seek_time);
        return true;

    case CMD_STOP:
        return false;

    default:
        assert(false);
        return false;
    }
}
Esempio n. 3
0
// todo: it is strange, but here we need to init SDL in main thread, not in command-stack om shadow thread.
void FFmpegPlayer::activateOutput()
{
    const PlayingStatus prevStatus = get_status();

    if (prevStatus == PLAYING)
        cmdPause();

    //pushCommand(CMD_ACTOUTPUT);
    cmdActivateOutput();

    if (prevStatus == PLAYING)
        cmdPlay();
}
Esempio n. 4
0
File: osd.c Progetto: FrMo/gravit
void osdHandlePlay(AG_Event *event) {
    cmdPlay(0);
    osdUpdate();
}