Merge pull request #1254 from pliablepixels/1253-zms-quit-cmd

1253 zms quit cmd.  Fixes #1253
This commit is contained in:
Kyle Johnson
2016-01-29 08:47:26 -07:00
3 changed files with 18 additions and 1 deletions

View File

@@ -1088,6 +1088,11 @@ void EventStream::processCommand( const CmdMsg *msg )
Debug( 1, "Got QUERY command, sending STATUS" );
break;
}
case CMD_QUIT :
{
Info ("User initiated exit - CMD_QUIT");
break;
}
default :
{
// Do nothing, for now
@@ -1125,6 +1130,9 @@ void EventStream::processCommand( const CmdMsg *msg )
exit( -1 );
}
}
// quit after sending a status, if this was a quit request
if ((MsgCommand)msg->msg_data[0]==CMD_QUIT)
exit(0);
updateFrameRate( (double)event_data->frame_count/event_data->duration );
}

View File

@@ -3922,6 +3922,11 @@ void MonitorStream::processCommand( const CmdMsg *msg )
Debug( 1, "Got SCALE command, to %d", scale );
break;
}
case CMD_QUIT :
{
Info ("User initiated exit - CMD_QUIT");
break;
}
case CMD_QUERY :
{
Debug( 1, "Got QUERY command, sending STATUS" );
@@ -3987,6 +3992,10 @@ void MonitorStream::processCommand( const CmdMsg *msg )
}
}
// quit after sending a status, if this was a quit request
if ((MsgCommand)msg->msg_data[0]==CMD_QUIT)
exit(0);
updateFrameRate( monitor->GetFPS() );
}

View File

@@ -57,7 +57,7 @@ protected:
} DataMsg;
typedef enum { MSG_CMD=1, MSG_DATA_WATCH, MSG_DATA_EVENT } MsgType;
typedef enum { CMD_NONE=0, CMD_PAUSE, CMD_PLAY, CMD_STOP, CMD_FASTFWD, CMD_SLOWFWD, CMD_SLOWREV, CMD_FASTREV, CMD_ZOOMIN, CMD_ZOOMOUT, CMD_PAN, CMD_SCALE, CMD_PREV, CMD_NEXT, CMD_SEEK, CMD_VARPLAY, CMD_GET_IMAGE, CMD_QUERY=99 } MsgCommand;
typedef enum { CMD_NONE=0, CMD_PAUSE, CMD_PLAY, CMD_STOP, CMD_FASTFWD, CMD_SLOWFWD, CMD_SLOWREV, CMD_FASTREV, CMD_ZOOMIN, CMD_ZOOMOUT, CMD_PAN, CMD_SCALE, CMD_PREV, CMD_NEXT, CMD_SEEK, CMD_VARPLAY, CMD_GET_IMAGE, CMD_QUIT, CMD_QUERY=99 } MsgCommand;
protected:
Monitor *monitor;