Multiple video displaying and WinGtk+.
- From: "www.hiebun.com" <bkna hiebun com>
- To: gdk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: Multiple video displaying and WinGtk+.
- Date: Mon, 12 Apr 2004 19:37:44 +0900
Hi all,
my application with Gtk+ 1.2 on linux runs without any bugs.
Now I am trying to port it on MS WinXP by DevC++.
Everything works well except mouse related ones.
Usually, I have the same error message,
"Gdk-ERROR **: file gdkgc-win32.c: line 1340 (gdk_gc_predraw):
>assertion failed: (data->xgc == NULL) aborting..."
My application is for displaying 16 channels of video clips
simultaneously with toggle buttons.
Without displaying of videos, there are not any error messages and it
looks fine.Only when displaying videos the program has errors.
Thus, I would think of bugs on "gdk_draw_rgb_image() or other related
gdk_draw_ _ _() functions" with mouse motions.
Of course, I had gdk_threads_enter() and gdk_threads_leave() before and
after the function. Exactly the same code (except OS related) works fine
on Linux OS.
First time my app. was like this;
Thread_vdo_display()
{
.....
gdk_threads_enter();
gdk_draw_rgb_image();
gdk_threads_leave();
....
}
main()
{
gtk_init();
...
functions to build buttons
...
for (i=0; i<20; i++)
pthread_create (.., Thread_vdo_display, ..);
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
}
After someone's help, I changed as below:
multi_vdo_display()
{
.....
gdk_threads_enter();
gdk_draw_rgb_image();
gdk_threads_leave();
....
}
Thread_vdo_display()
{
.....
g_idle_add (multi_vdo_display, data);
....
}
main()
{
gtk_init();
...
functions to build buttons
...
for (i=0; i<20; i++)
pthread_create (.., Thread_vdo_display, ..);
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
}
It does not have thread problems but consumes 99 % of CPU computing
powers and memory spaces as if I did not do free().
Also the responses of button toggling are so slow.
The original code does not have memory and CPU power consumptions but
thread problems.
The new one does not have thread related problems but memory and cpu
consumptions.
What did I do wrong?
Really WinGtk+ is not for multiple video displaying yet?
Any comment will be welcomed.
Regards,
bkna.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]