summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/video_decoder.c7
-rw-r--r--src/xine-engine/video_out.c27
-rw-r--r--src/xine-engine/xine.c13
3 files changed, 34 insertions, 13 deletions
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 270d2717b..5574bf57f 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.20 2001/06/09 17:07:22 guenter Exp $
+ * $Id: video_decoder.c,v 1.21 2001/06/14 09:19:44 guenter Exp $
*
*/
@@ -37,9 +37,12 @@ void *video_decoder_loop (void *this_gen) {
while (running) {
+ /* printf ("video_decoder: getting buffer...\n"); */
+
buf = this->video_fifo->get (this->video_fifo);
this->cur_input_pos = buf->input_pos;
-
+
+ /* printf ("video_decoder: got buffer %d\n", buf->type); */
/*
* Call update status callback function if
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 6ae8b7bc0..2e4f6cea2 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.16 2001/06/11 01:27:03 heikos Exp $
+ * $Id: video_out.c,v 1.17 2001/06/14 09:19:44 guenter Exp $
*
*/
@@ -130,6 +130,12 @@ static void vo_set_timer (uint32_t video_step) {
}
}
+void video_timer_handler (int hubba) {
+
+ signal (SIGALRM, video_timer_handler);
+
+}
+
static void *video_out_loop (void *this_gen) {
uint32_t cur_pts;
@@ -137,21 +143,26 @@ static void *video_out_loop (void *this_gen) {
vo_frame_t *img;
uint32_t video_step, video_step_new;
vo_instance_t *this = (vo_instance_t *) this_gen;
+ /*
sigset_t vo_mask;
int dummysignum;
+ */
/* printf ("%d video_out start\n", getpid()); */
-
+ /*
sigemptyset(&vo_mask);
sigaddset(&vo_mask, SIGALRM);
pthread_sigmask(SIG_BLOCK, &vo_mask, NULL);
+ */
+ signal (SIGALRM, video_timer_handler);
video_step = this->metronom->get_video_rate (this->metronom);
vo_set_timer (video_step);
while (this->video_loop_running) {
- sigwait(&vo_mask, &dummysignum); /* wait for next timer tick */
+ /* sigwait(&vo_mask, &dummysignum); */ /* wait for next timer tick */
+ pause ();
video_step_new = this->metronom->get_video_rate (this->metronom);
if (video_step_new != video_step) {
@@ -167,8 +178,9 @@ static void *video_out_loop (void *this_gen) {
img = this->display_img_buf_queue->first;
- if (!img)
+ if (!img) {
continue;
+ }
/*
* throw away expired frames
@@ -214,8 +226,9 @@ static void *video_out_loop (void *this_gen) {
* time to display frame 0 ?
*/
- if (diff<0)
+ if (diff<0) {
continue;
+ }
/*
@@ -310,8 +323,6 @@ 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;
@@ -336,8 +347,6 @@ static void vo_free_img_buffers (vo_instance_t *this) {
static void vo_exit (vo_instance_t *this) {
- printf ("vo_exit\n");
-
vo_free_img_buffers (this);
this->driver->exit (this->driver);
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 26352da6d..ebced5169 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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: xine.c,v 1.22 2001/06/04 17:13:36 guenter Exp $
+ * $Id: xine.c,v 1.23 2001/06/14 09:19:44 guenter Exp $
*
* top-level xine functions
*
@@ -317,22 +317,31 @@ void xine_exit (xine_t *this) {
* stop decoder threads
*/
+ printf ("xine_exit: stopping demuxer\n");
+
if(this->cur_demuxer_plugin) {
this->cur_demuxer_plugin->stop (this->cur_demuxer_plugin);
this->cur_demuxer_plugin = NULL;
}
+ printf ("xine_exit: closing input plugin\n");
+
if(this->cur_input_plugin) {
this->cur_input_plugin->close(this->cur_input_plugin);
this->cur_input_plugin = NULL;
}
+ printf ("xine_exit: shutdown audio\n");
+
audio_decoder_shutdown (this);
+
+ printf ("xine_exit: shutdown video\n");
+
video_decoder_shutdown (this);
this->status = XINE_QUIT;
- this->config->save (this->config);
+ printf ("xine_exit: bye!\n");
}
/*