diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2010-10-15 16:45:21 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-10-15 11:30:49 +0100 |
commit | 13a702e9e572a2dc9f6b52a1531a2237d4d98ff1 (patch) | |
tree | bc29e988d666341a1efd8823fa1a2c406985ba81 /meta | |
parent | 485839d873287176a3c816c90ea2b5514268d7d5 (diff) | |
download | poky-13a702e9e572a2dc9f6b52a1531a2237d4d98ff1.tar.gz |
Use gdk_threads_enter/gdk_threads_leave to ensure gtk multithread safe
If the video player tries to play an unknown type file, it will enter
the error_cb() function, which is called in another thread.
Use gdk_threads_enter/gdk_threads_leave to ensure the safe of gtk
multi-thread operation.
This fixes [BUGID #474]
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch | 38 | ||||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/owl-video-widget.desktop (renamed from meta/recipes-sato/owl-video-widget/files/owl-video-widget.desktop) | 0 | ||||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/owl-video-widget.png (renamed from meta/recipes-sato/owl-video-widget/files/owl-video-widget.png) | bin | 4923 -> 4923 bytes | |||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/stock_media-play.png (renamed from meta/recipes-sato/owl-video-widget/files/stock_media-play.png) | bin | 329 -> 329 bytes | |||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/stock_volume-0.png (renamed from meta/recipes-sato/owl-video-widget/files/stock_volume-0.png) | bin | 570 -> 570 bytes | |||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/stock_volume-max.png (renamed from meta/recipes-sato/owl-video-widget/files/stock_volume-max.png) | bin | 689 -> 689 bytes | |||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/stock_volume-med.png (renamed from meta/recipes-sato/owl-video-widget/files/stock_volume-med.png) | bin | 630 -> 630 bytes | |||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video/stock_volume-min.png (renamed from meta/recipes-sato/owl-video-widget/files/stock_volume-min.png) | bin | 570 -> 570 bytes | |||
-rw-r--r-- | meta/recipes-sato/owl-video-widget/owl-video_svn.bb | 3 |
9 files changed, 40 insertions, 1 deletions
diff --git a/meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch b/meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch new file mode 100644 index 0000000000..e153c5e3b9 --- /dev/null +++ b/meta/recipes-sato/owl-video-widget/owl-video/gtk_multithread_safe.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Use gdk_threads_enter/gdk_threads_leave to ensure gtk multithread safe | ||
2 | |||
3 | If the video player tries to play an unknown type file, it will enter | ||
4 | the error_cb() function, which is called in another thread. | ||
5 | Use gdk_threads_enter/gdk_threads_leave to ensure the safe of gtk | ||
6 | multi-thread operation. | ||
7 | |||
8 | Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> | ||
9 | |||
10 | diff -ruN video-orig/src/video.c video/src/video.c | ||
11 | --- video-orig/src/video.c 2010-10-15 16:07:26.522346398 +0800 | ||
12 | +++ video/src/video.c 2010-10-15 16:25:51.780296717 +0800 | ||
13 | @@ -96,6 +96,7 @@ | ||
14 | { | ||
15 | GtkWidget *dialog; | ||
16 | |||
17 | + gdk_threads_enter(); | ||
18 | dialog = gtk_message_dialog_new (data->window, | ||
19 | GTK_DIALOG_NO_SEPARATOR, | ||
20 | GTK_MESSAGE_ERROR, | ||
21 | @@ -103,6 +104,7 @@ | ||
22 | error->message); | ||
23 | gtk_dialog_run (GTK_DIALOG (dialog)); | ||
24 | gtk_widget_destroy (dialog); | ||
25 | + gdk_threads_leave(); | ||
26 | } | ||
27 | |||
28 | /** | ||
29 | @@ -606,7 +608,9 @@ | ||
30 | |||
31 | gtk_widget_show_all (GTK_WIDGET (data->window)); | ||
32 | |||
33 | + gdk_threads_enter(); | ||
34 | gtk_main (); | ||
35 | + gdk_threads_leave(); | ||
36 | |||
37 | /** | ||
38 | * Cleanup. | ||
diff --git a/meta/recipes-sato/owl-video-widget/files/owl-video-widget.desktop b/meta/recipes-sato/owl-video-widget/owl-video/owl-video-widget.desktop index e7af07ee64..e7af07ee64 100644 --- a/meta/recipes-sato/owl-video-widget/files/owl-video-widget.desktop +++ b/meta/recipes-sato/owl-video-widget/owl-video/owl-video-widget.desktop | |||
diff --git a/meta/recipes-sato/owl-video-widget/files/owl-video-widget.png b/meta/recipes-sato/owl-video-widget/owl-video/owl-video-widget.png index f463fe1864..f463fe1864 100644 --- a/meta/recipes-sato/owl-video-widget/files/owl-video-widget.png +++ b/meta/recipes-sato/owl-video-widget/owl-video/owl-video-widget.png | |||
Binary files differ | |||
diff --git a/meta/recipes-sato/owl-video-widget/files/stock_media-play.png b/meta/recipes-sato/owl-video-widget/owl-video/stock_media-play.png index c2b9c582a1..c2b9c582a1 100644 --- a/meta/recipes-sato/owl-video-widget/files/stock_media-play.png +++ b/meta/recipes-sato/owl-video-widget/owl-video/stock_media-play.png | |||
Binary files differ | |||
diff --git a/meta/recipes-sato/owl-video-widget/files/stock_volume-0.png b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-0.png index f3f57143d4..f3f57143d4 100644 --- a/meta/recipes-sato/owl-video-widget/files/stock_volume-0.png +++ b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-0.png | |||
Binary files differ | |||
diff --git a/meta/recipes-sato/owl-video-widget/files/stock_volume-max.png b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-max.png index 03f5a03b45..03f5a03b45 100644 --- a/meta/recipes-sato/owl-video-widget/files/stock_volume-max.png +++ b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-max.png | |||
Binary files differ | |||
diff --git a/meta/recipes-sato/owl-video-widget/files/stock_volume-med.png b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-med.png index f774e42bb1..f774e42bb1 100644 --- a/meta/recipes-sato/owl-video-widget/files/stock_volume-med.png +++ b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-med.png | |||
Binary files differ | |||
diff --git a/meta/recipes-sato/owl-video-widget/files/stock_volume-min.png b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-min.png index f3f57143d4..f3f57143d4 100644 --- a/meta/recipes-sato/owl-video-widget/files/stock_volume-min.png +++ b/meta/recipes-sato/owl-video-widget/owl-video/stock_volume-min.png | |||
Binary files differ | |||
diff --git a/meta/recipes-sato/owl-video-widget/owl-video_svn.bb b/meta/recipes-sato/owl-video-widget/owl-video_svn.bb index 50027f5f20..07c52ef327 100644 --- a/meta/recipes-sato/owl-video-widget/owl-video_svn.bb +++ b/meta/recipes-sato/owl-video-widget/owl-video_svn.bb | |||
@@ -9,11 +9,12 @@ SECTION = "x11" | |||
9 | DEPENDS = "libowl-av" | 9 | DEPENDS = "libowl-av" |
10 | 10 | ||
11 | PV = "0.0+svnr${SRCREV}" | 11 | PV = "0.0+svnr${SRCREV}" |
12 | PR = "r1" | 12 | PR = "r2" |
13 | 13 | ||
14 | S = "${WORKDIR}/video" | 14 | S = "${WORKDIR}/video" |
15 | 15 | ||
16 | SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=video;proto=http \ | 16 | SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=video;proto=http \ |
17 | file://gtk_multithread_safe.patch \ | ||
17 | file://owl-video-widget.png \ | 18 | file://owl-video-widget.png \ |
18 | file://stock_media-play.png \ | 19 | file://stock_media-play.png \ |
19 | file://stock_volume-0.png \ | 20 | file://stock_volume-0.png \ |