Vadim Lebedev wrote:
David Ferlier wrote:
Hi,
I wrote libtimer and libwebcam (along with mstute) for Classic. The
timer idea was ok and working great in most cases, but it highly
depended on the timer implementation we chose for each operating
system. On win32 there's timeSetEvent() which i believe uses kernel
timers. On Linux and others we used a thread that sleeped itself the
right time. While it worked apparently great it's hard to say if it
was really doing the right thing.
One thing i'm sure though, is that you're right when you say the new
approach causes problems; on all operating systems, you can't expect
sleep() to sleep the right amount of time.
I believe tanguy & philippe are responsible for the rewrite of
libwebcam in NG, maybe they'll tell you more.
I wonder if there is a way to implement a data driven approach:
Tell the driver the FPS value and doing blocking reads to get the
image.....
That's a very smart idea, it would work, at least with v4l.
Vadim
Matthias Schneider wrote:
Hi all,
comparing the V4L implementation of Wengophone classic
(libs/webcam/src/v4l-driver/WebcamV4l.cpp)
and NG (libs/webcam/src/v4l/V4LWebcamDriver.cpp) I noticed a
completely different architecture.
While classic makes use of a timer in order to trigger the capturing
of a frame, the NG driver
consists of a loop that sleep for 1/fps seconds and then captures a
frame. This rather simple
approach raises problems when trying to use higher frame rates (e.g.
desired framerate = 25 fps,
resulting in a sleep of 40ms - however an additional execution time
of 20 ms of the rest of the
loop results in a loop interval of 60ms on my machine, lowering the
framerate to a jittery 15
fps).
I would like to ask about the motivation of leaving the more
sophisticated (classic) approach in
favor of the new implementation which is not really usable for high
bitrates and quite
undeterministic.
Thanks in advance
Matthias Schneider
___________________________________________________________ Gesendet
von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden:
http://mail.yahoo.de
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel
--
David Ferlier -- [EMAIL PROTECTED]
"Humor is mankind's greatest blessing."
-- Mark Twain
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel