diff options
-rw-r--r-- | src/libsputext/xine_decoder.c | 15 | ||||
-rw-r--r-- | src/xine-engine/post.c | 6 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 7 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 4 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 6 |
5 files changed, 18 insertions, 20 deletions
diff --git a/src/libsputext/xine_decoder.c b/src/libsputext/xine_decoder.c index e824e1ea2..311f7e3dc 100644 --- a/src/libsputext/xine_decoder.c +++ b/src/libsputext/xine_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: xine_decoder.c,v 1.45 2003/01/11 12:25:10 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.46 2003/01/11 12:52:03 miguelfreitas Exp $ * */ @@ -215,21 +215,14 @@ static void spudec_decode_data (spu_decoder_t *this_gen, buf_element_t *buf) { do { /* initialize decoder if needed */ - if( !this->width || !this->height ) { + if( !this->width || !this->height || !this->img_duration ) { if( this->stream->video_out->status(this->stream->video_out, NULL, - &this->width, &this->height )) { + &this->width, &this->height, &this->img_duration )) { - if( this->width && this->height ) { + if( this->width && this->height && this->img_duration ) { this->renderer = this->stream->osd_renderer; - if( this->stream->master_stream ) - this->img_duration = this->stream->master_stream->metronom->get_option( - this->stream->master_stream->metronom, METRONOM_FRAME_DURATION); - else - this->img_duration = this->stream->metronom->get_option( - this->stream->metronom, METRONOM_FRAME_DURATION); - this->osd = NULL; update_font_size (this); diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index 4727304c7..a7091c6b7 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.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: post.c,v 1.9 2003/01/10 13:12:20 miguelfreitas Exp $ + * $Id: post.c,v 1.10 2003/01/11 12:51:17 miguelfreitas Exp $ */ /* @@ -76,9 +76,9 @@ static void post_video_flush(xine_video_port_t *port_gen) { } static int post_video_status(xine_video_port_t *port_gen, xine_stream_t *stream, - int *width, int *height) { + int *width, int *height, int64_t *img_duration) { post_video_port_t *port = (post_video_port_t *)port_gen; - return port->original_port->status(port->original_port, stream, width, height); + return port->original_port->status(port->original_port, stream, width, height, img_duration); } post_video_port_t *post_intercept_video_port(post_plugin_t *post, xine_video_port_t *original) { diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 336242c3d..44dc1282b 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.133 2003/01/11 03:47:01 miguelfreitas Exp $ + * $Id: video_out.c,v 1.134 2003/01/11 12:51:18 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -83,6 +83,7 @@ typedef struct { extra_info_t *extra_info_base; /* used to free mem chunk */ int current_width, current_height; + int64_t current_duration; } vos_t; /* @@ -304,6 +305,7 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { this->current_height = img->height; stream->metronom->got_video_frame (stream->metronom, img); + this->current_duration = img->duration; pic_vpts = img->vpts; img->extra_info->vpts = img->vpts; @@ -955,7 +957,7 @@ static void vo_close (xine_video_port_t *this_gen, xine_stream_t *stream) { } static int vo_status (xine_video_port_t *this_gen, xine_stream_t *stream, - int *width, int *height) { + int *width, int *height, int64_t *img_duration) { vos_t *this = (vos_t *) this_gen; xine_stream_t *cur; @@ -967,6 +969,7 @@ static int vo_status (xine_video_port_t *this_gen, xine_stream_t *stream, if (cur == stream || !stream) { *width = this->current_width; *height = this->current_height; + *img_duration = this->current_duration; ret = 1; break; } diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index a861732c5..6d453689b 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.78 2003/01/10 13:12:21 miguelfreitas Exp $ + * $Id: video_out.h,v 1.79 2003/01/11 12:51:18 miguelfreitas Exp $ * * * xine version of video_out.h @@ -175,7 +175,7 @@ struct xine_video_port_s { /* return true if port is opened for this stream */ int (*status) (xine_video_port_t *this, xine_stream_t *stream, - int *width, int *height); + int *width, int *height, int64_t *img_duration); /* the driver in use */ vo_driver_t *driver; diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index 2df867c5d..02da19b60 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.213 2003/01/11 03:47:01 miguelfreitas Exp $ + * $Id: xine.c,v 1.214 2003/01/11 12:51:19 miguelfreitas Exp $ * * top-level xine functions * @@ -293,12 +293,14 @@ static int xine_stream_rewire_video(xine_post_out_t *output, void *data) xine_stream_t *stream = (xine_stream_t *)output->data; xine_video_port_t *new_port = (xine_video_port_t *)data; int width, height; + int64_t img_duration; if (!data) return 0; if (stream->video_out && - stream->video_out->status(stream->video_out, stream, &width, &height)) { + stream->video_out->status(stream->video_out, stream, + &width, &height, &img_duration)) { /* register our stream at the new output port */ stream->video_out->close(stream->video_out, stream); new_port->open(new_port, stream); |