2002-01-05 10:13:25 +00:00
|
|
|
/*
|
2007-04-22 14:05:41 +00:00
|
|
|
* VIDIX - VIDeo Interface for *niX.
|
|
|
|
* Copyright (C) 2002 Nick Kurshev
|
|
|
|
* Copyright (C) 2007 Benjamin Zores <ben@geexbox.org>
|
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*
|
|
|
|
* This interface is introduced as universal one to MPEG decoder,
|
|
|
|
* Back End Scaler (BES) and YUV2RGB hw accelerators.
|
|
|
|
*
|
2002-01-05 10:13:25 +00:00
|
|
|
* 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).
|
2007-04-22 14:05:41 +00:00
|
|
|
*
|
2002-01-05 10:13:25 +00:00
|
|
|
* This interface is based on v4l2, fbvid.h, mga_vid.h projects
|
|
|
|
* and personally my ideas.
|
2007-04-22 14:05:41 +00:00
|
|
|
*
|
|
|
|
* NOTE: This interface is introduces as driver interface.
|
|
|
|
*/
|
|
|
|
|
2002-01-05 10:13:25 +00:00
|
|
|
#ifndef VIDIXLIB_H
|
|
|
|
#define VIDIXLIB_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "vidix.h"
|
|
|
|
|
2007-04-01 11:06:06 +00:00
|
|
|
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;
|
|
|
|
|
2007-04-01 12:39:06 +00:00
|
|
|
typedef VDXContext * VDL_HANDLE;
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* returns library version */
|
2007-04-01 12:26:31 +00:00
|
|
|
unsigned vdlGetVersion( void );
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* 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).
|
2002-01-05 18:16:19 +00:00
|
|
|
verbose - specifies verbose level
|
2002-01-05 10:13:25 +00:00
|
|
|
returns !0 if ok else NULL.
|
|
|
|
*/
|
2007-04-01 12:26:31 +00:00
|
|
|
VDL_HANDLE vdlOpen(const char *path,const char *name,unsigned cap,int verbose);
|
2002-01-05 10:13:25 +00:00
|
|
|
/* Closes stream and corresponded driver. */
|
2007-04-01 12:39:06 +00:00
|
|
|
void vdlClose(VDL_HANDLE ctx);
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* Queries driver capabilities. Return 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlGetCapability(VDL_HANDLE, vidix_capability_t *);
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* Queries support for given fourcc. Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlQueryFourcc(VDL_HANDLE,vidix_fourcc_t *);
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlConfigPlayback(VDL_HANDLE, vidix_playback_t *);
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackOn(VDL_HANDLE);
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackOff(VDL_HANDLE);
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx );
|
2002-01-05 10:13:25 +00:00
|
|
|
|
2002-01-09 18:58:25 +00:00
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlGetGrKeys(VDL_HANDLE, vidix_grkey_t * );
|
2002-01-09 18:58:25 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlSetGrKeys(VDL_HANDLE, const vidix_grkey_t * );
|
2002-01-09 18:58:25 +00:00
|
|
|
|
2002-01-05 10:13:25 +00:00
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * );
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackSetEq(VDL_HANDLE, const vidix_video_eq_t * );
|
2002-01-05 10:13:25 +00:00
|
|
|
|
2002-01-16 08:33:17 +00:00
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackGetDeint(VDL_HANDLE, vidix_deinterlace_t * );
|
2002-01-16 08:33:17 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackSetDeint(VDL_HANDLE, const vidix_deinterlace_t * );
|
2002-01-16 08:33:17 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlQueryNumOemEffects(VDL_HANDLE, unsigned * number );
|
2002-01-16 08:33:17 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlGetOemEffect(VDL_HANDLE, vidix_oem_fx_t * );
|
2002-01-16 08:33:17 +00:00
|
|
|
|
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlSetOemEffect(VDL_HANDLE, const vidix_oem_fx_t * );
|
2002-01-16 08:33:17 +00:00
|
|
|
|
|
|
|
|
2002-01-05 10:13:25 +00:00
|
|
|
/* Returns 0 if ok else errno */
|
2007-04-01 12:26:31 +00:00
|
|
|
int vdlPlaybackCopyFrame(VDL_HANDLE, const vidix_dma_t * );
|
2002-01-05 10:13:25 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|