summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/gstreamer/emotion_sink.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-10-13 09:24:45 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-10-13 09:24:45 +0000
commit7e30dac83a50fa38661e48c7d989987c8936e37a (patch)
tree7acaa34961716331cb2b8f82d3b2be8c1ebe8297 /legacy/emotion/src/modules/gstreamer/emotion_sink.c
parente2d8b7892db01b5ac7e2d4a7aa582a1dcac026c3 (diff)
emotion: use Ecore_X Video Atoms.
SVN revision: 64048
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_sink.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_sink.c b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
index cc0fe49fbe..ede6dcbbf7 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_sink.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
@@ -1055,9 +1055,11 @@ _video_move(void *data, Evas_Object *obj __UNUSED__, const Evas_Video_Surface *s
1055 Evas_Coord x, Evas_Coord y) 1055 Evas_Coord x, Evas_Coord y)
1056{ 1056{
1057 Emotion_Gstreamer_Video *ev = data; 1057 Emotion_Gstreamer_Video *ev = data;
1058 unsigned int pos[2];
1058 1059
1059 fprintf(stderr, "move: %i, %i\n", x, y); 1060 fprintf(stderr, "move: %i, %i\n", x, y);
1060 ecore_x_window_move(ev->win, x, y); 1061 pos[0] = x; pos[1] = y;
1062 ecore_x_window_prop_card32_set(ev->win, ECORE_X_ATOM_E_VIDEO_POSITION, pos, 2);
1061} 1063}
1062 1064
1063#if 0 1065#if 0
@@ -1099,6 +1101,7 @@ _video_show(void *data, Evas_Object *obj __UNUSED__, const Evas_Video_Surface *s
1099{ 1101{
1100 Emotion_Gstreamer_Video *ev = data; 1102 Emotion_Gstreamer_Video *ev = data;
1101 1103
1104 fprintf(stderr, "show xv\n");
1102 ecore_x_window_show(ev->win); 1105 ecore_x_window_show(ev->win);
1103 /* gst_pad_set_blocked_async(ev->teepad, TRUE, _block_pad_link_cb, ev); */ 1106 /* gst_pad_set_blocked_async(ev->teepad, TRUE, _block_pad_link_cb, ev); */
1104} 1107}
@@ -1108,6 +1111,7 @@ _video_hide(void *data, Evas_Object *obj __UNUSED__, const Evas_Video_Surface *s
1108{ 1111{
1109 Emotion_Gstreamer_Video *ev = data; 1112 Emotion_Gstreamer_Video *ev = data;
1110 1113
1114 fprintf(stderr, "hide xv\n");
1111 ecore_x_window_hide(ev->win); 1115 ecore_x_window_hide(ev->win);
1112 /* gst_pad_set_blocked_async(ev->teepad, TRUE, _block_pad_unlink_cb, ev); */ 1116 /* gst_pad_set_blocked_async(ev->teepad, TRUE, _block_pad_unlink_cb, ev); */
1113} 1117}
@@ -1200,7 +1204,7 @@ gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
1200 parent = (Ecore_X_Window) ecore_evas_window_get(ee); 1204 parent = (Ecore_X_Window) ecore_evas_window_get(ee);
1201 fprintf(stderr, "parent: %x\n", parent); 1205 fprintf(stderr, "parent: %x\n", parent);
1202 1206
1203 win = ecore_x_window_override_new(0, x, y, w, h); 1207 win = ecore_x_window_new(0, x, y, w, h);
1204 fprintf(stderr, "creating window: %x [%i, %i, %i, %i]\n", win, x, y, w, h); 1208 fprintf(stderr, "creating window: %x [%i, %i, %i, %i]\n", win, x, y, w, h);
1205 if (win) 1209 if (win)
1206 { 1210 {
@@ -1208,16 +1212,15 @@ gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
1208 xvsink = gst_element_factory_make("xvimagesink", NULL); 1212 xvsink = gst_element_factory_make("xvimagesink", NULL);
1209 if (xvsink) 1213 if (xvsink)
1210 { 1214 {
1211 Ecore_X_Atom atom; 1215 unsigned int pos[2];
1212 1216
1213 gst_x_overlay_set_window_handle(GST_X_OVERLAY(xvsink), win); 1217 gst_x_overlay_set_window_handle(GST_X_OVERLAY(xvsink), win);
1214 ev->win = win; 1218 ev->win = win;
1215 1219
1216 atom = ecore_x_atom_get("enlightenment.video"); 1220 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIDEO_PARENT, &parent, 1);
1217 if (atom) 1221
1218 { 1222 pos[0] = x; pos[1] = y;
1219 ecore_x_window_prop_card32_set(win, atom, &parent, 1); 1223 ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIDEO_POSITION, pos, 2);
1220 }
1221 } 1224 }
1222 else 1225 else
1223 { 1226 {