diff options
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/jpeg_enc.c | 25 | ||||
-rw-r--r-- | libvo/jpeg_enc.h | 25 | ||||
-rw-r--r-- | libvo/spuenc.c | 13 | ||||
-rw-r--r-- | libvo/spuenc.h | 13 | ||||
-rw-r--r-- | libvo/video_out_internal.h | 32 | ||||
-rw-r--r-- | libvo/vo_3dfx.c | 38 | ||||
-rw-r--r-- | libvo/vo_directx.c | 22 | ||||
-rw-r--r-- | libvo/vo_gl.c | 31 | ||||
-rw-r--r-- | libvo/vo_ivtv.c | 37 | ||||
-rw-r--r-- | libvo/vo_jpeg.c | 25 | ||||
-rw-r--r-- | libvo/vo_md5sum.c | 23 | ||||
-rw-r--r-- | libvo/vo_null.c | 36 | ||||
-rw-r--r-- | libvo/vo_pnm.c | 25 | ||||
-rw-r--r-- | libvo/vo_sdl.c | 32 | ||||
-rw-r--r-- | libvo/vo_v4l2.c | 29 | ||||
-rw-r--r-- | libvo/vo_xv.c | 8 | ||||
-rw-r--r-- | libvo/vo_xvmc.c | 6 | ||||
-rw-r--r-- | libvo/vo_xvr100.c | 7 |
18 files changed, 240 insertions, 187 deletions
diff --git a/libvo/jpeg_enc.c b/libvo/jpeg_enc.c index eacd68e5bb..f4edc4b265 100644 --- a/libvo/jpeg_enc.c +++ b/libvo/jpeg_enc.c @@ -1,25 +1,28 @@ -/* Straightforward (to be) optimized JPEG encoder for the YUV422 format - * based on mjpeg code from ffmpeg. +/* + * straightforward (to be) optimized JPEG encoder for the YUV422 format + * based on MJPEG code from FFmpeg + * + * For an excellent introduction to the JPEG format, see: + * http://www.ece.purdue.edu/~bouman/grad-labs/lab8/pdf/lab.pdf * * Copyright (c) 2002, Rik Snel - * Parts from ffmpeg Copyright (c) 2000-2002 Fabrice Bellard + * parts from FFmpeg Copyright (c) 2000-2002 Fabrice Bellard + * + * This file is part of MPlayer. * - * This program is free software; you can redistribute it and/or modify + * MPlayer 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. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * For an excellent introduction to the JPEG format, see: - * http://www.ece.purdue.edu/~bouman/grad-labs/lab8/pdf/lab.pdf + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ diff --git a/libvo/jpeg_enc.h b/libvo/jpeg_enc.h index b518fb4bbf..786d664a41 100644 --- a/libvo/jpeg_enc.h +++ b/libvo/jpeg_enc.h @@ -1,25 +1,28 @@ -/* Straightforward (to be) optimized JPEG encoder for the YUV422 format - * based on mjpeg code from ffmpeg. +/* + * straightforward (to be) optimized JPEG encoder for the YUV422 format + * based on MJPEG code from FFmpeg + * + * For an excellent introduction to the JPEG format, see: + * http://www.ece.purdue.edu/~bouman/grad-labs/lab8/pdf/lab.pdf * * Copyright (c) 2002, Rik Snel - * Parts from ffmpeg Copyright (c) 2000-2002 Fabrice Bellard + * parts from FFmpeg Copyright (c) 2000-2002 Fabrice Bellard + * + * This file is part of MPlayer. * - * This program is free software; you can redistribute it and/or modify + * MPlayer 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. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * For an excellent introduction to the JPEG format, see: - * http://www.ece.purdue.edu/~bourman/grad-labs/lab8/pdf/lab.pdf + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef MPLAYER_JPEG_ENC_H diff --git a/libvo/spuenc.c b/libvo/spuenc.c index 7b29337cf6..41303aee3f 100644 --- a/libvo/spuenc.c +++ b/libvo/spuenc.c @@ -9,20 +9,21 @@ * * Samuel Hocevar <sam@via.ecp.fr> and Michel Lespinasse <walken@via.ecp.fr> * - * This program is free software; you can redistribute it and/or modify + * This file is part of MPlayer. + * + * MPlayer 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. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include <stdio.h> diff --git a/libvo/spuenc.h b/libvo/spuenc.h index 3fb3e62e2d..5f27680876 100644 --- a/libvo/spuenc.h +++ b/libvo/spuenc.h @@ -3,20 +3,21 @@ * * Copyright (C) 2000 Alejandro J. Cura <alecu@protocultura.net> * - * This program is free software; you can redistribute it and/or modify + * This file is part of MPlayer. + * + * MPlayer 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. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef MPLAYER_SPUENC_H diff --git a/libvo/video_out_internal.h b/libvo/video_out_internal.h index 16cdc4c727..166a91cc1c 100644 --- a/libvo/video_out_internal.h +++ b/libvo/video_out_internal.h @@ -1,23 +1,21 @@ /* - * video_out_internal.h + * Copyright (C) Aaron Holtzman - Aug 1999 * - * Copyright (C) Aaron Holtzman - Aug 1999 + * This file is part of MPlayer. * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * - * mpeg2dec 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, or (at your option) - * any later version. - * - * mpeg2dec 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 mpeg2dec; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MPlayer 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. + * + * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef MPLAYER_VIDEO_OUT_INTERNAL_H diff --git a/libvo/vo_3dfx.c b/libvo/vo_3dfx.c index dcb58d3aa3..da52a57a01 100644 --- a/libvo/vo_3dfx.c +++ b/libvo/vo_3dfx.c @@ -1,24 +1,24 @@ -/* - * video_out_3dfx.c +/* + * video_out_3dfx.c + * Heavily based on video_out_mga.c of Aaron Holtzman's mpeg2dec. * - * Copyright (C) Colin Cross Apr 2000 + * Copyright (C) Colin Cross Apr 2000 * - * This file heavily based off of video_out_mga.c of Aaron Holtzman's - * mpeg2dec - * - * mpeg2dec 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, or (at your option) - * any later version. - * - * mpeg2dec 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 mpeg2dec; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * This file is part of MPlayer. + * + * MPlayer 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. + * + * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include <stdio.h> diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index b56f39b36b..7053c8bc01 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -1,22 +1,24 @@ -/****************************************************************************** - * vo_directx.c: Directx v2 or later DirectDraw interface for MPlayer - * Copyright (c) 2002 - 2005 Sascha Sommer <saschasommer@freenet.de>. +/* + * Directx v2 or later DirectDraw interface * - * This program is free software; you can redistribute it and/or modify + * Copyright (c) 2002 - 2005 Sascha Sommer <saschasommer@freenet.de> + * + * This file is part of MPlayer. + * + * MPlayer 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. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ #include <windows.h> #include <windowsx.h> diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 291a2a3b8a..93dfa6f923 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -16,6 +16,7 @@ #ifdef HAVE_NEW_GUI #include "gui/interface.h" #endif +#include "fastmemcpy.h" #include "libass/ass.h" #include "libass/ass_mp.h" @@ -80,6 +81,8 @@ static uint32_t image_width; static uint32_t image_height; static uint32_t image_format; static int many_fmts; +static int ati_hack; +static int force_pbo; static int use_glFinish; static int swap_interval; static GLenum gl_target; @@ -672,6 +675,8 @@ static uint32_t get_image(mp_image_t *mpi) { if (!gl_buffer) GenBuffers(1, &gl_buffer); BindBuffer(GL_PIXEL_UNPACK_BUFFER, gl_buffer); + if (ati_hack) + mpi->width = (mpi->width + 63) & ~63; mpi->stride[0] = mpi->width * mpi->bpp / 8; if (mpi->stride[0] * mpi->height > gl_buffersize) { BufferData(GL_PIXEL_UNPACK_BUFFER, mpi->stride[0] * mpi->height, @@ -704,10 +709,24 @@ static uint32_t get_image(mp_image_t *mpi) { static uint32_t draw_image(mp_image_t *mpi) { int slice = slice_height; - int stride[3] = {mpi->stride[0], mpi->stride[1], mpi->stride[2]}; - unsigned char *planes[3] = {mpi->planes[0], mpi->planes[1], mpi->planes[2]}; + int stride[3]; + unsigned char *planes[3]; + mp_image_t mpi2 = *mpi; if (mpi->flags & MP_IMGFLAG_DRAW_CALLBACK) return VO_TRUE; + mpi2.flags = 0; mpi2.type = MP_IMGTYPE_TEMP; + mpi2.width = mpi2.w; mpi2.height = mpi2.h; + if (force_pbo && !(mpi->flags & MP_IMGFLAG_DIRECT) && !gl_bufferptr && get_image(&mpi2) == VO_TRUE) { + int bpp = mpi->imgfmt == IMGFMT_YV12 ? 1 : mpi->bpp; + memcpy_pic(mpi2.planes[0], mpi->planes[0], mpi->w * bpp, mpi->h, mpi2.stride[0], mpi->stride[0]); + if (mpi->imgfmt == IMGFMT_YV12) { + memcpy_pic(mpi2.planes[1], mpi->planes[1], mpi->w >> 1, mpi->h >> 1, mpi2.stride[1], mpi->stride[1]); + memcpy_pic(mpi2.planes[2], mpi->planes[2], mpi->w >> 1, mpi->h >> 1, mpi2.stride[2], mpi->stride[2]); + } + mpi = &mpi2; + } + stride[0] = mpi->stride[0]; stride[1] = mpi->stride[1]; stride[2] = mpi->stride[2]; + planes[0] = mpi->planes[0]; planes[1] = mpi->planes[1]; planes[2] = mpi->planes[2]; mpi_flipped = (stride[0] < 0); if (mpi->flags & MP_IMGFLAG_DIRECT) { intptr_t base = (intptr_t)planes[0]; @@ -789,6 +808,8 @@ static opt_t subopts[] = { {"yuv", OPT_ARG_INT, &use_yuv, (opt_test_f)int_non_neg}, {"lscale", OPT_ARG_INT, &lscale, (opt_test_f)int_non_neg}, {"cscale", OPT_ARG_INT, &cscale, (opt_test_f)int_non_neg}, + {"ati-hack", OPT_ARG_BOOL, &ati_hack, NULL}, + {"force-pbo", OPT_ARG_BOOL, &force_pbo, NULL}, {"glfinish", OPT_ARG_BOOL, &use_glFinish, NULL}, {"swapinterval", OPT_ARG_INT, &swap_interval,NULL}, {"customprog", OPT_ARG_MSTRZ,&custom_prog, NULL}, @@ -811,6 +832,8 @@ static int preinit(const char *arg) cscale = 0; use_rectangle = 0; use_glFinish = 0; + ati_hack = 0; + force_pbo = 0; swap_interval = 1; slice_height = 0; custom_prog = NULL; @@ -835,6 +858,10 @@ static int preinit(const char *arg) " 0: use power-of-two textures\n" " 1: use texture_rectangle\n" " 2: use texture_non_power_of_two\n" + " ati-hack\n" + " Workaround ATI bug with PBOs\n" + " force-pbo\n" + " Force use of PBO even if this involves an extra memcpy\n" " glfinish\n" " Call glFinish() before swapping buffers\n" " swapinterval=<n>\n" diff --git a/libvo/vo_ivtv.c b/libvo/vo_ivtv.c index 36efe18f58..7faf8a1415 100644 --- a/libvo/vo_ivtv.c +++ b/libvo/vo_ivtv.c @@ -1,24 +1,27 @@ /* - * Copyright (C) 2006 Benjamin Zores - * Video output for WinTV PVR-150/250/350 (a.k.a IVTV) cards. - * TV-Out through hardware MPEG decoder. - * Based on some old code from ivtv driver authors. - * See http://ivtvdriver.org/index.php/Main_Page for more details on the - * cards supported by the ivtv driver. + * video output for WinTV PVR-150/250/350 (a.k.a IVTV) cards + * TV-Out through hardware MPEG decoder + * Based on some old code from ivtv driver authors. + * See http://ivtvdriver.org/index.php/Main_Page for more details on the + * cards supported by the ivtv driver. * - * This program 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. + * Copyright (C) 2006 Benjamin Zores * - * This program 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. + * This file is part of MPlayer. * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MPlayer 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. + * + * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" diff --git a/libvo/vo_jpeg.c b/libvo/vo_jpeg.c index e103f872f3..72fc6e9d0d 100644 --- a/libvo/vo_jpeg.c +++ b/libvo/vo_jpeg.c @@ -1,26 +1,25 @@ -/* ------------------------------------------------------------------------- */ - -/* - * vo_jpeg.c, JPEG Renderer for MPlayer +/* + * JPEG Renderer for MPlayer * * Copyright (C) 2002 by Pontscho <pontscho@makacs.poliod.hu> * Copyright (C) 2003 by Alex * Copyright (C) 2004, 2005 by Ivo van Poorten <ivop@euronet.nl> * - * This program 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. + * This file is part of MPlayer. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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. + * + * MPlayer 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* ------------------------------------------------------------------------- */ diff --git a/libvo/vo_md5sum.c b/libvo/vo_md5sum.c index 8c4aca219b..b035a5b8a0 100644 --- a/libvo/vo_md5sum.c +++ b/libvo/vo_md5sum.c @@ -1,24 +1,25 @@ /* ------------------------------------------------------------------------- */ -/* - * vo_md5sum.c, md5sum Video Output Driver for MPlayer +/* + * md5sum video output driver * * Written by Ivo van Poorten. (C) Copyright 2004, 2005, 2006. * - * This program 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. + * This file is part of MPlayer. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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. + * + * MPlayer 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* ------------------------------------------------------------------------- */ diff --git a/libvo/vo_null.c b/libvo/vo_null.c index 6f45af0e10..81438898ed 100644 --- a/libvo/vo_null.c +++ b/libvo/vo_null.c @@ -1,23 +1,23 @@ -/* - * video_out_null.c +/* + * based on video_out_null.c from mpeg2dec * - * Copyright (C) Aaron Holtzman - June 2000 + * Copyright (C) Aaron Holtzman - June 2000 * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * - * mpeg2dec 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, or (at your option) - * any later version. - * - * mpeg2dec 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 mpeg2dec; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * This file is part of MPlayer. + * + * MPlayer 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. + * + * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include <stdio.h> diff --git a/libvo/vo_pnm.c b/libvo/vo_pnm.c index 878f063b06..6971f0a5f1 100644 --- a/libvo/vo_pnm.c +++ b/libvo/vo_pnm.c @@ -1,24 +1,23 @@ -/* ------------------------------------------------------------------------- */ - -/* - * vo_pnm.c, PPM/PGM/PGMYUV Video Output Driver for MPlayer +/* + * PPM/PGM/PGMYUV video output driver * * Written by Ivo van Poorten. (C) Copyright 2004, 2005. * - * This program 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. + * This file is part of MPlayer. * - * This program is distributed in the hope that it will be useful, + * MPlayer 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. + * + * MPlayer 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* ------------------------------------------------------------------------- */ diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 13d5d0fe73..4adc38be82 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -23,23 +23,23 @@ * and BeOS support, too. Yay. SDL info, source, and binaries can be found * at http://slouken.devolution.com/SDL/ * - * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. - * - * mpeg2dec 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, or (at your option) - * any later version. - * - * mpeg2dec 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 mpeg2dec; see the file COPYING. If not, write to - * the Free Software Foundation. - * * -- end old disclaimer -- + * + * This file is part of MPlayer. + * + * MPlayer 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. + * + * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ /* define to force software-surface (video surface stored in system memory)*/ diff --git a/libvo/vo_v4l2.c b/libvo/vo_v4l2.c index bce01f5f2e..fb4a666593 100644 --- a/libvo/vo_v4l2.c +++ b/libvo/vo_v4l2.c @@ -1,20 +1,23 @@ /* - * Copyright (C) 2007 Benjamin Zores - * Video output for V4L2 hardware MPEG decoders. + * video output for V4L2 hardware MPEG decoders * - * This program 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. + * Copyright (C) 2007 Benjamin Zores * - * This program 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. + * This file is part of MPlayer. * - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * MPlayer 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. + * + * MPlayer 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 MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "config.h" diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 7d11feb510..286e04b301 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -736,11 +736,13 @@ static int preinit(struct vo *vo, const char *arg) struct xvctx *ctx = talloc_zero(vo, struct xvctx); vo->priv = ctx; struct vo_x11_state *x11 = vo->x11; + int xv_adaptor = -1; opt_t subopts[] = { /* name arg type arg var test */ { "port", OPT_ARG_INT, &ctx->xv_port, (opt_test_f)int_pos }, + { "adaptor", OPT_ARG_INT, &xv_adaptor, (opt_test_f)int_non_neg }, { "ck", OPT_ARG_STR, &ck_src_arg, xv_test_ck }, { "ck-method", OPT_ARG_STR, &ck_method_arg, xv_test_ckm }, { NULL } @@ -812,6 +814,10 @@ static int preinit(struct vo *vo, const char *arg) for (i = 0; i < ctx->adaptors && x11->xv_port == 0; i++) { + /* check if adaptor number has been specified */ + if (xv_adaptor != -1 && xv_adaptor != i) + continue; + if ((ctx->ai[i].type & XvInputMask) && (ctx->ai[i].type & XvImageMask)) { for (xv_p = ctx->ai[i].base_id; @@ -819,6 +825,8 @@ static int preinit(struct vo *vo, const char *arg) if (!XvGrabPort(x11->display, xv_p, CurrentTime)) { x11->xv_port = xv_p; + mp_msg(MSGT_VO, MSGL_INFO, + MSGTR_LIBVO_XV_Adaptor, i, ctx->ai[i].name); break; } else { diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index d2875104bd..7a60e2bbbd 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -57,6 +57,7 @@ static int use_sleep; static int first_frame;//draw colorkey on first frame static int use_queue; static int xv_port_request = 0; +static int xv_adaptor = -1; static int bob_deinterlace; static int top_field_first; @@ -282,6 +283,9 @@ XvMCSurfaceInfo * mc_surf_list; printf("vo_xvmc: Querying %d adaptors\n",num_adaptors); } for(i=0; i<num_adaptors; i++) { + /* check if adaptor number has been specified */ + if (xv_adaptor != -1 && xv_adaptor != i) + continue; if( mp_msg_test(MSGT_VO,MSGL_DBG3) ) { printf("vo_xvmc: Quering adaptor #%d\n",i); } if( ai[i].type == 0 ) continue;// |