diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-08-04 03:47:09 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-08-04 03:47:09 +0000 |
commit | ed3497a1e20f74c28afc2124480c60fbdbf37fab (patch) | |
tree | 6ae75337cac3aa191151001085ed21d12e11385c /src/xine-engine/video_out.c | |
parent | b0f659b58e295ab3c4b1bac9ed59e9cb3f29f308 (diff) | |
download | xine-lib-ed3497a1e20f74c28afc2124480c60fbdbf37fab.tar.gz xine-lib-ed3497a1e20f74c28afc2124480c60fbdbf37fab.tar.bz2 |
support for arbitrary aspect ratios
patch by Philip Jgenstedt
CVS patchset: 5243
CVS date: 2003/08/04 03:47:09
Diffstat (limited to 'src/xine-engine/video_out.c')
-rw-r--r-- | src/xine-engine/video_out.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index bc3373b58..6797023fa 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.166 2003/07/13 15:27:34 guenter Exp $ + * $Id: video_out.c,v 1.167 2003/08/04 03:47:11 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -266,7 +266,7 @@ static void vo_frame_driver_copy(vo_frame_t *img) static vo_frame_t *vo_get_frame (xine_video_port_t *this_gen, uint32_t width, uint32_t height, - int ratio, int format, + double ratio, int format, int flags) { vo_frame_t *img; @@ -1116,34 +1116,16 @@ int xine_get_next_video_frame (xine_video_port_t *this_gen, img = vo_remove_from_img_buf_queue_int (this->display_img_buf_queue); pthread_mutex_unlock(&this->display_img_buf_queue->mutex); - frame->vpts = img->vpts; - frame->duration = img->duration; - frame->width = img->width; - frame->height = img->height; - frame->pos_stream = img->extra_info->input_pos; - frame->pos_time = img->extra_info->input_time; - - switch (img->ratio) { - case XINE_VO_ASPECT_ANAMORPHIC: /* anamorphic */ - case XINE_VO_ASPECT_PAN_SCAN: /* we display pan&scan as widescreen */ - frame->aspect_ratio = 16.0 /9.0; - break; - case XINE_VO_ASPECT_DVB: /* 2.11:1 */ - frame->aspect_ratio = 2.11/1.0; - break; - case XINE_VO_ASPECT_SQUARE: /* square pels */ - case XINE_VO_ASPECT_DONT_TOUCH: /* probably non-mpeg stream => don't touch aspect ratio */ - frame->aspect_ratio = (double) img->width / (double) img->height; - break; - case 0: /* forbidden -> 4:3 */ - default: - case XINE_VO_ASPECT_4_3: /* 4:3 */ - frame->aspect_ratio = 4.0 / 3.0; - break; - } - frame->colorspace = img->format; - frame->data = img->base[0]; - frame->xine_frame = img; + frame->vpts = img->vpts; + frame->duration = img->duration; + frame->width = img->width; + frame->height = img->height; + frame->pos_stream = img->extra_info->input_pos; + frame->pos_time = img->extra_info->input_time; + frame->aspect_ratio = img->ratio; + frame->colorspace = img->format; + frame->data = img->base[0]; + frame->xine_frame = img; return 1; } |