Added CMD_VARPLAY to stream commands

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2687 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2008-11-03 13:16:47 +00:00
parent 287517a84f
commit 6d78b17d90
4 changed files with 19 additions and 1 deletions

View File

@ -2775,6 +2775,19 @@ void MonitorStream::processCommand( const CmdMsg *msg )
replay_rate = ZM_RATE_BASE;
break;
}
case CMD_VARPLAY :
{
Debug( 1, "Got VARPLAY command" );
if ( paused )
{
// Clear paused flag
paused = false;
// Set delayed_play flag
delayed = true;
}
replay_rate = msg->msg_data[1];
break;
}
case CMD_STOP :
{
Debug( 1, "Got STOP command" );

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_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_QUERY=99 } MsgCommand;
protected:
Monitor *monitor;

View File

@ -20,6 +20,10 @@ if ( !@socket_bind( $socket, $locSockFile ) )
switch ( $_REQUEST['command'] )
{
case CMD_VARPLAY :
//error_log( "Varplaying to ".$_REQUEST['rate'] );
$msg = pack( "lcc", MSG_CMD, $_REQUEST['command'], $_REQUEST['rate'] );
break;
case CMD_ZOOMIN :
//error_log( "Zooming to ".$_REQUEST['x'].",".$_REQUEST['y'] );
$msg = pack( "lcnn", MSG_CMD, $_REQUEST['command'], $_REQUEST['x'], $_REQUEST['y'] );

View File

@ -78,6 +78,7 @@ define( "CMD_SCALE", 11 );
define( "CMD_PREV", 12 );
define( "CMD_NEXT", 13 );
define( "CMD_SEEK", 14 );
define( "CMD_VARPLAY", 15 );
define( "CMD_QUERY", 99 );
//