[Live-devel] Converting timeval to DateTime .NET
Alexey Vasilyev
servent at apollo.lv
Thu Dec 11 03:34:41 PST 2008
Hi,
I'm using Windows. Windows version uses QueryPerformanceCounter() in
GroupsockHelper.cpp.
I would like to know how can I convert a timeval presentationTime value in
function afterGettingFrame(..., struct timeval presentationTime) to .NET
DateTime ticks (number of ticks passed since 0001-01-01)?
In my afterGettingFrame(frameSize, presentationTime) function I made
a log call
LOG("Video frame received: %d bytes (%d:%d)\n"), frameSize,
presentationTime.tv_sec, presentationTime.tv_usec);
And the logs is
2008-12-11 14:30:09 Video frame received: 14796 bytes (8970:592115)
2008-12-11 14:30:09 Video frame received: 1050 bytes (8971:592259)
2008-12-11 14:30:10 Video frame received: 1031 bytes (8972:592403)
2008-12-11 14:30:12 Video frame received: 1074 bytes
(9745106:531920) <------ gap
2008-12-11 14:30:12 Video frame received: 1045 bytes (9745107:532064)
2008-12-11 14:30:13 Video frame received: 1040 bytes (9745108:532197)
2008-12-11 14:30:14 Video frame received: 1121 bytes (9745109:532341)
2008-12-11 14:30:15 Video frame received: 1121 bytes (9745110:532485)
2008-12-11 14:30:17 Video frame received: 14666 bytes (9745111:532618)
2008-12-11 14:30:17 Video frame received: 1132 bytes (9745112:532762)
2008-12-11 14:30:18 Video frame received: 1103 bytes (9745113:532895)
2008-12-11 14:30:19 Video frame received: 1100 bytes (9745114:533039)
It's not clear for me why there is a gap between 3rd and 4th record?
Is timeval an absolute value?
--
Best regards,
Alexey.
More information about the live-devel
mailing list