From 536096e93813b14b8911977a21dc712ffb8ada35 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:07:36 +0000 Subject: cosmetic: give coherent indentation git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27108 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/vidixlib.h | 89 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 45 deletions(-) (limited to 'vidix') diff --git a/vidix/vidixlib.h b/vidix/vidixlib.h index 08ca9639da..819e60db41 100644 --- a/vidix/vidixlib.h +++ b/vidix/vidixlib.h @@ -68,67 +68,66 @@ typedef struct VDXContext { /* might be filled in by much more info later on */ } VDXContext; -typedef VDXContext * VDL_HANDLE; - - /* Opens corresponded video driver and returns handle - of associated stream. - path - specifies path where drivers are located. - name - specifies prefered driver name (can be NULL). - cap - specifies driver capability (TYPE_* constants). - verbose - specifies verbose level - returns !0 if ok else NULL. - */ -VDL_HANDLE vdlOpen(const char *name,unsigned cap,int verbose); - /* Closes stream and corresponded driver. */ -void vdlClose(VDL_HANDLE ctx); +typedef VDXContext *VDL_HANDLE; + +/* Opens corresponded video driver and returns handle of associated stream. + * path - specifies path where drivers are located. + * name - specifies prefered driver name (can be NULL). + * cap - specifies driver capability (TYPE_* constants). + * verbose - specifies verbose level + * returns handle if ok else NULL. + */ +VDL_HANDLE vdlOpen (const char *name,unsigned cap,int verbose); - /* Queries driver capabilities. Return 0 if ok else errno */ -int vdlGetCapability(VDL_HANDLE, vidix_capability_t *); +/* Closes stream and corresponded driver. */ +void vdlClose (VDL_HANDLE ctx); - /* Queries support for given fourcc. Returns 0 if ok else errno */ -int vdlQueryFourcc(VDL_HANDLE,vidix_fourcc_t *); +/* Queries driver capabilities. Return 0 if ok else errno */ +int vdlGetCapability (VDL_HANDLE, vidix_capability_t *); - /* Returns 0 if ok else errno */ -int vdlConfigPlayback(VDL_HANDLE, vidix_playback_t *); +/* Queries support for given fourcc. Returns 0 if ok else errno */ +int vdlQueryFourcc (VDL_HANDLE, vidix_fourcc_t *); - /* Returns 0 if ok else errno */ -int vdlPlaybackOn(VDL_HANDLE); +/* Returns 0 if ok else errno */ +int vdlConfigPlayback (VDL_HANDLE, vidix_playback_t *); - /* Returns 0 if ok else errno */ -int vdlPlaybackOff(VDL_HANDLE); +/* Returns 0 if ok else errno */ +int vdlPlaybackOn (VDL_HANDLE); - /* Returns 0 if ok else errno */ -int vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx ); +/* Returns 0 if ok else errno */ +int vdlPlaybackOff (VDL_HANDLE); - /* Returns 0 if ok else errno */ -int vdlGetGrKeys(VDL_HANDLE, vidix_grkey_t * ); +/* Returns 0 if ok else errno */ +int vdlPlaybackFrameSelect (VDL_HANDLE, unsigned frame_idx); - /* Returns 0 if ok else errno */ -int vdlSetGrKeys(VDL_HANDLE, const vidix_grkey_t * ); +/* Returns 0 if ok else errno */ +int vdlGetGrKeys (VDL_HANDLE, vidix_grkey_t *); - /* Returns 0 if ok else errno */ -int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * ); +/* Returns 0 if ok else errno */ +int vdlSetGrKeys (VDL_HANDLE, const vidix_grkey_t *); - /* Returns 0 if ok else errno */ -int vdlPlaybackSetEq(VDL_HANDLE, const vidix_video_eq_t * ); +/* Returns 0 if ok else errno */ +int vdlPlaybackGetEq (VDL_HANDLE, vidix_video_eq_t *); - /* Returns 0 if ok else errno */ -int vdlPlaybackGetDeint(VDL_HANDLE, vidix_deinterlace_t * ); +/* Returns 0 if ok else errno */ +int vdlPlaybackSetEq (VDL_HANDLE, const vidix_video_eq_t *); - /* Returns 0 if ok else errno */ -int vdlPlaybackSetDeint(VDL_HANDLE, const vidix_deinterlace_t * ); +/* Returns 0 if ok else errno */ +int vdlPlaybackGetDeint (VDL_HANDLE, vidix_deinterlace_t *); - /* Returns 0 if ok else errno */ -int vdlQueryNumOemEffects(VDL_HANDLE, unsigned * number ); +/* Returns 0 if ok else errno */ +int vdlPlaybackSetDeint (VDL_HANDLE, const vidix_deinterlace_t *); - /* Returns 0 if ok else errno */ -int vdlGetOemEffect(VDL_HANDLE, vidix_oem_fx_t * ); +/* Returns 0 if ok else errno */ +int vdlQueryNumOemEffects (VDL_HANDLE, unsigned *number); - /* Returns 0 if ok else errno */ -int vdlSetOemEffect(VDL_HANDLE, const vidix_oem_fx_t * ); +/* Returns 0 if ok else errno */ +int vdlGetOemEffect (VDL_HANDLE, vidix_oem_fx_t *); +/* Returns 0 if ok else errno */ +int vdlSetOemEffect (VDL_HANDLE, const vidix_oem_fx_t *); - /* Returns 0 if ok else errno */ -int vdlPlaybackCopyFrame(VDL_HANDLE, const vidix_dma_t * ); +/* Returns 0 if ok else errno */ +int vdlPlaybackCopyFrame (VDL_HANDLE, const vidix_dma_t *); #endif /* MPLAYER_VIDIXLIB_H */ -- cgit v1.2.3 From c29c9e905497744e6989d4264a4db2e5cbfb0a87 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:09:54 +0000 Subject: move content of vidixlib.h into vidix.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27109 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/vidix.h | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vidix/vidixlib.h | 92 ----------------------------------------------------- 2 files changed, 96 insertions(+), 92 deletions(-) (limited to 'vidix') diff --git a/vidix/vidix.h b/vidix/vidix.h index 01a998b004..1aa9c1ee96 100644 --- a/vidix/vidix.h +++ b/vidix/vidix.h @@ -305,4 +305,100 @@ typedef struct vidix_oem_fx_s char *name[80]; /* effect name to display */ } vidix_oem_fx_t; +typedef struct VDXDriver { + const char *name; + struct VDXDriver *next; + int (* probe) (int verbose, int force); + int (* get_caps) (vidix_capability_t *cap); + int (*query_fourcc)(vidix_fourcc_t *); + int (*init)(void); + void (*destroy)(void); + int (*config_playback)(vidix_playback_t *); + int (*playback_on)( void ); + int (*playback_off)( void ); + /* Functions below can be missed in driver ;) */ + int (*frame_sel)( unsigned frame_idx ); + int (*get_eq)( vidix_video_eq_t * ); + int (*set_eq)( const vidix_video_eq_t * ); + int (*get_deint)( vidix_deinterlace_t * ); + int (*set_deint)( const vidix_deinterlace_t * ); + int (*copy_frame)( const vidix_dma_t * ); + int (*get_gkey)( vidix_grkey_t * ); + int (*set_gkey)( const vidix_grkey_t * ); + int (*get_num_fx)( unsigned * ); + int (*get_fx)( vidix_oem_fx_t * ); + int (*set_fx)( const vidix_oem_fx_t * ); +} VDXDriver; + +typedef struct VDXContext { + VDXDriver *drv; + /* might be filled in by much more info later on */ +} VDXContext; + +/***************************************************************************/ +/* PUBLIC API */ +/***************************************************************************/ + +typedef VDXContext *VDL_HANDLE; + +/* Opens corresponded video driver and returns handle of associated stream. + * path - specifies path where drivers are located. + * name - specifies prefered driver name (can be NULL). + * cap - specifies driver capability (TYPE_* constants). + * verbose - specifies verbose level + * returns handle if ok else NULL. + */ +VDL_HANDLE vdlOpen (const char *name,unsigned cap,int verbose); + +/* Closes stream and corresponded driver. */ +void vdlClose (VDL_HANDLE ctx); + +/* Queries driver capabilities. Return 0 if ok else errno */ +int vdlGetCapability (VDL_HANDLE, vidix_capability_t *); + +/* Queries support for given fourcc. Returns 0 if ok else errno */ +int vdlQueryFourcc (VDL_HANDLE, vidix_fourcc_t *); + +/* Returns 0 if ok else errno */ +int vdlConfigPlayback (VDL_HANDLE, vidix_playback_t *); + +/* Returns 0 if ok else errno */ +int vdlPlaybackOn (VDL_HANDLE); + +/* Returns 0 if ok else errno */ +int vdlPlaybackOff (VDL_HANDLE); + +/* Returns 0 if ok else errno */ +int vdlPlaybackFrameSelect (VDL_HANDLE, unsigned frame_idx); + +/* Returns 0 if ok else errno */ +int vdlGetGrKeys (VDL_HANDLE, vidix_grkey_t *); + +/* Returns 0 if ok else errno */ +int vdlSetGrKeys (VDL_HANDLE, const vidix_grkey_t *); + +/* Returns 0 if ok else errno */ +int vdlPlaybackGetEq (VDL_HANDLE, vidix_video_eq_t *); + +/* Returns 0 if ok else errno */ +int vdlPlaybackSetEq (VDL_HANDLE, const vidix_video_eq_t *); + +/* Returns 0 if ok else errno */ +int vdlPlaybackGetDeint (VDL_HANDLE, vidix_deinterlace_t *); + +/* Returns 0 if ok else errno */ +int vdlPlaybackSetDeint (VDL_HANDLE, const vidix_deinterlace_t *); + +/* Returns 0 if ok else errno */ +int vdlQueryNumOemEffects (VDL_HANDLE, unsigned *number); + +/* Returns 0 if ok else errno */ +int vdlGetOemEffect (VDL_HANDLE, vidix_oem_fx_t *); + +/* Returns 0 if ok else errno */ +int vdlSetOemEffect (VDL_HANDLE, const vidix_oem_fx_t *); + +/* Returns 0 if ok else errno */ +int vdlPlaybackCopyFrame (VDL_HANDLE, const vidix_dma_t *); + #endif /* MPLAYER_VIDIX_H */ diff --git a/vidix/vidixlib.h b/vidix/vidixlib.h index 819e60db41..a02f9b1fb2 100644 --- a/vidix/vidixlib.h +++ b/vidix/vidixlib.h @@ -38,96 +38,4 @@ #include "vidix.h" -typedef struct VDXDriver { - const char *name; - struct VDXDriver *next; - int (* probe) (int verbose, int force); - int (* get_caps) (vidix_capability_t *cap); - int (*query_fourcc)(vidix_fourcc_t *); - int (*init)(void); - void (*destroy)(void); - int (*config_playback)(vidix_playback_t *); - int (*playback_on)( void ); - int (*playback_off)( void ); - /* Functions below can be missed in driver ;) */ - int (*frame_sel)( unsigned frame_idx ); - int (*get_eq)( vidix_video_eq_t * ); - int (*set_eq)( const vidix_video_eq_t * ); - int (*get_deint)( vidix_deinterlace_t * ); - int (*set_deint)( const vidix_deinterlace_t * ); - int (*copy_frame)( const vidix_dma_t * ); - int (*get_gkey)( vidix_grkey_t * ); - int (*set_gkey)( const vidix_grkey_t * ); - int (*get_num_fx)( unsigned * ); - int (*get_fx)( vidix_oem_fx_t * ); - int (*set_fx)( const vidix_oem_fx_t * ); -} VDXDriver; - -typedef struct VDXContext { - VDXDriver *drv; - /* might be filled in by much more info later on */ -} VDXContext; - -typedef VDXContext *VDL_HANDLE; - -/* Opens corresponded video driver and returns handle of associated stream. - * path - specifies path where drivers are located. - * name - specifies prefered driver name (can be NULL). - * cap - specifies driver capability (TYPE_* constants). - * verbose - specifies verbose level - * returns handle if ok else NULL. - */ -VDL_HANDLE vdlOpen (const char *name,unsigned cap,int verbose); - -/* Closes stream and corresponded driver. */ -void vdlClose (VDL_HANDLE ctx); - -/* Queries driver capabilities. Return 0 if ok else errno */ -int vdlGetCapability (VDL_HANDLE, vidix_capability_t *); - -/* Queries support for given fourcc. Returns 0 if ok else errno */ -int vdlQueryFourcc (VDL_HANDLE, vidix_fourcc_t *); - -/* Returns 0 if ok else errno */ -int vdlConfigPlayback (VDL_HANDLE, vidix_playback_t *); - -/* Returns 0 if ok else errno */ -int vdlPlaybackOn (VDL_HANDLE); - -/* Returns 0 if ok else errno */ -int vdlPlaybackOff (VDL_HANDLE); - -/* Returns 0 if ok else errno */ -int vdlPlaybackFrameSelect (VDL_HANDLE, unsigned frame_idx); - -/* Returns 0 if ok else errno */ -int vdlGetGrKeys (VDL_HANDLE, vidix_grkey_t *); - -/* Returns 0 if ok else errno */ -int vdlSetGrKeys (VDL_HANDLE, const vidix_grkey_t *); - -/* Returns 0 if ok else errno */ -int vdlPlaybackGetEq (VDL_HANDLE, vidix_video_eq_t *); - -/* Returns 0 if ok else errno */ -int vdlPlaybackSetEq (VDL_HANDLE, const vidix_video_eq_t *); - -/* Returns 0 if ok else errno */ -int vdlPlaybackGetDeint (VDL_HANDLE, vidix_deinterlace_t *); - -/* Returns 0 if ok else errno */ -int vdlPlaybackSetDeint (VDL_HANDLE, const vidix_deinterlace_t *); - -/* Returns 0 if ok else errno */ -int vdlQueryNumOemEffects (VDL_HANDLE, unsigned *number); - -/* Returns 0 if ok else errno */ -int vdlGetOemEffect (VDL_HANDLE, vidix_oem_fx_t *); - -/* Returns 0 if ok else errno */ -int vdlSetOemEffect (VDL_HANDLE, const vidix_oem_fx_t *); - -/* Returns 0 if ok else errno */ -int vdlPlaybackCopyFrame (VDL_HANDLE, const vidix_dma_t *); - #endif /* MPLAYER_VIDIXLIB_H */ -- cgit v1.2.3 From 144b0d05cdd58f45a1876cfa704f59c2653d23bc Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:16:34 +0000 Subject: remove now useless vidixlib.h file git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27111 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_cvidix.c | 2 +- libvo/vo_winvidix.c | 2 +- libvo/vo_xvidix.c | 2 +- libvo/vosub_vidix.c | 2 +- vidix/cyberblade_vid.c | 1 - vidix/drivers.c | 2 +- vidix/drivers.h | 2 +- vidix/ivtv_vid.c | 1 - vidix/mach64_vid.c | 1 - vidix/mga_vid.c | 1 - vidix/nvidia_vid.c | 1 - vidix/pm2_vid.c | 1 - vidix/pm3_vid.c | 1 - vidix/radeon_vid.c | 1 - vidix/s3_vid.c | 1 - vidix/sis_vid.c | 1 - vidix/unichrome_vid.c | 1 - vidix/vidixlib.c | 2 +- vidix/vidixlib.h | 41 ----------------------------------------- 19 files changed, 7 insertions(+), 59 deletions(-) delete mode 100644 vidix/vidixlib.h (limited to 'vidix') diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c index 0192b20264..0f7de905dc 100644 --- a/libvo/vo_cvidix.c +++ b/libvo/vo_cvidix.c @@ -23,7 +23,7 @@ #include "mp_msg.h" #include "vosub_vidix.h" -#include "vidix/vidixlib.h" +#include "vidix/vidix.h" static const vo_info_t info = { diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c index eb42f3d476..b03b1b2ded 100644 --- a/libvo/vo_winvidix.c +++ b/libvo/vo_winvidix.c @@ -25,7 +25,7 @@ #include "mp_fifo.h" #include "vosub_vidix.h" -#include "vidix/vidixlib.h" +#include "vidix/vidix.h" static const vo_info_t info = diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index f330eb9521..c56e52d4cf 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -31,7 +31,7 @@ #include "mp_msg.h" #include "vosub_vidix.h" -#include "vidix/vidixlib.h" +#include "vidix/vidix.h" #ifdef HAVE_NEW_GUI #include "gui/interface.h" diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c index 4bebbb0000..fec1d9ce32 100644 --- a/libvo/vosub_vidix.c +++ b/libvo/vosub_vidix.c @@ -27,7 +27,7 @@ #include "mp_msg.h" #include "help_mp.h" -#include "vidix/vidixlib.h" +#include "vidix/vidix.h" #include "fastmemcpy.h" #include "osd.h" #include "video_out.h" diff --git a/vidix/cyberblade_vid.c b/vidix/cyberblade_vid.c index 5a323dd163..558d915acb 100644 --- a/vidix/cyberblade_vid.c +++ b/vidix/cyberblade_vid.c @@ -40,7 +40,6 @@ #include "config.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/drivers.c b/vidix/drivers.c index cf26cf94dc..483428ff3b 100644 --- a/vidix/drivers.c +++ b/vidix/drivers.c @@ -25,7 +25,7 @@ #include #include "config.h" -#include "vidixlib.h" +#include "vidix.h" #include "libavutil/common.h" #include "mpbswap.h" #include "config.h" diff --git a/vidix/drivers.h b/vidix/drivers.h index 1dbe0b8417..157f918c4b 100644 --- a/vidix/drivers.h +++ b/vidix/drivers.h @@ -22,7 +22,7 @@ #ifndef MPLAYER_DRIVERS_H #define MPLAYER_DRIVERS_H -#include "vidixlib.h" +#include "vidix.h" void vidix_register_all_drivers (void); diff --git a/vidix/ivtv_vid.c b/vidix/ivtv_vid.c index ca2d4aa046..15bf38d85c 100644 --- a/vidix/ivtv_vid.c +++ b/vidix/ivtv_vid.c @@ -39,7 +39,6 @@ #include #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/mach64_vid.c b/vidix/mach64_vid.c index 0163deb4c3..dd6084d126 100644 --- a/vidix/mach64_vid.c +++ b/vidix/mach64_vid.c @@ -34,7 +34,6 @@ #include "libavutil/common.h" #include "mpbswap.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/mga_vid.c b/vidix/mga_vid.c index b6504fa5df..fd414fa3bb 100644 --- a/vidix/mga_vid.c +++ b/vidix/mga_vid.c @@ -54,7 +54,6 @@ #include #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/nvidia_vid.c b/vidix/nvidia_vid.c index a895a084c8..c53fa93d64 100644 --- a/vidix/nvidia_vid.c +++ b/vidix/nvidia_vid.c @@ -33,7 +33,6 @@ #include "config.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/pm2_vid.c b/vidix/pm2_vid.c index a1058d6882..748a9fd884 100644 --- a/vidix/pm2_vid.c +++ b/vidix/pm2_vid.c @@ -29,7 +29,6 @@ #include "config.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/pm3_vid.c b/vidix/pm3_vid.c index 0ee01e0734..25b0a60988 100644 --- a/vidix/pm3_vid.c +++ b/vidix/pm3_vid.c @@ -28,7 +28,6 @@ #include "config.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/radeon_vid.c b/vidix/radeon_vid.c index 5088a987fd..b72391b51d 100644 --- a/vidix/radeon_vid.c +++ b/vidix/radeon_vid.c @@ -37,7 +37,6 @@ #include "pci_ids.h" #include "pci_names.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "radeon.h" diff --git a/vidix/s3_vid.c b/vidix/s3_vid.c index 98904cedd8..cecd39d955 100644 --- a/vidix/s3_vid.c +++ b/vidix/s3_vid.c @@ -32,7 +32,6 @@ #include "config.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/sis_vid.c b/vidix/sis_vid.c index 57e934c017..1028a6c5db 100644 --- a/vidix/sis_vid.c +++ b/vidix/sis_vid.c @@ -32,7 +32,6 @@ #include "config.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/unichrome_vid.c b/vidix/unichrome_vid.c index 15b86fc662..796b7e5885 100644 --- a/vidix/unichrome_vid.c +++ b/vidix/unichrome_vid.c @@ -32,7 +32,6 @@ #include "config.h" #include "vidix.h" -#include "vidixlib.h" #include "fourcc.h" #include "dha.h" #include "pci_ids.h" diff --git a/vidix/vidixlib.c b/vidix/vidixlib.c index 78dc703e77..945318a804 100644 --- a/vidix/vidixlib.c +++ b/vidix/vidixlib.c @@ -39,7 +39,7 @@ #include #include "config.h" -#include "vidixlib.h" +#include "vidix.h" #include "drivers.h" #include "libavutil/common.h" #include "mpbswap.h" diff --git a/vidix/vidixlib.h b/vidix/vidixlib.h deleted file mode 100644 index a02f9b1fb2..0000000000 --- a/vidix/vidixlib.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * VIDIX - VIDeo Interface for *niX. - * - * This interface is introduced as universal one to MPEG decoder, - * Back End Scaler (BES) and YUV2RGB hw accelerators. - * - * In the future it may be expanded up to capturing and audio things. - * Main goal of this this interface imlpementation is providing DGA - * everywhere where it's possible (unlike X11 and other). - * - * This interface is based on v4l2, fbvid.h, mga_vid.h projects - * and personally my ideas. - * - * NOTE: This interface is introduced as driver interface. - * - * Copyright (C) 2002 Nick Kurshev - * Copyright (C) 2007 Benjamin Zores - * - * 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. - */ - -#ifndef MPLAYER_VIDIXLIB_H -#define MPLAYER_VIDIXLIB_H - -#include "vidix.h" - -#endif /* MPLAYER_VIDIXLIB_H */ -- cgit v1.2.3 From 86d8472fb3f169050bf07088abc5360ee8d8b54b Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:17:38 +0000 Subject: renamed vidixlib.c to vidix.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27112 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 2 +- vidix/vidix.c | 194 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ vidix/vidixlib.c | 194 ------------------------------------------------------- 3 files changed, 195 insertions(+), 195 deletions(-) create mode 100644 vidix/vidix.c delete mode 100644 vidix/vidixlib.c (limited to 'vidix') diff --git a/Makefile b/Makefile index 93536f318a..76eec75f6e 100644 --- a/Makefile +++ b/Makefile @@ -577,7 +577,7 @@ SRCS_MPLAYER-$(LIBMENU_DVBIN) += libmenu/menu_dvbin.c SRCS_MPLAYER-$(LIRC) += input/lirc.c SRCS_MPLAYER-$(VIDIX) += libvo/vosub_vidix.c \ - vidix/vidixlib.c \ + vidix/vidix.c \ vidix/drivers.c \ vidix/dha.c \ vidix/mtrr.c \ diff --git a/vidix/vidix.c b/vidix/vidix.c new file mode 100644 index 0000000000..945318a804 --- /dev/null +++ b/vidix/vidix.c @@ -0,0 +1,194 @@ +/* + * VIDIX - VIDeo Interface for *niX. + * + * This interface is introduced as universal one to MPEG decoder, + * Back End Scaler (BES) and YUV2RGB hw accelerators. + * + * In the future it may be expanded up to capturing and audio things. + * Main goal of this this interface imlpementation is providing DGA + * everywhere where it's possible (unlike X11 and other). + * + * This interface is based on v4l2, fbvid.h, mga_vid.h projects + * and personally my ideas. + * + * NOTE: This interface is introduced as driver interface. + * + * Copyright (C) 2002 Nick Kurshev + * Copyright (C) 2007 Benjamin Zores + * + * 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 +#include +#include +#include + +#include "config.h" +#include "vidix.h" +#include "drivers.h" +#include "libavutil/common.h" +#include "mpbswap.h" + +VDL_HANDLE vdlOpen(const char *name,unsigned cap,int verbose) +{ + VDXContext *ctx; + + if (!(ctx = malloc (sizeof (VDXContext)))) + return NULL; + memset (ctx, 0, sizeof (VDXContext)); + + /* register all drivers */ + vidix_register_all_drivers (); + + if (!vidix_find_driver (ctx, name, cap, verbose)) + { + free (ctx); + return NULL; + } + + if (verbose) + printf ("vidixlib: will use %s driver\n", ctx->drv->name); + + if (!ctx->drv || !ctx->drv->init) + { + if (verbose) + printf ("vidixlib: Can't init driver\n"); + free (ctx); + return NULL; + } + + if (verbose) + printf ("vidixlib: Attempt to initialize driver at: %p\n", + ctx->drv->init); + + if (ctx->drv->init () !=0) + { + if (verbose) + printf ("vidixlib: Can't init driver\n"); + free (ctx); + return NULL; + } + + if (verbose) + printf("vidixlib: '%s'successfully loaded\n", ctx->drv->name); + + return ctx; +} + +void vdlClose(VDL_HANDLE ctx) +{ + if (ctx->drv->destroy) + ctx->drv->destroy (); + + memset (ctx, 0, sizeof (VDXContext)); /* <- it's not stupid */ + free (ctx); +} + +int vdlGetCapability(VDL_HANDLE ctx, vidix_capability_t *cap) +{ + return ctx->drv->get_caps (cap); +} + +#define MPLAYER_IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8)) +#define MPLAYER_IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8)) +#define MPLAYER_IMGFMT_RGB_MASK 0xFFFFFF00 + +static uint32_t normalize_fourcc(uint32_t fourcc) +{ + if((fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_RGB|0) || + (fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_BGR|0)) + return bswap_32(fourcc); + else return fourcc; +} + +int vdlQueryFourcc(VDL_HANDLE ctx,vidix_fourcc_t *f) +{ + f->fourcc = normalize_fourcc(f->fourcc); + return ctx->drv->query_fourcc (f); +} + +int vdlConfigPlayback(VDL_HANDLE ctx,vidix_playback_t *p) +{ + p->fourcc = normalize_fourcc(p->fourcc); + return ctx->drv->config_playback (p); +} + +int vdlPlaybackOn(VDL_HANDLE ctx) +{ + return ctx->drv->playback_on (); +} + +int vdlPlaybackOff(VDL_HANDLE ctx) +{ + return ctx->drv->playback_off (); +} + +int vdlPlaybackFrameSelect(VDL_HANDLE ctx, unsigned frame_idx ) +{ + return ctx->drv->frame_sel ? ctx->drv->frame_sel (frame_idx) : ENOSYS; +} + +int vdlPlaybackGetEq(VDL_HANDLE ctx, vidix_video_eq_t * e) +{ + return ctx->drv->get_eq ? ctx->drv->get_eq (e) : ENOSYS; +} + +int vdlPlaybackSetEq(VDL_HANDLE ctx, const vidix_video_eq_t * e) +{ + return ctx->drv->set_eq ? ctx->drv->set_eq (e) : ENOSYS; +} + +int vdlPlaybackCopyFrame(VDL_HANDLE ctx, const vidix_dma_t * f) +{ + return ctx->drv->copy_frame ? ctx->drv->copy_frame (f) : ENOSYS; +} + +int vdlGetGrKeys(VDL_HANDLE ctx, vidix_grkey_t * k) +{ + return ctx->drv->get_gkey ? ctx->drv->get_gkey (k) : ENOSYS; +} + +int vdlSetGrKeys(VDL_HANDLE ctx, const vidix_grkey_t * k) +{ + return ctx->drv->set_gkey ? ctx->drv->set_gkey (k) : ENOSYS; +} + +int vdlPlaybackGetDeint(VDL_HANDLE ctx, vidix_deinterlace_t * d) +{ + return ctx->drv->get_deint ? ctx->drv->get_deint (d) : ENOSYS; +} + +int vdlPlaybackSetDeint(VDL_HANDLE ctx, const vidix_deinterlace_t * d) +{ + return ctx->drv->set_deint ? ctx->drv->set_deint (d) : ENOSYS; +} + +int vdlQueryNumOemEffects(VDL_HANDLE ctx, unsigned * number ) +{ + return ctx->drv->get_num_fx ? ctx->drv->get_num_fx (number) : ENOSYS; +} + +int vdlGetOemEffect(VDL_HANDLE ctx, vidix_oem_fx_t * f) +{ + return ctx->drv->get_fx ? ctx->drv->get_fx (f) : ENOSYS; +} + +int vdlSetOemEffect(VDL_HANDLE ctx, const vidix_oem_fx_t * f) +{ + return ctx->drv->set_fx ? ctx->drv->set_fx (f) : ENOSYS; +} diff --git a/vidix/vidixlib.c b/vidix/vidixlib.c deleted file mode 100644 index 945318a804..0000000000 --- a/vidix/vidixlib.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * VIDIX - VIDeo Interface for *niX. - * - * This interface is introduced as universal one to MPEG decoder, - * Back End Scaler (BES) and YUV2RGB hw accelerators. - * - * In the future it may be expanded up to capturing and audio things. - * Main goal of this this interface imlpementation is providing DGA - * everywhere where it's possible (unlike X11 and other). - * - * This interface is based on v4l2, fbvid.h, mga_vid.h projects - * and personally my ideas. - * - * NOTE: This interface is introduced as driver interface. - * - * Copyright (C) 2002 Nick Kurshev - * Copyright (C) 2007 Benjamin Zores - * - * 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 -#include -#include -#include - -#include "config.h" -#include "vidix.h" -#include "drivers.h" -#include "libavutil/common.h" -#include "mpbswap.h" - -VDL_HANDLE vdlOpen(const char *name,unsigned cap,int verbose) -{ - VDXContext *ctx; - - if (!(ctx = malloc (sizeof (VDXContext)))) - return NULL; - memset (ctx, 0, sizeof (VDXContext)); - - /* register all drivers */ - vidix_register_all_drivers (); - - if (!vidix_find_driver (ctx, name, cap, verbose)) - { - free (ctx); - return NULL; - } - - if (verbose) - printf ("vidixlib: will use %s driver\n", ctx->drv->name); - - if (!ctx->drv || !ctx->drv->init) - { - if (verbose) - printf ("vidixlib: Can't init driver\n"); - free (ctx); - return NULL; - } - - if (verbose) - printf ("vidixlib: Attempt to initialize driver at: %p\n", - ctx->drv->init); - - if (ctx->drv->init () !=0) - { - if (verbose) - printf ("vidixlib: Can't init driver\n"); - free (ctx); - return NULL; - } - - if (verbose) - printf("vidixlib: '%s'successfully loaded\n", ctx->drv->name); - - return ctx; -} - -void vdlClose(VDL_HANDLE ctx) -{ - if (ctx->drv->destroy) - ctx->drv->destroy (); - - memset (ctx, 0, sizeof (VDXContext)); /* <- it's not stupid */ - free (ctx); -} - -int vdlGetCapability(VDL_HANDLE ctx, vidix_capability_t *cap) -{ - return ctx->drv->get_caps (cap); -} - -#define MPLAYER_IMGFMT_RGB (('R'<<24)|('G'<<16)|('B'<<8)) -#define MPLAYER_IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8)) -#define MPLAYER_IMGFMT_RGB_MASK 0xFFFFFF00 - -static uint32_t normalize_fourcc(uint32_t fourcc) -{ - if((fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_RGB|0) || - (fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_BGR|0)) - return bswap_32(fourcc); - else return fourcc; -} - -int vdlQueryFourcc(VDL_HANDLE ctx,vidix_fourcc_t *f) -{ - f->fourcc = normalize_fourcc(f->fourcc); - return ctx->drv->query_fourcc (f); -} - -int vdlConfigPlayback(VDL_HANDLE ctx,vidix_playback_t *p) -{ - p->fourcc = normalize_fourcc(p->fourcc); - return ctx->drv->config_playback (p); -} - -int vdlPlaybackOn(VDL_HANDLE ctx) -{ - return ctx->drv->playback_on (); -} - -int vdlPlaybackOff(VDL_HANDLE ctx) -{ - return ctx->drv->playback_off (); -} - -int vdlPlaybackFrameSelect(VDL_HANDLE ctx, unsigned frame_idx ) -{ - return ctx->drv->frame_sel ? ctx->drv->frame_sel (frame_idx) : ENOSYS; -} - -int vdlPlaybackGetEq(VDL_HANDLE ctx, vidix_video_eq_t * e) -{ - return ctx->drv->get_eq ? ctx->drv->get_eq (e) : ENOSYS; -} - -int vdlPlaybackSetEq(VDL_HANDLE ctx, const vidix_video_eq_t * e) -{ - return ctx->drv->set_eq ? ctx->drv->set_eq (e) : ENOSYS; -} - -int vdlPlaybackCopyFrame(VDL_HANDLE ctx, const vidix_dma_t * f) -{ - return ctx->drv->copy_frame ? ctx->drv->copy_frame (f) : ENOSYS; -} - -int vdlGetGrKeys(VDL_HANDLE ctx, vidix_grkey_t * k) -{ - return ctx->drv->get_gkey ? ctx->drv->get_gkey (k) : ENOSYS; -} - -int vdlSetGrKeys(VDL_HANDLE ctx, const vidix_grkey_t * k) -{ - return ctx->drv->set_gkey ? ctx->drv->set_gkey (k) : ENOSYS; -} - -int vdlPlaybackGetDeint(VDL_HANDLE ctx, vidix_deinterlace_t * d) -{ - return ctx->drv->get_deint ? ctx->drv->get_deint (d) : ENOSYS; -} - -int vdlPlaybackSetDeint(VDL_HANDLE ctx, const vidix_deinterlace_t * d) -{ - return ctx->drv->set_deint ? ctx->drv->set_deint (d) : ENOSYS; -} - -int vdlQueryNumOemEffects(VDL_HANDLE ctx, unsigned * number ) -{ - return ctx->drv->get_num_fx ? ctx->drv->get_num_fx (number) : ENOSYS; -} - -int vdlGetOemEffect(VDL_HANDLE ctx, vidix_oem_fx_t * f) -{ - return ctx->drv->get_fx ? ctx->drv->get_fx (f) : ENOSYS; -} - -int vdlSetOemEffect(VDL_HANDLE ctx, const vidix_oem_fx_t * f) -{ - return ctx->drv->set_fx ? ctx->drv->set_fx (f) : ENOSYS; -} -- cgit v1.2.3 From 3927b78660995121907af120a925f1193b11ea21 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:19:18 +0000 Subject: remove useless 'else' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27113 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/vidix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vidix') diff --git a/vidix/vidix.c b/vidix/vidix.c index 945318a804..6b38d15af0 100644 --- a/vidix/vidix.c +++ b/vidix/vidix.c @@ -113,7 +113,7 @@ static uint32_t normalize_fourcc(uint32_t fourcc) if((fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_RGB|0) || (fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_BGR|0)) return bswap_32(fourcc); - else return fourcc; + return fourcc; } int vdlQueryFourcc(VDL_HANDLE ctx,vidix_fourcc_t *f) -- cgit v1.2.3 From 598f6c15b96c96678fd84131c0a5689bc99ecc68 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:21:31 +0000 Subject: remove some useless functions from vidix api git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27114 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/vidix.c | 15 --------------- vidix/vidix.h | 12 ------------ 2 files changed, 27 deletions(-) (limited to 'vidix') diff --git a/vidix/vidix.c b/vidix/vidix.c index 6b38d15af0..a68472b9d4 100644 --- a/vidix/vidix.c +++ b/vidix/vidix.c @@ -177,18 +177,3 @@ int vdlPlaybackSetDeint(VDL_HANDLE ctx, const vidix_deinterlace_t * d) { return ctx->drv->set_deint ? ctx->drv->set_deint (d) : ENOSYS; } - -int vdlQueryNumOemEffects(VDL_HANDLE ctx, unsigned * number ) -{ - return ctx->drv->get_num_fx ? ctx->drv->get_num_fx (number) : ENOSYS; -} - -int vdlGetOemEffect(VDL_HANDLE ctx, vidix_oem_fx_t * f) -{ - return ctx->drv->get_fx ? ctx->drv->get_fx (f) : ENOSYS; -} - -int vdlSetOemEffect(VDL_HANDLE ctx, const vidix_oem_fx_t * f) -{ - return ctx->drv->set_fx ? ctx->drv->set_fx (f) : ENOSYS; -} diff --git a/vidix/vidix.h b/vidix/vidix.h index 1aa9c1ee96..0bb0697b4b 100644 --- a/vidix/vidix.h +++ b/vidix/vidix.h @@ -325,9 +325,6 @@ typedef struct VDXDriver { int (*copy_frame)( const vidix_dma_t * ); int (*get_gkey)( vidix_grkey_t * ); int (*set_gkey)( const vidix_grkey_t * ); - int (*get_num_fx)( unsigned * ); - int (*get_fx)( vidix_oem_fx_t * ); - int (*set_fx)( const vidix_oem_fx_t * ); } VDXDriver; typedef struct VDXContext { @@ -392,13 +389,4 @@ int vdlPlaybackSetDeint (VDL_HANDLE, const vidix_deinterlace_t *); /* Returns 0 if ok else errno */ int vdlQueryNumOemEffects (VDL_HANDLE, unsigned *number); -/* Returns 0 if ok else errno */ -int vdlGetOemEffect (VDL_HANDLE, vidix_oem_fx_t *); - -/* Returns 0 if ok else errno */ -int vdlSetOemEffect (VDL_HANDLE, const vidix_oem_fx_t *); - -/* Returns 0 if ok else errno */ -int vdlPlaybackCopyFrame (VDL_HANDLE, const vidix_dma_t *); - #endif /* MPLAYER_VIDIX_H */ -- cgit v1.2.3 From b6697c56e6c1190ee7544b56e7186c3bae67ea8e Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:24:53 +0000 Subject: cosmetic: give a coherent indentation git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27115 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/vidix.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'vidix') diff --git a/vidix/vidix.c b/vidix/vidix.c index a68472b9d4..a8f291e6d9 100644 --- a/vidix/vidix.c +++ b/vidix/vidix.c @@ -108,7 +108,7 @@ int vdlGetCapability(VDL_HANDLE ctx, vidix_capability_t *cap) #define MPLAYER_IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8)) #define MPLAYER_IMGFMT_RGB_MASK 0xFFFFFF00 -static uint32_t normalize_fourcc(uint32_t fourcc) +static uint32_t normalize_fourcc (uint32_t fourcc) { if((fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_RGB|0) || (fourcc & MPLAYER_IMGFMT_RGB_MASK) == (MPLAYER_IMGFMT_BGR|0)) @@ -116,64 +116,64 @@ static uint32_t normalize_fourcc(uint32_t fourcc) return fourcc; } -int vdlQueryFourcc(VDL_HANDLE ctx,vidix_fourcc_t *f) +int vdlQueryFourcc(VDL_HANDLE ctx, vidix_fourcc_t *f) { f->fourcc = normalize_fourcc(f->fourcc); return ctx->drv->query_fourcc (f); } -int vdlConfigPlayback(VDL_HANDLE ctx,vidix_playback_t *p) +int vdlConfigPlayback (VDL_HANDLE ctx, vidix_playback_t *p) { p->fourcc = normalize_fourcc(p->fourcc); return ctx->drv->config_playback (p); } -int vdlPlaybackOn(VDL_HANDLE ctx) +int vdlPlaybackOn (VDL_HANDLE ctx) { return ctx->drv->playback_on (); } -int vdlPlaybackOff(VDL_HANDLE ctx) +int vdlPlaybackOff (VDL_HANDLE ctx) { return ctx->drv->playback_off (); } -int vdlPlaybackFrameSelect(VDL_HANDLE ctx, unsigned frame_idx ) +int vdlPlaybackFrameSelect (VDL_HANDLE ctx, unsigned frame_idx) { return ctx->drv->frame_sel ? ctx->drv->frame_sel (frame_idx) : ENOSYS; } -int vdlPlaybackGetEq(VDL_HANDLE ctx, vidix_video_eq_t * e) +int vdlPlaybackGetEq (VDL_HANDLE ctx, vidix_video_eq_t *e) { return ctx->drv->get_eq ? ctx->drv->get_eq (e) : ENOSYS; } -int vdlPlaybackSetEq(VDL_HANDLE ctx, const vidix_video_eq_t * e) +int vdlPlaybackSetEq (VDL_HANDLE ctx, const vidix_video_eq_t *e) { return ctx->drv->set_eq ? ctx->drv->set_eq (e) : ENOSYS; } -int vdlPlaybackCopyFrame(VDL_HANDLE ctx, const vidix_dma_t * f) +int vdlPlaybackCopyFrame (VDL_HANDLE ctx, const vidix_dma_t *f) { return ctx->drv->copy_frame ? ctx->drv->copy_frame (f) : ENOSYS; } -int vdlGetGrKeys(VDL_HANDLE ctx, vidix_grkey_t * k) +int vdlGetGrKeys (VDL_HANDLE ctx, vidix_grkey_t *k) { return ctx->drv->get_gkey ? ctx->drv->get_gkey (k) : ENOSYS; } -int vdlSetGrKeys(VDL_HANDLE ctx, const vidix_grkey_t * k) +int vdlSetGrKeys (VDL_HANDLE ctx, const vidix_grkey_t *k) { return ctx->drv->set_gkey ? ctx->drv->set_gkey (k) : ENOSYS; } -int vdlPlaybackGetDeint(VDL_HANDLE ctx, vidix_deinterlace_t * d) +int vdlPlaybackGetDeint (VDL_HANDLE ctx, vidix_deinterlace_t *d) { return ctx->drv->get_deint ? ctx->drv->get_deint (d) : ENOSYS; } -int vdlPlaybackSetDeint(VDL_HANDLE ctx, const vidix_deinterlace_t * d) +int vdlPlaybackSetDeint (VDL_HANDLE ctx, const vidix_deinterlace_t *d) { return ctx->drv->set_deint ? ctx->drv->set_deint (d) : ENOSYS; } -- cgit v1.2.3 From b40e5e88d586096db2deabe901e5523f76eb7b55 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:28:50 +0000 Subject: remove useless typedef againstfor VDXContext git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27116 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vosub_vidix.c | 2 +- vidix/vidix.c | 30 +++++++++++++++--------------- vidix/vidix.h | 32 +++++++++++++++----------------- 3 files changed, 31 insertions(+), 33 deletions(-) (limited to 'vidix') diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c index fec1d9ce32..e2b7d10634 100644 --- a/libvo/vosub_vidix.c +++ b/libvo/vosub_vidix.c @@ -39,7 +39,7 @@ #define NUM_FRAMES VID_PLAY_MAXFRAMES /* Temporary: driver will overwrite it */ -static VDL_HANDLE vidix_handler = NULL; +static VDXContext *vidix_handler = NULL; static uint8_t *vidix_mem = NULL; static uint8_t next_frame; static unsigned image_Bpp,image_height,image_width,src_format,forced_fourcc=0; diff --git a/vidix/vidix.c b/vidix/vidix.c index a8f291e6d9..fa371657c5 100644 --- a/vidix/vidix.c +++ b/vidix/vidix.c @@ -44,7 +44,7 @@ #include "libavutil/common.h" #include "mpbswap.h" -VDL_HANDLE vdlOpen(const char *name,unsigned cap,int verbose) +VDXContext *vdlOpen(const char *name,unsigned cap,int verbose) { VDXContext *ctx; @@ -90,7 +90,7 @@ VDL_HANDLE vdlOpen(const char *name,unsigned cap,int verbose) return ctx; } -void vdlClose(VDL_HANDLE ctx) +void vdlClose(VDXContext *ctx) { if (ctx->drv->destroy) ctx->drv->destroy (); @@ -99,7 +99,7 @@ void vdlClose(VDL_HANDLE ctx) free (ctx); } -int vdlGetCapability(VDL_HANDLE ctx, vidix_capability_t *cap) +int vdlGetCapability(VDXContext *ctx, vidix_capability_t *cap) { return ctx->drv->get_caps (cap); } @@ -116,64 +116,64 @@ static uint32_t normalize_fourcc (uint32_t fourcc) return fourcc; } -int vdlQueryFourcc(VDL_HANDLE ctx, vidix_fourcc_t *f) +int vdlQueryFourcc(VDXContext *ctx, vidix_fourcc_t *f) { f->fourcc = normalize_fourcc(f->fourcc); return ctx->drv->query_fourcc (f); } -int vdlConfigPlayback (VDL_HANDLE ctx, vidix_playback_t *p) +int vdlConfigPlayback (VDXContext *ctx, vidix_playback_t *p) { p->fourcc = normalize_fourcc(p->fourcc); return ctx->drv->config_playback (p); } -int vdlPlaybackOn (VDL_HANDLE ctx) +int vdlPlaybackOn (VDXContext *ctx) { return ctx->drv->playback_on (); } -int vdlPlaybackOff (VDL_HANDLE ctx) +int vdlPlaybackOff (VDXContext *ctx) { return ctx->drv->playback_off (); } -int vdlPlaybackFrameSelect (VDL_HANDLE ctx, unsigned frame_idx) +int vdlPlaybackFrameSelect (VDXContext *ctx, unsigned frame_idx) { return ctx->drv->frame_sel ? ctx->drv->frame_sel (frame_idx) : ENOSYS; } -int vdlPlaybackGetEq (VDL_HANDLE ctx, vidix_video_eq_t *e) +int vdlPlaybackGetEq (VDXContext *ctx, vidix_video_eq_t *e) { return ctx->drv->get_eq ? ctx->drv->get_eq (e) : ENOSYS; } -int vdlPlaybackSetEq (VDL_HANDLE ctx, const vidix_video_eq_t *e) +int vdlPlaybackSetEq (VDXContext *ctx, const vidix_video_eq_t *e) { return ctx->drv->set_eq ? ctx->drv->set_eq (e) : ENOSYS; } -int vdlPlaybackCopyFrame (VDL_HANDLE ctx, const vidix_dma_t *f) +int vdlPlaybackCopyFrame (VDXContext *ctx, const vidix_dma_t *f) { return ctx->drv->copy_frame ? ctx->drv->copy_frame (f) : ENOSYS; } -int vdlGetGrKeys (VDL_HANDLE ctx, vidix_grkey_t *k) +int vdlGetGrKeys (VDXContext *ctx, vidix_grkey_t *k) { return ctx->drv->get_gkey ? ctx->drv->get_gkey (k) : ENOSYS; } -int vdlSetGrKeys (VDL_HANDLE ctx, const vidix_grkey_t *k) +int vdlSetGrKeys (VDXContext *ctx, const vidix_grkey_t *k) { return ctx->drv->set_gkey ? ctx->drv->set_gkey (k) : ENOSYS; } -int vdlPlaybackGetDeint (VDL_HANDLE ctx, vidix_deinterlace_t *d) +int vdlPlaybackGetDeint (VDXContext *ctx, vidix_deinterlace_t *d) { return ctx->drv->get_deint ? ctx->drv->get_deint (d) : ENOSYS; } -int vdlPlaybackSetDeint (VDL_HANDLE ctx, const vidix_deinterlace_t *d) +int vdlPlaybackSetDeint (VDXContext *ctx, const vidix_deinterlace_t *d) { return ctx->drv->set_deint ? ctx->drv->set_deint (d) : ENOSYS; } diff --git a/vidix/vidix.h b/vidix/vidix.h index 0bb0697b4b..0a00d89412 100644 --- a/vidix/vidix.h +++ b/vidix/vidix.h @@ -336,8 +336,6 @@ typedef struct VDXContext { /* PUBLIC API */ /***************************************************************************/ -typedef VDXContext *VDL_HANDLE; - /* Opens corresponded video driver and returns handle of associated stream. * path - specifies path where drivers are located. * name - specifies prefered driver name (can be NULL). @@ -345,48 +343,48 @@ typedef VDXContext *VDL_HANDLE; * verbose - specifies verbose level * returns handle if ok else NULL. */ -VDL_HANDLE vdlOpen (const char *name,unsigned cap,int verbose); +VDXContext *vdlOpen (const char *name,unsigned cap,int verbose); /* Closes stream and corresponded driver. */ -void vdlClose (VDL_HANDLE ctx); +void vdlClose (VDXContext *ctx); /* Queries driver capabilities. Return 0 if ok else errno */ -int vdlGetCapability (VDL_HANDLE, vidix_capability_t *); +int vdlGetCapability (VDXContext *, vidix_capability_t *); /* Queries support for given fourcc. Returns 0 if ok else errno */ -int vdlQueryFourcc (VDL_HANDLE, vidix_fourcc_t *); +int vdlQueryFourcc (VDXContext *, vidix_fourcc_t *); /* Returns 0 if ok else errno */ -int vdlConfigPlayback (VDL_HANDLE, vidix_playback_t *); +int vdlConfigPlayback (VDXContext *, vidix_playback_t *); /* Returns 0 if ok else errno */ -int vdlPlaybackOn (VDL_HANDLE); +int vdlPlaybackOn (VDXContext *); /* Returns 0 if ok else errno */ -int vdlPlaybackOff (VDL_HANDLE); +int vdlPlaybackOff (VDXContext *); /* Returns 0 if ok else errno */ -int vdlPlaybackFrameSelect (VDL_HANDLE, unsigned frame_idx); +int vdlPlaybackFrameSelect (VDXContext *, unsigned frame_idx); /* Returns 0 if ok else errno */ -int vdlGetGrKeys (VDL_HANDLE, vidix_grkey_t *); +int vdlGetGrKeys (VDXContext *, vidix_grkey_t *); /* Returns 0 if ok else errno */ -int vdlSetGrKeys (VDL_HANDLE, const vidix_grkey_t *); +int vdlSetGrKeys (VDXContext *, const vidix_grkey_t *); /* Returns 0 if ok else errno */ -int vdlPlaybackGetEq (VDL_HANDLE, vidix_video_eq_t *); +int vdlPlaybackGetEq (VDXContext *, vidix_video_eq_t *); /* Returns 0 if ok else errno */ -int vdlPlaybackSetEq (VDL_HANDLE, const vidix_video_eq_t *); +int vdlPlaybackSetEq (VDXContext *, const vidix_video_eq_t *); /* Returns 0 if ok else errno */ -int vdlPlaybackGetDeint (VDL_HANDLE, vidix_deinterlace_t *); +int vdlPlaybackGetDeint (VDXContext *, vidix_deinterlace_t *); /* Returns 0 if ok else errno */ -int vdlPlaybackSetDeint (VDL_HANDLE, const vidix_deinterlace_t *); +int vdlPlaybackSetDeint (VDXContext *, const vidix_deinterlace_t *); /* Returns 0 if ok else errno */ -int vdlQueryNumOemEffects (VDL_HANDLE, unsigned *number); +int vdlQueryNumOemEffects (VDXContext *, unsigned *number); #endif /* MPLAYER_VIDIX_H */ -- cgit v1.2.3 From f3a13413c942e6a70bdcc996625b7ffa2aa8dac6 Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 20 Jun 2008 20:38:15 +0000 Subject: cosmetic: be consistent git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27119 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/vidix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vidix') diff --git a/vidix/vidix.c b/vidix/vidix.c index fa371657c5..f5da49da7f 100644 --- a/vidix/vidix.c +++ b/vidix/vidix.c @@ -116,7 +116,7 @@ static uint32_t normalize_fourcc (uint32_t fourcc) return fourcc; } -int vdlQueryFourcc(VDXContext *ctx, vidix_fourcc_t *f) +int vdlQueryFourcc (VDXContext *ctx, vidix_fourcc_t *f) { f->fourcc = normalize_fourcc(f->fourcc); return ctx->drv->query_fourcc (f); -- cgit v1.2.3