diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-10 13:12:20 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-10 13:12:20 +0000 |
commit | 519cd1f3de64e2992d3d7c2509f6c6e6ba575849 (patch) | |
tree | 320cef5ab43b180fa0a67326dfaab714f065a17f /src | |
parent | a83ab4380f72385d0c5022a17985513f6c86c537 (diff) | |
download | xine-lib-519cd1f3de64e2992d3d7c2509f6c6e6ba575849.tar.gz xine-lib-519cd1f3de64e2992d3d7c2509f6c6e6ba575849.tar.bz2 |
add width/height to vo_status
CVS patchset: 3853
CVS date: 2003/01/10 13:12:20
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/post.c | 7 | ||||
-rw-r--r-- | src/xine-engine/video_out.c | 11 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 5 | ||||
-rw-r--r-- | src/xine-engine/xine.c | 7 |
4 files changed, 20 insertions, 10 deletions
diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index 806fd50be..4727304c7 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.8 2003/01/02 12:05:19 mroi Exp $ + * $Id: post.c,v 1.9 2003/01/10 13:12:20 miguelfreitas Exp $ */ /* @@ -75,9 +75,10 @@ static void post_video_flush(xine_video_port_t *port_gen) { port->original_port->flush(port->original_port); } -static int post_video_status(xine_video_port_t *port_gen, xine_stream_t *stream) { +static int post_video_status(xine_video_port_t *port_gen, xine_stream_t *stream, + int *width, int *height) { post_video_port_t *port = (post_video_port_t *)port_gen; - return port->original_port->status(port->original_port, stream); + return port->original_port->status(port->original_port, stream, width, height); } 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 51b18a4cc..1336a6315 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.130 2003/01/08 21:21:12 miguelfreitas Exp $ + * $Id: video_out.c,v 1.131 2003/01/10 13:12:20 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -81,6 +81,8 @@ typedef struct { int overlay_enabled; extra_info_t *extra_info_base; /* used to free mem chunk */ + + int current_width, current_height; } vos_t; /* @@ -298,6 +300,8 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { 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); @@ -943,7 +947,8 @@ static void vo_close (xine_video_port_t *this_gen, xine_stream_t *stream) { pthread_mutex_unlock(&this->streams_lock); } -static int vo_status (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) { vos_t *this = (vos_t *) this_gen; xine_stream_t *cur; @@ -953,6 +958,8 @@ static int vo_status (xine_video_port_t *this_gen, xine_stream_t *stream) { for (cur = xine_list_first_content(this->streams); cur; cur = xine_list_next_content(this->streams)) if (cur == stream) { + *width = this->current_width; + *height = this->current_height; ret = 1; break; } diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 9c30d151a..a861732c5 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.77 2002/12/27 03:40:07 miguelfreitas Exp $ + * $Id: video_out.h,v 1.78 2003/01/10 13:12:21 miguelfreitas Exp $ * * * xine version of video_out.h @@ -174,7 +174,8 @@ struct xine_video_port_s { void (*flush) (xine_video_port_t *this); /* return true if port is opened for this stream */ - int (*status) (xine_video_port_t *this, xine_stream_t *stream); + int (*status) (xine_video_port_t *this, xine_stream_t *stream, + int *width, int *height); /* the driver in use */ vo_driver_t *driver; diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c index bccde1f51..7330d1df5 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.209 2003/01/10 11:57:19 miguelfreitas Exp $ + * $Id: xine.c,v 1.210 2003/01/10 13:12:21 miguelfreitas Exp $ * * top-level xine functions * @@ -289,12 +289,13 @@ 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; + if (!data) return 0; if (stream->video_out && - stream->video_out->status(stream->video_out, stream)) { + stream->video_out->status(stream->video_out, stream, &width, &height)) { /* register our stream at the new output port */ stream->video_out->close(stream->video_out, stream); new_port->open(new_port, stream); |