Re: I can't understand the difference output of only a line differ



Binary Chen wrote:
You don't know my situation. I am writing a media player which need to
copy the decoded bitmap into screen.
I am using gdk_draw_image to draw a GdkImage to the drawing area.
g_timeout_add is too slow because it need to update the screen  > 20
times/sec.
So I need to use a FAST blit to screen, which is only possible using
busy while... but only if the delay is very small using usleep(1), the
result is - no things on screen.
Image a situation that a thread is doing decoding and put the result in
somewhere memory, another thread drawing to GTK+ widget.

You don't seem to understand: You can not use a while loop. At all.
Ever! It simply won't work! Use something else, but _not_ the while loop!

tom




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]