summaryrefslogtreecommitdiff
path: root/legacy/emotion
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-12-28 16:08:38 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-12-28 16:08:38 +0000
commit8296e98d8b9e33445f1370d0a082303ebd6f9adf (patch)
treed024a0c6d66e408c6c0e280609deb0e94aadf029 /legacy/emotion
parent0229df2b1e0aa301a7479bac2022f97bb5fbedb7 (diff)
emotion: properly test the existence of an X connection in gstreamer backend.
SVN revision: 66606
Diffstat (limited to 'legacy/emotion')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c15
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
index 4382a4edfa..7296cbb656 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.c
@@ -10,6 +10,7 @@
10Eina_Bool window_manager_video = EINA_FALSE; 10Eina_Bool window_manager_video = EINA_FALSE;
11int _emotion_gstreamer_log_domain = -1; 11int _emotion_gstreamer_log_domain = -1;
12Eina_Bool debug_fps = EINA_FALSE; 12Eina_Bool debug_fps = EINA_FALSE;
13Eina_Bool _ecore_x_available = EINA_FALSE;
13 14
14/* Callbacks to get the eos */ 15/* Callbacks to get the eos */
15static void _for_each_tag (GstTagList const* list, gchar const* tag, void *data); 16static void _for_each_tag (GstTagList const* list, gchar const* tag, void *data);
@@ -1277,8 +1278,13 @@ module_open(Evas_Object *obj,
1277 eina_threads_init(); 1278 eina_threads_init();
1278 1279
1279#ifdef HAVE_ECORE_X 1280#ifdef HAVE_ECORE_X
1281 if (ecore_x_init(NULL) > 0)
1282 {
1283 _ecore_x_available = EINA_TRUE;
1284 }
1285
1280 /* Check if the window manager is able to handle our special Xv window. */ 1286 /* Check if the window manager is able to handle our special Xv window. */
1281 roots = ecore_x_window_root_list(&num); 1287 roots = _ecore_x_available ? ecore_x_window_root_list(&num) : NULL;
1282 if (roots && num > 0) 1288 if (roots && num > 0)
1283 { 1289 {
1284 Ecore_X_Window win, twin; 1290 Ecore_X_Window win, twin;
@@ -1334,6 +1340,13 @@ module_close(Emotion_Video_Module *module __UNUSED__,
1334{ 1340{
1335 em_module.shutdown(video); 1341 em_module.shutdown(video);
1336 1342
1343#ifdef HAVE_ECORE_X
1344 if (_ecore_x_available)
1345 {
1346 ecore_x_shutdown();
1347 }
1348#endif
1349
1337 eina_threads_shutdown(); 1350 eina_threads_shutdown();
1338} 1351}
1339 1352
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h
index 93a638d7d5..e69f30d486 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h
+++ b/legacy/emotion/src/modules/gstreamer/emotion_gstreamer.h
@@ -209,6 +209,7 @@ struct _Emotion_Gstreamer_Message
209extern Eina_Bool window_manager_video; 209extern Eina_Bool window_manager_video;
210extern Eina_Bool debug_fps; 210extern Eina_Bool debug_fps;
211extern int _emotion_gstreamer_log_domain; 211extern int _emotion_gstreamer_log_domain;
212extern Eina_Bool _ecore_x_available;
212#define DBG(...) EINA_LOG_DOM_DBG(_emotion_gstreamer_log_domain, __VA_ARGS__) 213#define DBG(...) EINA_LOG_DOM_DBG(_emotion_gstreamer_log_domain, __VA_ARGS__)
213#define INF(...) EINA_LOG_DOM_INFO(_emotion_gstreamer_log_domain, __VA_ARGS__) 214#define INF(...) EINA_LOG_DOM_INFO(_emotion_gstreamer_log_domain, __VA_ARGS__)
214#define WRN(...) EINA_LOG_DOM_WARN(_emotion_gstreamer_log_domain, __VA_ARGS__) 215#define WRN(...) EINA_LOG_DOM_WARN(_emotion_gstreamer_log_domain, __VA_ARGS__)