Discussion:
Win32 MultimediaTimer equivalent
(too old to reply)
Serge Wenger
2004-07-07 14:05:16 UTC
Permalink
Hello,

I try to port to Linux (in user-mode) an application with a MultimediaTimer.
Did somebody know the Linux equivalent?

Thanks

Serge
Dances With Crows
2004-07-07 14:57:10 UTC
Permalink
["Followup-To:" header set to comp.os.linux.misc.]
On Wed, 7 Jul 2004 16:05:16 +0200, Serge Wenger staggered into the Black
Post by Serge Wenger
I try to port to Linux (in user-mode) an application with a
MultimediaTimer. Did somebody know the Linux equivalent?
What's a MultimediaTimer do? OK, I have VC++ here at work... (MSDN
search) "MultimediaTimer": no topics found. Well, my MSDN library is a
little out of date. Maybe you should explain what it is you want to do,
instead of throwing out a Windows function name.

If I were you, I'd take a look at the man pages for nanosleep() and
setitimer() . Or take a look at the mplayer source code. HTH,
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
Serge Wenger
2004-07-07 15:18:20 UTC
Permalink
Post by Dances With Crows
["Followup-To:" header set to comp.os.linux.misc.]
On Wed, 7 Jul 2004 16:05:16 +0200, Serge Wenger staggered into the Black
Post by Serge Wenger
I try to port to Linux (in user-mode) an application with a
MultimediaTimer. Did somebody know the Linux equivalent?
What's a MultimediaTimer do? OK, I have VC++ here at work... (MSDN
search) "MultimediaTimer": no topics found. Well, my MSDN library is a
little out of date. Maybe you should explain what it is you want to do,
instead of throwing out a Windows function name.
Sorry for the "MultimediaTimer", it is Multimedia Timer.One of the function
is timeSetEvent.What I try to do is that my callback function is called
every 5 or 10ms (with a minimum of jitter).
Post by Dances With Crows
If I were you, I'd take a look at the man pages for nanosleep() and
setitimer() . Or take a look at the mplayer source code. HTH,
I will try setitimer, but did you know the jitter for a particular
processor?

Thanks

Serge
Dances With Crows
2004-07-07 16:59:38 UTC
Permalink
["Followup-To:" header set to comp.os.linux.misc.]
On Wed, 7 Jul 2004 17:18:20 +0200, Serge Wenger staggered into the Black
Post by Serge Wenger
Post by Dances With Crows
On Wed, 7 Jul 2004 16:05:16 +0200, Serge Wenger staggered into the Black
Post by Serge Wenger
I try to port to Linux (in user-mode) an application with a
MultimediaTimer. Did somebody know the Linux equivalent?
What's a MultimediaTimer do? OK, I have VC++ here at work... (MSDN
Sorry for the "MultimediaTimer", it is Multimedia Timer.One of the
function is timeSetEvent.What I try to do is that my callback function
is called every 5 or 10ms (with a minimum of jitter).
OK, that might work, but the man page for setitimer() says that the
current system timer resolution is 10ms. You'll probably have to try it
and see.
Post by Serge Wenger
Post by Dances With Crows
If I were you, I'd take a look at the man pages for nanosleep() and
setitimer() . Or take a look at the mplayer source code. HTH,
I will try setitimer, but did you know the jitter for a particular
processor?
No. That's why I asked if you'd looked at the mplayer source; the
mplayer developers have had to do something similar to what you're doing
for good A/V sync. If you can look at their code and figure out what
they did, you may be able to get your application working with a minimum
of reinventing the wheel. HTH,
--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin / mail: TRAP + SPAN don't belong
http://www.brainbench.com / Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume
Loading...