Update of /cvsroot/playerstage/code/player/utils/playerv
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16705/playerv
Modified Files:
playerv.c
Log Message:
fixed elapsed time initialisation and calculation
Index: playerv.c
===================================================================
RCS file: /cvsroot/playerstage/code/player/utils/playerv/playerv.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** playerv.c 2 Nov 2007 18:09:20 -0000 1.52
--- playerv.c 1 Dec 2007 21:15:03 -0000 1.53
***************
*** 166,170 ****
device_t devices[PLAYER_MAX_DEVICES];
device_t *device;
- void *proxy;
struct timeval tv, tc = {0, 0};
struct timespec st = {0,0};
--- 166,169 ----
***************
*** 227,232 ****
return -1;
}
-
- gettimeofday(&tv, NULL);
}
--- 226,229 ----
***************
*** 316,319 ****
--- 313,320 ----
rtk_app_main_init(app);
+ // start out timer if in pull mode
+ if (0 != pull)
+ gettimeofday(&tv, NULL);
+
while (!quit)
{
***************
*** 332,336 ****
if (count > 0)
{
! proxy = playerc_client_read_nonblock(client);
}
}
--- 333,337 ----
if (count > 0)
{
! /*proxy = */playerc_client_read_nonblock(client);
}
}
***************
*** 339,348 ****
// we only want to request new data at roughly 20 Hz
gettimeofday(&tc, NULL);
! if ((tc.tv_sec > tv.tv_sec) || (tc.tv_usec > tv.tv_usec + 50000))
{
tv = tc;
// this requests a round of data from the server to be read
playerc_client_requestdata(client);
! proxy = playerc_client_read_nonblock(client);
}
else
--- 340,349 ----
// we only want to request new data at roughly 20 Hz
gettimeofday(&tc, NULL);
! if (((tc.tv_sec - tv.tv_sec)*1e6 + tc.tv_usec - tv.tv_usec) > 50000)
{
tv = tc;
// this requests a round of data from the server to be read
playerc_client_requestdata(client);
! playerc_client_read_nonblock(client);
}
else
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit