From 2a517f1e7f8f969e831a00484de007a495340acf Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Sun, 3 Jun 2001 19:41:05 +0000 Subject: implemented vo_exit, frame_dispose CVS patchset: 119 CVS date: 2001/06/03 19:41:05 --- src/video_out/video_out_xv.c | 14 +++++++++++--- src/xine-engine/video_decoder.c | 3 +-- src/xine-engine/video_out.c | 26 ++++++++++++++------------ 3 files changed, 26 insertions(+), 17 deletions(-) (limited to 'src') diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 139816e24..9c4121467 100644 --- a/src/video_out/video_out_xv.c +++ b/src/video_out/video_out_xv.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_xv.c,v 1.32 2001/06/03 19:11:06 guenter Exp $ + * $Id: video_out_xv.c,v 1.33 2001/06/03 19:41:05 guenter Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -143,10 +143,18 @@ static void xv_frame_field (vo_frame_t *vo_img, int which_field) { static void xv_frame_dispose (vo_frame_t *vo_img) { - /* xv_frame_t *frame = (xv_frame_t *) vo_img ;*/ + xv_frame_t *frame = (xv_frame_t *) vo_img ; + xv_driver_t *this = (xv_driver_t *) vo_img->instance->driver; - /* FIXME: implement */ + XLockDisplay (this->display); + XShmDetach (this->display, &frame->shminfo); + XFree (frame->image); + XUnlockDisplay (this->display); + shmdt (frame->shminfo.shmaddr); + shmctl (frame->shminfo.shmid, IPC_RMID,NULL); + + free (frame); } diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index bacf7a15e..69f7ff6d1 100644 --- a/src/xine-engine/video_decoder.c +++ b/src/xine-engine/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.16 2001/06/03 18:08:56 guenter Exp $ + * $Id: video_decoder.c,v 1.17 2001/06/03 19:41:05 guenter Exp $ * */ @@ -145,7 +145,6 @@ void video_decoder_shutdown (xine_t *this) { pthread_join (this->video_thread, &p); - this->video_out->exit (this->video_out); } diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index e6c4204da..1d62d84b4 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out.c,v 1.12 2001/06/03 18:08:56 guenter Exp $ + * $Id: video_out.c,v 1.13 2001/06/03 19:41:05 guenter Exp $ * */ @@ -134,7 +134,7 @@ static void *video_out_loop (void *this_gen) { uint32_t cur_pts; int pts_absdiff, diff, absdiff, pts=0; - vo_frame_t *img; + vo_frame_t *img; uint32_t video_step, video_step_new; vo_instance_t *this = (vo_instance_t *) this_gen; sigset_t vo_mask; @@ -304,6 +304,8 @@ static vo_frame_t *vo_get_frame (vo_instance_t *this, static void vo_close (vo_instance_t *this) { + printf ("vo_close\n"); + if (this->video_loop_running) { void *p; @@ -313,26 +315,26 @@ static void vo_close (vo_instance_t *this) { } static void vo_free_img_buffers (vo_instance_t *this) { - /* vo_frame_t *img; */ + vo_frame_t *img; - /* FIXME - while ((img = remove_from_img_buf_queue_noblock (this->display_img_buf_queue))) { - gVideoDriver->dispose_image_buffer(img); + while (this->free_img_buf_queue->first) { + img = vo_remove_from_img_buf_queue (this->free_img_buf_queue); + img->dispose (img); } - while ((img = remove_from_img_buf_queue_noblock (this->free_img_buf_queue))) { - gVideoDriver->dispose_image_buffer(img); + while (this->display_img_buf_queue->first) { + img = vo_remove_from_img_buf_queue (this->display_img_buf_queue) ; + img->dispose (img); } - */ - } static void vo_exit (vo_instance_t *this) { - vo_close (this); + printf ("vo_exit\n"); + vo_free_img_buffers (this); - this->driver->exit (this->driver); + this->driver->exit (this->driver); } static void vo_frame_displayed (vo_frame_t *img) { -- cgit v1.2.3