diff options
author | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-30 22:40:53 +0000 |
---|---|---|
committer | Michael Roitzsch <mroi@users.sourceforge.net> | 2003-10-30 22:40:53 +0000 |
commit | fe9eb37f05b677071f9de1b9e69c535aa2293d0b (patch) | |
tree | 54cbc02374f1fb4a466b360040a6b8a0a00d5674 | |
parent | deb61082227d4de4694578cdb96c156483c3cbac (diff) | |
download | xine-lib-fe9eb37f05b677071f9de1b9e69c535aa2293d0b.tar.gz xine-lib-fe9eb37f05b677071f9de1b9e69c535aa2293d0b.tar.bz2 |
* modify the engine slightly, so that the stream member in a video frame or
audio buffer can be NULL; this should be used to indicate that the frame/
buffer does not come directly from a stream, but was generated otherwise
(the most important result is that frames/buffers with stream NULL will not
be passed through metronom)
* modify visualization post plugins so they set the stream on the generated
frames to NULL, this avoids cluttering metronom, when playing a stream with
audio AND video AND a visualization post
* this also means modifying the way post plugins provide vpts values:
they have to calculate them themselves for now
CVS patchset: 5647
CVS date: 2003/10/30 22:40:53
-rw-r--r-- | src/post/goom/xine_goom.c | 34 | ||||
-rw-r--r-- | src/post/visualizations/Makefile.am | 2 | ||||
-rw-r--r-- | src/post/visualizations/fftgraph.c | 32 | ||||
-rw-r--r-- | src/post/visualizations/fftscope.c | 34 | ||||
-rw-r--r-- | src/post/visualizations/fooviz.c | 28 | ||||
-rw-r--r-- | src/post/visualizations/oscope.c | 31 | ||||
-rw-r--r-- | src/post/visualizations/visualizations.c | 4 | ||||
-rw-r--r-- | src/post/visualizations/visualizations.h | 29 | ||||
-rw-r--r-- | src/xine-engine/audio_out.c | 18 | ||||
-rw-r--r-- | src/xine-engine/audio_out.h | 5 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 35 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 3 |
12 files changed, 153 insertions, 102 deletions
diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c index af4746303..8ec4c4060 100644 --- a/src/post/goom/xine_goom.c +++ b/src/post/goom/xine_goom.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_goom.c,v 1.37 2003/10/23 20:12:34 mroi Exp $ + * $Id: xine_goom.c,v 1.38 2003/10/30 22:40:53 mroi Exp $ * * GOOM post plugin. * @@ -237,7 +237,7 @@ static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs, post_goom_out_t *output = (post_goom_out_t *)malloc(sizeof(post_goom_out_t)); post_goom_out_t *outputv = (post_goom_out_t *)malloc(sizeof(post_goom_out_t)); post_audio_port_t *port; - xine_cfg_entry_t fps_entry, width_entry, height_entry, use_asm_entry, csc_method_entry; + xine_cfg_entry_t fps_entry, width_entry, height_entry, csc_method_entry; if (!this || !input || !output || !outputv || !video_target || !video_target[0] || !audio_target || !audio_target[0] ) { @@ -471,20 +471,12 @@ static void goom_port_put_buffer (xine_audio_port_t *port_gen, int16_t *data; int8_t *data8; int samples_used = 0; - int64_t vpts = buf->vpts; + int64_t pts = buf->vpts; + int64_t vpts = 0; int i, j; uint8_t *dest_ptr; int width, height; - int64_t cur_vpts, diff; - /* HACK: compute a pts using metronom internals */ - if (!vpts) { - metronom_t *metronom = this->stream->metronom; - pthread_mutex_lock(&metronom->lock); - vpts = metronom->audio_vpts - metronom->vpts_offset; - pthread_mutex_unlock(&metronom->lock); - } - /* make a copy of buf data for private use */ if( this->buf.mem_size < buf->mem_size ) { this->buf.mem = realloc(this->buf.mem, buf->mem_size); @@ -540,14 +532,24 @@ static void goom_port_put_buffer (xine_audio_port_t *port_gen, frame->extra_info->invalid = 1; frame->bad_frame = 0; - frame->pts = vpts; - vpts = 0; frame->duration = 90000 * this->samples_per_frame / this->sample_rate; + if (!vpts) { + vpts = this->stream->metronom->audio_vpts; + frame->pts = pts; + frame->vpts = vpts; + pts = 0; + vpts += frame->duration; + } else { + frame->pts = 0; + frame->vpts = vpts; + vpts += frame->duration; + } this->sample_counter -= this->samples_per_frame; /* skip frames if there is less than LOW_MARK in audio output fifo */ { metronom_t *metronom = this->stream->metronom; + int64_t cur_vpts, diff; cur_vpts = metronom->clock->get_current_time(metronom->clock); pthread_mutex_lock(&metronom->lock); diff = metronom->audio_vpts - cur_vpts; @@ -622,10 +624,10 @@ static void goom_port_put_buffer (xine_audio_port_t *port_gen, } } - frame->draw(frame, stream); + frame->draw(frame, NULL); } else { frame->bad_frame = 1; - frame->draw(frame, stream); + frame->draw(frame, NULL); } frame->free(frame); diff --git a/src/post/visualizations/Makefile.am b/src/post/visualizations/Makefile.am index db07a7730..ba79640fe 100644 --- a/src/post/visualizations/Makefile.am +++ b/src/post/visualizations/Makefile.am @@ -11,4 +11,4 @@ xineplug_post_visualizations_la_SOURCES = \ xineplug_post_visualizations_la_LIBADD = $(XINE_LIB) xineplug_post_visualizations_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@ -lm -noinst_HEADERS = fft.h +noinst_HEADERS = fft.h visualizations.h diff --git a/src/post/visualizations/fftgraph.c b/src/post/visualizations/fftgraph.c index 96d3f758d..22179cec1 100644 --- a/src/post/visualizations/fftgraph.c +++ b/src/post/visualizations/fftgraph.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -20,7 +20,7 @@ * FftGraph Visualization Post Plugin For xine * by Thibaut Mattern (tmattern@noos.fr) * - * $Id: fftgraph.c,v 1.2 2003/09/14 12:59:27 tmattern Exp $ + * $Id: fftgraph.c,v 1.3 2003/10/30 22:40:53 mroi Exp $ * */ @@ -33,6 +33,7 @@ #include "xineutils.h" #include "post.h" #include "bswap.h" +#include "visualizations.h" #include "fft.h" #define FPS 20 @@ -334,17 +335,10 @@ static void fftgraph_port_put_buffer (xine_audio_port_t *port_gen, int16_t *data; int8_t *data8; int samples_used = 0; - uint64_t vpts = buf->vpts; + int64_t pts = buf->vpts; + int64_t vpts = 0; int i, c; - /* HACK: compute a pts using metronom internals */ - if (!vpts) { - metronom_t *metronom = this->stream->metronom; - pthread_mutex_lock(&metronom->lock); - vpts = metronom->audio_vpts - metronom->vpts_offset; - pthread_mutex_unlock(&metronom->lock); - } - /* make a copy of buf data for private use */ if( this->buf.mem_size < buf->mem_size ) { this->buf.mem = realloc(this->buf.mem, buf->mem_size); @@ -402,15 +396,23 @@ static void fftgraph_port_put_buffer (xine_audio_port_t *port_gen, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; frame->bad_frame = 0; - frame->pts = vpts; - vpts = 0; - frame->duration = 90000 * this->samples_per_frame / this->sample_rate; + if (!vpts) { + vpts = this->stream->metronom->audio_vpts; + frame->pts = pts; + frame->vpts = vpts; + pts = 0; + vpts += frame->duration; + } else { + frame->pts = 0; + frame->vpts = vpts; + vpts += frame->duration; + } this->sample_counter -= this->samples_per_frame; draw_fftgraph(this, frame); - frame->draw(frame, stream); + frame->draw(frame, NULL); frame->free(frame); } } while( this->sample_counter >= this->samples_per_frame ); diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index d7a48272d..4cdc8b93c 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -22,7 +22,7 @@ * * FFT code by Steve Haehnichen, originally licensed under GPL v1 * - * $Id: fftscope.c,v 1.16 2003/09/14 12:44:20 tmattern Exp $ + * $Id: fftscope.c,v 1.17 2003/10/30 22:40:53 mroi Exp $ * */ @@ -33,6 +33,7 @@ #include "xineutils.h" #include "post.h" #include "bswap.h" +#include "visualizations.h" #include "fft.h" #define FPS 20 @@ -83,7 +84,7 @@ struct post_plugin_fftscope_s { /* * Fade out a YUV pixel */ -void fade_out_yuv(uint8_t *y, uint8_t *u, uint8_t *v, float factor) { +static void fade_out_yuv(uint8_t *y, uint8_t *u, uint8_t *v, float factor) { #if 0 float r, g, b; @@ -373,17 +374,10 @@ static void fftscope_port_put_buffer (xine_audio_port_t *port_gen, int16_t *data; int8_t *data8; int samples_used = 0; - uint64_t vpts = buf->vpts; + int64_t pts = buf->vpts; + int64_t vpts = 0; int i, c; - /* HACK: compute a pts using metronom internals */ - if (!vpts) { - metronom_t *metronom = this->stream->metronom; - pthread_mutex_lock(&metronom->lock); - vpts = metronom->audio_vpts - metronom->vpts_offset; - pthread_mutex_unlock(&metronom->lock); - } - /* make a copy of buf data for private use */ if( this->buf.mem_size < buf->mem_size ) { this->buf.mem = realloc(this->buf.mem, buf->mem_size); @@ -441,15 +435,23 @@ static void fftscope_port_put_buffer (xine_audio_port_t *port_gen, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; frame->bad_frame = 0; - frame->pts = vpts; - vpts = 0; - frame->duration = 90000 * this->samples_per_frame / this->sample_rate; + if (!vpts) { + vpts = this->stream->metronom->audio_vpts; + frame->pts = pts; + frame->vpts = vpts; + pts = 0; + vpts += frame->duration; + } else { + frame->pts = 0; + frame->vpts = vpts; + vpts += frame->duration; + } this->sample_counter -= this->samples_per_frame; draw_fftscope(this, frame); - frame->draw(frame, stream); + frame->draw(frame, NULL); frame->free(frame); } } while( this->sample_counter >= this->samples_per_frame ); diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index f5da6f0ec..4b302f2df 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -23,7 +23,7 @@ * process. It simply paints the screen a solid color and rotates through * colors on each iteration. * - * $Id: fooviz.c,v 1.11 2003/10/23 20:12:35 mroi Exp $ + * $Id: fooviz.c,v 1.12 2003/10/30 22:40:53 mroi Exp $ * */ @@ -172,17 +172,10 @@ static void fooviz_port_put_buffer (xine_audio_port_t *port_gen, int16_t *data; int8_t *data8; int samples_used = 0; - uint64_t vpts = buf->vpts; + int64_t pts = buf->vpts; + int64_t vpts = 0; int i, j; - /* HACK: compute a pts using metronom internals */ - if (!vpts) { - metronom_t *metronom = this->stream->metronom; - pthread_mutex_lock(&metronom->lock); - vpts = metronom->audio_vpts - metronom->vpts_offset; - pthread_mutex_unlock(&metronom->lock); - } - /* make a copy of buf data for private use */ if( this->buf.mem_size < buf->mem_size ) { this->buf.mem = realloc(this->buf.mem, buf->mem_size); @@ -238,15 +231,24 @@ static void fooviz_port_put_buffer (xine_audio_port_t *port_gen, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; frame->bad_frame = 0; - frame->pts = vpts; - vpts = 0; frame->duration = 90000 * this->samples_per_frame / this->sample_rate; + if (!vpts) { + vpts = this->stream->metronom->audio_vpts; + frame->pts = pts; + frame->vpts = vpts; + pts = 0; + vpts += frame->duration; + } else { + frame->pts = 0; + frame->vpts = vpts; + vpts += frame->duration; + } this->sample_counter -= this->samples_per_frame; memset(frame->base[0], this->current_yuv_byte, FOO_WIDTH * FOO_HEIGHT * 2); this->current_yuv_byte += 3; - frame->draw(frame, stream); + frame->draw(frame, NULL); frame->free(frame); } } while( this->sample_counter >= this->samples_per_frame ); diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c index 3e2908d54..4f312ca49 100644 --- a/src/post/visualizations/oscope.c +++ b/src/post/visualizations/oscope.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2002 the xine project + * Copyright (C) 2000-2003 the xine project * * This file is part of xine, a free video player. * @@ -20,7 +20,7 @@ * Basic Oscilloscope Visualization Post Plugin For xine * by Mike Melanson (melanson@pcisys.net) * - * $Id: oscope.c,v 1.9 2003/08/04 03:47:11 miguelfreitas Exp $ + * $Id: oscope.c,v 1.10 2003/10/30 22:40:53 mroi Exp $ * */ @@ -29,6 +29,7 @@ #include "xine_internal.h" #include "xineutils.h" #include "post.h" +#include "visualizations.h" #define FPS 20 @@ -244,17 +245,10 @@ static void oscope_port_put_buffer (xine_audio_port_t *port_gen, int16_t *data; int8_t *data8; int samples_used = 0; - uint64_t vpts = buf->vpts; + int64_t pts = buf->vpts; + int64_t vpts = 0; int i, c; - /* HACK: compute a pts using metronom internals */ - if (!vpts) { - metronom_t *metronom = this->stream->metronom; - pthread_mutex_lock(&metronom->lock); - vpts = metronom->audio_vpts - metronom->vpts_offset; - pthread_mutex_unlock(&metronom->lock); - } - /* make a copy of buf data for private use */ if( this->buf.mem_size < buf->mem_size ) { this->buf.mem = realloc(this->buf.mem, buf->mem_size); @@ -306,15 +300,24 @@ static void oscope_port_put_buffer (xine_audio_port_t *port_gen, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; frame->bad_frame = 0; - frame->pts = vpts; - vpts = 0; frame->duration = 90000 * this->samples_per_frame / this->sample_rate; + if (!vpts) { + vpts = this->stream->metronom->audio_vpts; + frame->pts = pts; + frame->vpts = vpts; + pts = 0; + vpts += frame->duration; + } else { + frame->pts = 0; + frame->vpts = vpts; + vpts += frame->duration; + } this->sample_counter -= this->samples_per_frame; draw_oscope_dots(this); yuv444_to_yuy2(&this->yuv, frame->base[0], frame->pitches[0]); - frame->draw(frame, stream); + frame->draw(frame, NULL); frame->free(frame); } diff --git a/src/post/visualizations/visualizations.c b/src/post/visualizations/visualizations.c index 706b66695..4581f9f53 100644 --- a/src/post/visualizations/visualizations.c +++ b/src/post/visualizations/visualizations.c @@ -19,7 +19,7 @@ * * This file contains plugin entries for several visualization post plugins. * - * $Id: visualizations.c,v 1.7 2003/10/23 20:12:35 mroi Exp $ + * $Id: visualizations.c,v 1.8 2003/10/30 22:40:53 mroi Exp $ */ #ifdef HAVE_CONFIG_H @@ -29,6 +29,8 @@ #include "xine_internal.h" #include "post.h" +#include "visualizations.h" + void *oscope_init_plugin(xine_t *xine, void *data); void *fftscope_init_plugin(xine_t *xine, void *data); diff --git a/src/post/visualizations/visualizations.h b/src/post/visualizations/visualizations.h new file mode 100644 index 000000000..967d98c35 --- /dev/null +++ b/src/post/visualizations/visualizations.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2000-2003 the xine project + * + * This file is part of xine, a free video player. + * + * xine is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * xine is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * + * This file contains plugin entries for several visualization post plugins. + * + * $Id: visualizations.h,v 1.1 2003/10/30 22:40:53 mroi Exp $ + */ + +#include "xine_internal.h" + +void *oscope_init_plugin(xine_t *xine, void *data); +void *fftscope_init_plugin(xine_t *xine, void *data); +void *fftgraph_init_plugin(xine_t *xine, void *data); diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c index cec7eae9f..b925adc33 100644 --- a/src/xine-engine/audio_out.c +++ b/src/xine-engine/audio_out.c @@ -17,7 +17,7 @@ * along with self program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_out.c,v 1.148 2003/10/06 13:09:52 mroi Exp $ + * $Id: audio_out.c,v 1.149 2003/10/30 22:40:53 mroi Exp $ * * 22-8-2001 James imported some useful AC3 sections from the previous alsa driver. * (c) 2001 Andy Lo A Foe <andy@alsaplayer.org> @@ -1328,15 +1328,17 @@ static void ao_put_buffer (xine_audio_port_t *this_gen, } buf->stream = stream; - buf->format.bits = stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS]; - buf->format.rate = stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE]; - buf->format.mode = stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE]; - extra_info_merge( buf->extra_info, stream->audio_decoder_extra_info ); - + pts = buf->vpts; + + if (stream) { + buf->format.bits = stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS]; + buf->format.rate = stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE]; + buf->format.mode = stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE]; + extra_info_merge( buf->extra_info, stream->audio_decoder_extra_info ); + buf->vpts = stream->metronom->got_audio_samples(stream->metronom, pts, buf->num_frames); + } - buf->vpts = stream->metronom->got_audio_samples (stream->metronom, pts, - buf->num_frames); buf->extra_info->vpts = buf->vpts; lprintf ("ao_put_buffer, pts=%" PRId64 ", vpts=%" PRId64 ", flushmode=%d\n", diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index e7aba704e..e23f0d07b 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.h @@ -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: audio_out.h,v 1.58 2003/09/01 04:08:41 jcdutton Exp $ + * $Id: audio_out.h,v 1.59 2003/10/30 22:40:53 mroi Exp $ */ #ifndef HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H @@ -197,14 +197,13 @@ struct xine_audio_port_s { /* * get a piece of memory for audio data */ - audio_buffer_t * (*get_buffer) (xine_audio_port_t *); /* * append a buffer filled with audio data to the audio fifo * for output */ - + /* when the frame does not originate from a stream, it is legal to pass a NULL stream */ void (*put_buffer) (xine_audio_port_t *, audio_buffer_t *buf, xine_stream_t *stream); /* audio driver is no longer used by decoder => close */ diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 5fb08867e..edee8b9c8 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.175 2003/10/23 15:17:07 mroi Exp $ + * $Id: video_out.c,v 1.176 2003/10/30 22:40:53 mroi Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -328,11 +328,13 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { int frames_to_skip; img->stream = stream; - extra_info_merge( img->extra_info, stream->video_decoder_extra_info ); this->current_width = img->width; this->current_height = img->height; - stream->metronom->got_video_frame (stream->metronom, img); + if (stream) { + extra_info_merge( img->extra_info, stream->video_decoder_extra_info ); + stream->metronom->got_video_frame (stream->metronom, img); + } this->current_duration = img->duration; if (!this->grab_only) { @@ -364,7 +366,7 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { * smootly before starting to drop frames if the decoder is really too * slow. */ - if (stream->first_frame_flag == 2) + if (stream && stream->first_frame_flag == 2) this->frame_drop_cpt = 10; if (this->frame_drop_cpt) { @@ -432,9 +434,11 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { #ifdef LOG printf ("video_out: bad_frame\n"); #endif - pthread_mutex_lock( &stream->current_extra_info_lock ); - extra_info_merge( stream->current_extra_info, img->extra_info ); - pthread_mutex_unlock( &stream->current_extra_info_lock ); + if (stream) { + pthread_mutex_lock( &stream->current_extra_info_lock ); + extra_info_merge( stream->current_extra_info, img->extra_info ); + pthread_mutex_unlock( &stream->current_extra_info_lock ); + } this->num_frames_skipped++; } @@ -631,9 +635,11 @@ static void expire_frames (vos_t *this, int64_t cur_vpts) { img = vo_remove_from_img_buf_queue_int (this->display_img_buf_queue); - pthread_mutex_lock( &img->stream->current_extra_info_lock ); - extra_info_merge( img->stream->current_extra_info, img->extra_info ); - pthread_mutex_unlock( &img->stream->current_extra_info_lock ); + if (img->stream) { + pthread_mutex_lock( &img->stream->current_extra_info_lock ); + extra_info_merge( img->stream->current_extra_info, img->extra_info ); + pthread_mutex_unlock( &img->stream->current_extra_info_lock ); + } /* when flushing frames, keep the first one as backup */ if( this->discard_frames ) { @@ -761,7 +767,8 @@ static vo_frame_t *get_next_frame (vos_t *this, int64_t cur_vpts) { pthread_mutex_lock( &this->free_img_buf_queue->mutex ); if (img && !img->next) { - if (img->stream->stream_info[XINE_STREAM_INFO_VIDEO_HAS_STILL] || + if (!img->stream || + img->stream->stream_info[XINE_STREAM_INFO_VIDEO_HAS_STILL] || img->stream->video_fifo->size(img->stream->video_fifo) < 10) { #ifdef LOG @@ -798,14 +805,14 @@ static void overlay_and_display_frame (vos_t *this, if(!img->proc_called ) vo_frame_driver_proc(img); - pthread_mutex_lock( &img->stream->current_extra_info_lock ); - { + if (img->stream) { int64_t diff; + pthread_mutex_lock( &img->stream->current_extra_info_lock ); diff = img->extra_info->vpts - img->stream->current_extra_info->vpts; if ((diff > 3000) || (diff<-300000)) extra_info_merge( img->stream->current_extra_info, img->extra_info ); + pthread_mutex_unlock( &img->stream->current_extra_info_lock ); } - pthread_mutex_unlock( &img->stream->current_extra_info_lock ); if (this->overlay_source) { this->overlay_source->multiple_overlay_blend (this->overlay_source, diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 9eb663cca..3d84b933a 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -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.h,v 1.99 2003/10/23 15:17:07 mroi Exp $ + * $Id: video_out.h,v 1.100 2003/10/30 22:40:53 mroi Exp $ * * * xine version of video_out.h @@ -114,6 +114,7 @@ struct vo_frame_s { /* append this frame to the display queue, returns number of frames to skip if decoder is late */ + /* when the frame does not originate from a stream, it is legal to pass a NULL stream */ int (*draw) (vo_frame_t *vo_img, xine_stream_t *stream); /* lock frame as reference, must be paired with free. |