SVN revision: 20310
This commit is contained in:
doursse 2006-02-06 13:38:08 +00:00 committed by doursse
parent 16cc1e30ed
commit 67d2c74132
2 changed files with 21 additions and 20 deletions

View File

@ -1204,27 +1204,28 @@ new_decoded_pad_cb (GstElement *decodebin,
static int static int
_em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh) _em_fd_ev_active(void *data, Ecore_Fd_Handler *fdh)
{ {
int fd; int fd;
int len; int len;
void *buf[1]; void *buf[1];
unsigned char *frame_data; unsigned char *frame_data;
Emotion_Gstreamer_Video *ev; Emotion_Gstreamer_Video *ev;
GstBuffer *buffer; GstBuffer *buffer;
ev = data; ev = data;
fd = ecore_main_fd_handler_fd_get(fdh); fd = ecore_main_fd_handler_fd_get(fdh);
while ((len = read(fd, buf, sizeof(buf))) > 0) while ((len = read(fd, buf, sizeof(buf))) > 0)
{ {
if (len == sizeof(buf)) if (len == sizeof(buf))
{ {
frame_data = buf[0]; Emotion_Video_Sink *vsink;
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);
} 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; return 1;
} }

View File

@ -49,7 +49,7 @@ struct _Emotion_Gstreamer_Video
unsigned char *obj_data; unsigned char *obj_data;
/* Characteristics of stream */ /* Characteristics of stream */
int position; double position;
double ratio; double ratio;
volatile int seek_to; volatile int seek_to;