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 14:59:22 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-10-21 14:59:22 +0000
commit0acd0ff1003893d1271b162685b0673558e822e0 (patch)
tree4f2432077d752229a992a8073584d7395e36f9a7 /legacy/emotion/src/modules/gstreamer/emotion_sink.c
parentce3a658ef7288c8ecc2ae36c05abdb23592f1771 (diff)
emotion: try to correctly fix the fill value.
SVN revision: 64255
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/modules/gstreamer/emotion_sink.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/legacy/emotion/src/modules/gstreamer/emotion_sink.c b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
index 70d2605cfe..623bb5ea5f 100644
--- a/legacy/emotion/src/modules/gstreamer/emotion_sink.c
+++ b/legacy/emotion/src/modules/gstreamer/emotion_sink.c
@@ -736,13 +736,12 @@ evas_video_sink_samsung_main_render(void *data)
736 736
737 evas_object_geometry_get(priv->o, NULL, NULL, &w, &h); 737 evas_object_geometry_get(priv->o, NULL, NULL, &w, &h);
738 738
739 send->ev->fill.width = stride * w / priv->width; 739 send->ev->fill.width = (double) stride / priv->width;
740 send->ev->fill.height = elevation * h / priv->height; 740 send->ev->fill.height = (double) elevation / priv->height;
741 741
742 evas_object_image_alpha_set(priv->o, 0); 742 evas_object_image_alpha_set(priv->o, 0);
743 evas_object_image_colorspace_set(priv->o, priv->eformat); 743 evas_object_image_colorspace_set(priv->o, priv->eformat);
744 evas_object_image_size_set(priv->o, stride, elevation); 744 evas_object_image_size_set(priv->o, stride, elevation);
745 evas_object_image_fill_set(priv->o, 0, 0, send->ev->fill.width, send->ev->fill.height);
746 745
747 _update_emotion_fps(send->ev); 746 _update_emotion_fps(send->ev);
748 747
@@ -779,9 +778,12 @@ evas_video_sink_samsung_main_render(void *data)
779 } 778 }
780 779
781 send->ev->ratio = (double) priv->width / (double) priv->height; 780 send->ev->ratio = (double) priv->width / (double) priv->height;
781 _emotion_frame_refill(send->ev->obj, send->ev->fill.width, send->ev->fill.height);
782 _emotion_frame_resize(send->ev->obj, priv->width, priv->height, send->ev->ratio); 782 _emotion_frame_resize(send->ev->obj, priv->width, priv->height, send->ev->ratio);
783 783
784 /* FIXME: why is last buffer not protected ? */ 784 buffer = gst_buffer_ref(buffer);
785 if (send->ev->last_buffer) gst_buffer_unref(send->ev->last_buffer);
786 send->ev->last_buffer = buffer;
785 787
786 exit_point: 788 exit_point:
787 emotion_gstreamer_buffer_free(send); 789 emotion_gstreamer_buffer_free(send);
@@ -1032,15 +1034,6 @@ _emotion_gstreamer_end(void *data, Ecore_Thread *thread)
1032} 1034}
1033 1035
1034static void 1036static void
1035_on_resize_fill(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
1036{
1037 Emotion_Gstreamer_Video *ev = data;
1038
1039 if (ev->samsung)
1040 evas_object_image_fill_set(obj, 0, 0, ev->fill.width, ev->fill.height);
1041}
1042
1043static void
1044_video_resize(void *data, Evas_Object *obj __UNUSED__, const Evas_Video_Surface *surface __UNUSED__, 1037_video_resize(void *data, Evas_Object *obj __UNUSED__, const Evas_Video_Surface *surface __UNUSED__,
1045 Evas_Coord w, Evas_Coord h) 1038 Evas_Coord w, Evas_Coord h)
1046{ 1039{
@@ -1117,7 +1110,7 @@ _video_hide(void *data, Evas_Object *obj __UNUSED__, const Evas_Video_Surface *s
1117} 1110}
1118 1111
1119static void 1112static void
1120_video_update_pixels(void *data, Evas_Object *obj, const Evas_Video_Surface *surface __UNUSED__) 1113_video_update_pixels(void *data, Evas_Object *obj __UNUSED__, const Evas_Video_Surface *surface __UNUSED__)
1121{ 1114{
1122 Emotion_Gstreamer_Video *ev = data; 1115 Emotion_Gstreamer_Video *ev = data;
1123 1116
@@ -1155,8 +1148,6 @@ gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
1155 return NULL; 1148 return NULL;
1156 } 1149 }
1157 1150
1158 evas_object_event_callback_del_full(obj, EVAS_CALLBACK_RESIZE, _on_resize_fill, ev);
1159
1160 if (!uri) 1151 if (!uri)
1161 return NULL; 1152 return NULL;
1162 1153
@@ -1208,6 +1199,7 @@ gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
1208 fprintf(stderr, "creating window: %x [%i, %i, %i, %i]\n", win, x, y, w, h); 1199 fprintf(stderr, "creating window: %x [%i, %i, %i, %i]\n", win, x, y, w, h);
1209 if (win) 1200 if (win)
1210 { 1201 {
1202 ecore_x_mwm_borderless_set(win, EINA_TRUE);
1211 ecore_x_window_show(win); 1203 ecore_x_window_show(win);
1212 xvsink = gst_element_factory_make("xvimagesink", NULL); 1204 xvsink = gst_element_factory_make("xvimagesink", NULL);
1213 if (xvsink) 1205 if (xvsink)
@@ -1318,7 +1310,6 @@ gstreamer_video_sink_new(Emotion_Gstreamer_Video *ev,
1318 g_object_set(G_OBJECT(playbin), "uri", uri, NULL); 1310 g_object_set(G_OBJECT(playbin), "uri", uri, NULL);
1319 1311
1320 evas_object_image_pixels_get_callback_set(obj, NULL, NULL); 1312 evas_object_image_pixels_get_callback_set(obj, NULL, NULL);
1321 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _on_resize_fill, ev);
1322 1313
1323 ev->stream = EINA_TRUE; 1314 ev->stream = EINA_TRUE;
1324 1315