From b6860c1c38b03a0eb475195b9bdbd92b617f9e48 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 19 Jul 2004 04:50:14 +0000 Subject: [PATCH] grr - i'm trying to debug why xine locks up on closing/stopping/deleting a stream in elation but NOt in emotion when emotion_test shuts down. ok emotion_test: emotion_test dvd:// now once its played a bit of the dvd hit: q and it will quit destroy video objects then exit main loop and exit. now with elation: elation now put a dvd in the drive (or already have one) elation will detect this. now let it play a bit of the dvd, and hit "Escape" to eject the dvd (which will try delete thevideo object). elatiojn will get STUCK inside an emotion call whihc get stuckin the emotion_xine module call thsat gets stuck inside xine_stop(). now WHY. what is it about elation that triggers xine to go batty? git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/emotion@10910 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/emotion_test_main.c | 18 ++++++++++++++++++ src/modules/emotion_xine.c | 22 ++++++++++++++++------ src/modules/xine/emotion_xine_vo_out.c | 8 +++++++- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/src/bin/emotion_test_main.c b/src/bin/emotion_test_main.c index 256717d..1795e30 100644 --- a/src/bin/emotion_test_main.c +++ b/src/bin/emotion_test_main.c @@ -132,6 +132,13 @@ static int main_signal_exit(void *data, int ev_type, void *ev) { ecore_main_loop_quit(); + while (video_objs) + { + printf("del obj!\n"); + evas_object_del(video_objs->data); + video_objs = evas_list_remove_list(video_objs, video_objs); + printf("done\n"); + } return 1; } @@ -332,6 +339,17 @@ bg_key_down(void *data, Evas * e, Evas_Object * obj, void *event_info) else ecore_evas_borderless_set(ecore_evas, 0); } + else if (!strcmp(ev->keyname, "q")) + { + ecore_main_loop_quit(); + while (video_objs) + { + printf("del obj!\n"); + evas_object_del(video_objs->data); + video_objs = evas_list_remove_list(video_objs, video_objs); + printf("done\n"); + } + } else { printf("UNHANDLED: %s\n", ev->keyname); diff --git a/src/modules/emotion_xine.c b/src/modules/emotion_xine.c index 884662f..58ce04b 100644 --- a/src/modules/emotion_xine.c +++ b/src/modules/emotion_xine.c @@ -338,19 +338,29 @@ em_file_close(void *ef) pthread_cond_broadcast(&(ev->get_pos_len_cond)); while (ev->seek_to); while (ev->get_poslen); - ecore_main_fd_handler_del(ev->fd_handler); - close(ev->fd_write); - close(ev->fd_read); - ecore_main_fd_handler_del(ev->fd_ev_handler); - close(ev->fd_ev_write); - close(ev->fd_ev_read); + printf("EX pause...\n"); +// xine_set_param(ev->stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE); + printf("EX stop\n"); xine_stop(ev->stream); + printf("EX close\n"); xine_close(ev->stream); + printf("EX dispose\n"); xine_dispose(ev->stream); + printf("EX dispose evq\n"); xine_event_dispose_queue(ev->queue); + printf("EX close video drv\n"); if (ev->video) xine_close_video_driver(decoder, ev->video); + printf("EX close audio drv\n"); if (ev->audio) xine_close_audio_driver(decoder, ev->audio); + printf("EX del timer\n"); if (ev->timer) ecore_timer_del(ev->timer); + printf("EX del fds\n"); + ecore_main_fd_handler_del(ev->fd_handler); + close(ev->fd_write); + close(ev->fd_read); + ecore_main_fd_handler_del(ev->fd_ev_handler); + close(ev->fd_ev_write); + close(ev->fd_ev_read); free(ev); } diff --git a/src/modules/xine/emotion_xine_vo_out.c b/src/modules/xine/emotion_xine_vo_out.c index cfb212c..6564549 100644 --- a/src/modules/xine/emotion_xine_vo_out.c +++ b/src/modules/xine/emotion_xine_vo_out.c @@ -122,7 +122,8 @@ _emotion_class_init(xine_t *xine, void *visual) cl->driver_class.dispose = _emotion_class_dispose; cl->config = xine->config; cl->xine = xine; - + + printf("VO class init\n"); return cl; } @@ -133,6 +134,7 @@ _emotion_class_dispose(video_driver_class_t *driver_class) cl = (Emotion_Class *)driver_class; free(cl); + printf("VO class dispose\n"); } static char * @@ -183,6 +185,7 @@ _emotion_open(video_driver_class_t *driver_class, const void *visual) dv->vo_driver.dispose = _emotion_dispose; dv->vo_driver.redraw_needed = _emotion_redraw; dv->ev = (Emotion_Xine_Video *)visual; + printf("VO open\n"); return &dv->vo_driver; } @@ -194,6 +197,7 @@ _emotion_dispose(vo_driver_t *vo_driver) dv = (Emotion_Driver *)vo_driver; // printf("emotion: _emotion_dispose()\n"); free(dv); + printf("VO dispose\n"); } /***************************************************************************/ @@ -319,6 +323,7 @@ _emotion_frame_alloc(vo_driver_t *vo_driver) fr->vo_frame.dispose = _emotion_frame_dispose; fr->vo_frame.driver = vo_driver; + printf("VO frame alloc\n"); return (vo_frame_t *)fr; } @@ -328,6 +333,7 @@ _emotion_frame_dispose(vo_frame_t *vo_frame) Emotion_Frame *fr; fr = (Emotion_Frame *)vo_frame; + printf("VO frame dispose\n"); // printf("emotion: _emotion_frame_dispose()\n"); _emotion_frame_data_free(fr); free(fr); -- 2.7.4