diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/metronom.c | 4 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 4 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 34 |
3 files changed, 33 insertions, 9 deletions
diff --git a/src/xine-engine/metronom.c b/src/xine-engine/metronom.c index 6dbac7d92..3871ddf68 100644 --- a/src/xine-engine/metronom.c +++ b/src/xine-engine/metronom.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: metronom.c,v 1.10 2001/06/24 02:19:29 guenter Exp $ + * $Id: metronom.c,v 1.11 2001/06/24 22:20:26 guenter Exp $ */ #ifdef HAVE_CONFIG_H @@ -297,7 +297,7 @@ static uint32_t metronom_got_video_frame (metronom_t *this, uint32_t pts) { * for too long */ - if ( !this->audio_stream_starting + if ( !this->audio_stream_starting && this->have_audio && (this->video_wrap_offset != this->audio_wrap_offset)) { this->wrap_diff_counter++; diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 2a6ba6cc6..77cc12e54 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.27 2001/06/24 04:32:36 guenter Exp $ + * $Id: video_decoder.c,v 1.28 2001/06/24 22:20:26 guenter Exp $ * */ @@ -43,7 +43,7 @@ void *video_decoder_loop (void *this_gen) { if (buf->input_pos) this->cur_input_pos = buf->input_pos; - /* printf ("video_decoder: got buffer %d\n", buf->type); */ + /* printf ("video_decoder: got buffer %d\n", buf->type); */ switch (buf->type) { case BUF_CONTROL_START: diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index b497799ce..80bfd7b83 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.25 2001/06/21 17:34:24 guenter Exp $ + * $Id: video_out.c,v 1.26 2001/06/24 22:20:26 guenter Exp $ * */ @@ -93,6 +93,7 @@ static vo_frame_t *vo_remove_from_img_buf_queue (img_buf_fifo_t *queue) { pthread_mutex_lock (&queue->mutex); while (!queue->first) { + /* printf ("video_out: queue %d empty...\n", queue); */ pthread_cond_wait (&queue->bNotEmpty, &queue->mutex); } @@ -235,10 +236,11 @@ static void *video_out_loop (void *this_gen) { img = vo_remove_from_img_buf_queue (this->display_img_buf_queue); pthread_mutex_lock (&img->mutex); + img->bDisplayLock = 0; + if (!img->bDecoderLock) vo_append_to_img_buf_queue (this->free_img_buf_queue, img); - img->bDisplayLock = 0; pthread_mutex_unlock (&img->mutex); img = this->display_img_buf_queue->first; @@ -276,9 +278,10 @@ static void *video_out_loop (void *this_gen) { pthread_mutex_unlock (&img->mutex); /* Overlay SPU FIXME: Check image format */ + this->spu_decoder->overlay_yuv (this->spu_decoder, pts, img->base[0], img->base[1], img->base[2]); - + xprintf (VERBOSE|VIDEO, "video_out : passing to video driver, image with pts = %d\n", pts); this->driver->display_frame (this->driver, img); } @@ -326,6 +329,11 @@ static vo_frame_t *vo_get_frame (vo_instance_t *this, vo_frame_t *img; + /* + printf ("video_out: get_frame %d x %d from queue %d\n", + width, height, this->free_img_buf_queue); + */ + if (this->pts_per_frame != duration) { this->pts_per_frame = duration; this->pts_per_half_frame = duration / 2; @@ -418,7 +426,10 @@ static int vo_frame_draw (vo_frame_t *img) { this->num_frames_delivered++; xprintf (VERBOSE|VIDEO,"video_out: got image. vpts for picture is %d\n", pic_vpts); - + /* + printf ("video_out: got image %d. vpts for picture is %d\n", + img, pic_vpts); + */ cur_vpts = this->metronom->get_current_time(this->metronom); diff = pic_vpts - cur_vpts; @@ -433,6 +444,12 @@ static int vo_frame_draw (vo_frame_t *img) { this->num_frames_discarded++; xprintf (VERBOSE|VIDEO, "vo_frame_draw: rejected, %d frames to skip\n", frames_to_skip); + pthread_mutex_lock (&img->mutex); + img->bDisplayLock = 0; + pthread_mutex_unlock (&img->mutex); + + vo_frame_displayed (img); + return frames_to_skip; } @@ -451,9 +468,16 @@ static int vo_frame_draw (vo_frame_t *img) { vo_append_to_img_buf_queue (this->display_img_buf_queue, img); - } else + } else { this->num_frames_skipped++; + pthread_mutex_lock (&img->mutex); + img->bDisplayLock = 0; + pthread_mutex_unlock (&img->mutex); + + vo_frame_displayed (img); + } + /* * performance measurement */ |