diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-11 12:51:17 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-11 12:51:17 +0000 |
commit | 1be50d15e9eb8314d9f4027eb257ccc63326174c (patch) | |
tree | fd13f0e7407b615a517b55f76a67d5004ed5521d /src/xine-engine | |
parent | 7b9330b8987615d53be79c1815d1bec6726d7d3c (diff) | |
download | xine-lib-1be50d15e9eb8314d9f4027eb257ccc63326174c.tar.gz xine-lib-1be50d15e9eb8314d9f4027eb257ccc63326174c.tar.bz2 |
get img_duration from video_out
CVS patchset: 3871
CVS date: 2003/01/11 12:51:17
Diffstat (limited to 'src/xine-engine')
-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 |
4 files changed, 14 insertions, 9 deletions
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); |