summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/gstreamer/emotion_sink.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-10-21 15:00:41 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-10-21 15:00:41 +0000
commit321cbb17e9be81f790ee48be7a3f5a5f23d4c0c1 (patch)
tree962e227d19a9d6ee72bc35e947f734f71476ee96 /legacy/emotion/src/modules/gstreamer/emotion_sink.c
parent0acd0ff1003893d1271b162685b0673558e822e0 (diff)
emotion: disable direct rendering path if window manager doesn't handle it.
SVN revision: 64256
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_sink.c85
1 files changed, 44 insertions, 41 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_sink.c b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
index 623bb5ea5f..3e71d8fe1c 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_sink.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
@@ -1173,59 +1173,62 @@ gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
1173 } 1173 }
1174 1174
1175#if defined HAVE_ECORE_X && defined HAVE_XOVERLAY_H 1175#if defined HAVE_ECORE_X && defined HAVE_XOVERLAY_H
1176 engines = evas_render_method_list(); 1176 if (window_manager_video)
1177 {
1178 engines = evas_render_method_list();
1177 1179
1178 engine = eina_list_nth(engines, evas_output_method_get(evas_object_evas_get(obj)) - 1); 1180 engine = eina_list_nth(engines, evas_output_method_get(evas_object_evas_get(obj)) - 1);
1179 1181
1180 if (ev->priority && engine && strstr(engine, "_x11") != NULL) 1182 if (ev->priority && engine && strstr(engine, "_x11") != NULL)
1181 { 1183 {
1182 Ecore_Evas *ee; 1184 Ecore_Evas *ee;
1183 Evas_Coord x, y, w, h; 1185 Evas_Coord x, y, w, h;
1184 Ecore_X_Window win; 1186 Ecore_X_Window win;
1185 Ecore_X_Window parent; 1187 Ecore_X_Window parent;
1186 1188
1187 evas_object_geometry_get(obj, &x, &y, &w, &h); 1189 evas_object_geometry_get(obj, &x, &y, &w, &h);
1188 1190
1189 ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj)); 1191 ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
1190 1192
1191 if (w < 4) w = 4; 1193 if (w < 4) w = 4;
1192 if (h < 2) h = 2; 1194 if (h < 2) h = 2;
1193 1195
1194 /* Here we really need to have the help of the window manager, this code will change when we update E17. */ 1196 /* Here we really need to have the help of the window manager, this code will change when we update E17. */
1195 parent = (Ecore_X_Window) ecore_evas_window_get(ee); 1197 parent = (Ecore_X_Window) ecore_evas_window_get(ee);
1196 fprintf(stderr, "parent: %x\n", parent); 1198 fprintf(stderr, "parent: %x\n", parent);
1197 1199
1198 win = ecore_x_window_new(0, x, y, w, h); 1200 win = ecore_x_window_new(0, x, y, w, h);
1199 fprintf(stderr, "creating window: %x [%i, %i, %i, %i]\n", win, x, y, w, h); 1201 fprintf(stderr, "creating window: %x [%i, %i, %i, %i]\n", win, x, y, w, h);
1200 if (win) 1202 if (win)
1201 { 1203 {
1202 ecore_x_mwm_borderless_set(win, EINA_TRUE); 1204 /* ecore_x_mwm_borderless_set(win, EINA_TRUE); */
1203 ecore_x_window_show(win); 1205 ecore_x_window_hide(win);
1204 xvsink = gst_element_factory_make("xvimagesink", NULL); 1206 xvsink = gst_element_factory_make("xvimagesink", NULL);
1205 if (xvsink) 1207 if (xvsink)
1206 { 1208 {
1207 unsigned int pos[2]; 1209 unsigned int pos[2];
1208 1210
1209#ifdef HAVE_X_OVERLAY_SET 1211#ifdef HAVE_X_OVERLAY_SET
1210 gst_x_overlay_set_window_handle(GST_X_OVERLAY(xvsink), win); 1212 gst_x_overlay_set_window_handle(GST_X_OVERLAY(xvsink), win);
1211#else 1213#else
1212 gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(xvsink), win); 1214 gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(xvsink), win);
1213#endif 1215#endif
1214 ev->win = win; 1216 ev->win = win;
1215 1217
1216 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIDEO_PARENT, &parent, 1); 1218 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIDEO_PARENT, &parent, 1);
1217 1219
1218 pos[0] = x; pos[1] = y; 1220 pos[0] = x; pos[1] = y;
1219 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIDEO_POSITION, pos, 2); 1221 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIDEO_POSITION, pos, 2);
1220 } 1222 }
1221 else 1223 else
1222 { 1224 {
1223 fprintf(stderr, "destroying win: %x\n", win); 1225 fprintf(stderr, "destroying win: %x\n", win);
1224 ecore_x_window_free(win); 1226 ecore_x_window_free(win);
1225 } 1227 }
1226 } 1228 }
1229 }
1230 evas_render_method_list_free(engines);
1227 } 1231 }
1228 evas_render_method_list_free(engines);
1229#else 1232#else
1230# warning "no ecore_x or xoverlay" 1233# warning "no ecore_x or xoverlay"
1231#endif 1234#endif