fixes...
authordoursse <doursse>
Mon, 6 Feb 2006 13:38:08 +0000 (13:38 +0000)
committerdoursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 6 Feb 2006 13:38:08 +0000 (13:38 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/emotion@20310 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/emotion_gstreamer.c
src/modules/emotion_gstreamer.h

index 074f50c..9989185 100644 (file)
@@ -1204,27 +1204,28 @@ new_decoded_pad_cb (GstElement *decodebin,
 static int
 _em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh)
 {
-  int fd;
-  int len;
-  void *buf[1];
-  unsigned char *frame_data;
-  Emotion_Gstreamer_Video *ev;
-  GstBuffer  *buffer;
-
-  ev = data;
-  fd = ecore_main_fd_handler_fd_get(fdh);
-
-  while ((len = read(fd, buf, sizeof(buf))) > 0)
-    {
-      if (len == sizeof(buf))
-        {
-          frame_data = buf[0];
-          buffer = buf[1];
-          _emotion_frame_new(ev->obj);
-          len = ((Emotion_Video_Sink *)ecore_list_goto_first(ev->video_sinks))->length_time;
-          _emotion_video_pos_update(ev->obj, ev->position, len);
+   int fd;
+   int len;
+   void *buf[1];
+   unsigned char *frame_data;
+   Emotion_Gstreamer_Video *ev;
+   GstBuffer  *buffer;
 
-        }
-    }
+   ev = data;
+   fd = ecore_main_fd_handler_fd_get(fdh);
+
+   while ((len = read(fd, buf, sizeof(buf))) > 0)
+     {
+        if (len == sizeof(buf))
+          {
+             Emotion_Video_Sink *vsink;
+
+             frame_data = buf[0];
+             buffer = buf[1];
+             _emotion_frame_new(ev->obj);
+             vsink = (Emotion_Video_Sink *)ecore_list_goto_index (ev->video_sinks, ev->video_sink_nbr);
+             _emotion_video_pos_update(ev->obj, ev->position, vsink->length_time);
+          }
+     }
    return 1;
 }
index cf106c3..98e6eb4 100644 (file)
@@ -49,7 +49,7 @@ struct _Emotion_Gstreamer_Video
   unsigned char    *obj_data;
 
   /* Characteristics of stream */
-  int               position;
+  double            position;
   double            ratio;
 
   volatile int      seek_to;