Changed types/order of stream status structs to work on 64 bit systems.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2797 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2009-03-08 14:34:09 +00:00
parent 8613dc8f81
commit 73ad3a7097
3 changed files with 10 additions and 10 deletions

View File

@ -1034,18 +1034,18 @@ void EventStream::processCommand( const CmdMsg *msg )
}
struct {
int event;
bool paused;
time_t progress;
int progress;
int rate;
int zoom;
bool paused;
} status_data;
status_data.event = event_data->event_id;
status_data.paused = paused;
status_data.progress = event_data->frames[curr_frame_id-1].offset;
status_data.progress = (int)event_data->frames[curr_frame_id-1].offset;
status_data.rate = replay_rate;
status_data.zoom = zoom;
Debug( 2, "E:%d, P:%d, p:%ld R:%d, Z:%d",
status_data.paused = paused;
Debug( 2, "E:%d, P:%d, p:%d R:%d, Z:%d",
status_data.event,
status_data.paused,
status_data.progress,

View File

@ -3132,14 +3132,14 @@ void MonitorStream::processCommand( const CmdMsg *msg )
struct {
int id;
double fps;
int state;
double fps;
int buffer_level;
bool delayed;
bool paused;
int rate;
double delay;
int zoom;
bool delayed;
bool paused;
bool enabled;
bool forced;
} status_data;

View File

@ -91,7 +91,7 @@ switch ( $data['type'] )
{
case MSG_DATA_WATCH :
{
$data = unpack( "ltype/imonitor/dfps/istate/ilevel/Cdelayed/Cpaused/C/C/irate/ddelay/izoom/Cenabled/Cforced", $msg );
$data = unpack( "ltype/imonitor/istate/dfps/ilevel/irate/ddelay/izoom/Cdelayed/Cpaused/Cenabled/Cforced", $msg );
$data['fps'] = sprintf( "%.2f", $data['fps'] );
$data['rate'] /= RATE_BASE;
$data['delay'] = sprintf( "%.2f", $data['delay'] );
@ -101,7 +101,7 @@ switch ( $data['type'] )
}
case MSG_DATA_EVENT :
{
$data = unpack( "ltype/ievent/Cpaused/C/C/C/iprogress/irate/izoom", $msg );
$data = unpack( "ltype/ievent/iprogress/irate/izoom/Cpaused", $msg );
//$data['progress'] = sprintf( "%.2f", $data['progress'] );
$data['rate'] /= RATE_BASE;
$data['zoom'] = sprintf( "%.1f", $data['zoom']/SCALE_BASE );