| 1 |
/* |
| 2 |
* vidixlib.h |
| 3 |
* VIDIXLib - Library for VIDeo Interface for *niX |
| 4 |
* This interface is introduced as universal one to MPEG decoder, |
| 5 |
* BES == Back End Scaler and YUV2RGB hw accelerators. |
| 6 |
* In the future it may be expanded up to capturing and audio things. |
| 7 |
* Main goal of this this interface imlpementation is providing DGA |
| 8 |
* everywhere where it's possible (unlike X11 and other). |
| 9 |
* Copyright 2002 Nick Kurshev |
| 10 |
* Licence: GPL |
| 11 |
* This interface is based on v4l2, fbvid.h, mga_vid.h projects |
| 12 |
* and personally my ideas. |
| 13 |
* NOTE: This interface is introduces as APP interface. |
| 14 |
* Don't use it for driver. |
| 15 |
* It provides multistreaming. This mean that APP can handle |
| 16 |
* several streams simultaneously. (Example: Video capturing and video |
| 17 |
* playback or capturing, video playback, audio encoding and so on). |
| 18 |
*/ |
| 19 |
#ifndef VIDIXLIB_H |
| 20 |
#define VIDIXLIB_H |
| 21 |
|
| 22 |
#ifdef __cplusplus |
| 23 |
extern "C" { |
| 24 |
#endif |
| 25 |
|
| 26 |
#include "vidix.h" |
| 27 |
|
| 28 |
typedef void * VDL_HANDLE; |
| 29 |
|
| 30 |
/* returns library version */ |
| 31 |
extern unsigned vdlGetVersion( void ); |
| 32 |
|
| 33 |
/* Opens corresponded video driver and returns handle |
| 34 |
of associated stream. |
| 35 |
path - specifies path where drivers are located. |
| 36 |
name - specifies prefered driver name (can be NULL). |
| 37 |
cap - specifies driver capability (TYPE_* constants). |
| 38 |
verbose - specifies verbose level |
| 39 |
returns !0 if ok else NULL. |
| 40 |
*/ |
| 41 |
extern VDL_HANDLE vdlOpen(const char *path,const char *name,unsigned cap,int verbose); |
| 42 |
/* Closes stream and corresponded driver. */ |
| 43 |
extern void vdlClose(VDL_HANDLE stream); |
| 44 |
|
| 45 |
/* Queries driver capabilities. Return 0 if ok else errno */ |
| 46 |
extern int vdlGetCapability(VDL_HANDLE, vidix_capability_t *); |
| 47 |
|
| 48 |
/* Queries support for given fourcc. Returns 0 if ok else errno */ |
| 49 |
extern int vdlQueryFourcc(VDL_HANDLE,vidix_fourcc_t *); |
| 50 |
|
| 51 |
/* Returns 0 if ok else errno */ |
| 52 |
extern int vdlConfigPlayback(VDL_HANDLE, vidix_playback_t *); |
| 53 |
|
| 54 |
/* Returns 0 if ok else errno */ |
| 55 |
extern int vdlPlaybackOn(VDL_HANDLE); |
| 56 |
|
| 57 |
/* Returns 0 if ok else errno */ |
| 58 |
extern int vdlPlaybackOff(VDL_HANDLE); |
| 59 |
|
| 60 |
/* Returns 0 if ok else errno */ |
| 61 |
extern int vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx ); |
| 62 |
|
| 63 |
/* Returns 0 if ok else errno */ |
| 64 |
extern int vdlGetGrKeys(VDL_HANDLE, vidix_grkey_t * ); |
| 65 |
|
| 66 |
/* Returns 0 if ok else errno */ |
| 67 |
extern int vdlSetGrKeys(VDL_HANDLE, const vidix_grkey_t * ); |
| 68 |
|
| 69 |
/* Returns 0 if ok else errno */ |
| 70 |
extern int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * ); |
| 71 |
|
| 72 |
/* Returns 0 if ok else errno */ |
| 73 |
extern int vdlPlaybackSetEq(VDL_HANDLE, const vidix_video_eq_t * ); |
| 74 |
|
| 75 |
/* Returns 0 if ok else errno */ |
| 76 |
extern int vdlPlaybackGetDeint(VDL_HANDLE, vidix_deinterlace_t * ); |
| 77 |
|
| 78 |
/* Returns 0 if ok else errno */ |
| 79 |
extern int vdlPlaybackSetDeint(VDL_HANDLE, const vidix_deinterlace_t * ); |
| 80 |
|
| 81 |
/* Returns 0 if ok else errno */ |
| 82 |
extern int vdlQueryNumOemEffects(VDL_HANDLE, unsigned * number ); |
| 83 |
|
| 84 |
/* Returns 0 if ok else errno */ |
| 85 |
extern int vdlGetOemEffect(VDL_HANDLE, vidix_oem_fx_t * ); |
| 86 |
|
| 87 |
/* Returns 0 if ok else errno */ |
| 88 |
extern int vdlSetOemEffect(VDL_HANDLE, const vidix_oem_fx_t * ); |
| 89 |
|
| 90 |
|
| 91 |
/* Returns 0 if ok else errno */ |
| 92 |
extern int vdlPlaybackCopyFrame(VDL_HANDLE, vidix_dma_t * ); |
| 93 |
|
| 94 |
/* Returns 0 if DMA is available else errno (EBUSY) */ |
| 95 |
extern int vdlQueryDMAStatus( VDL_HANDLE ); |
| 96 |
|
| 97 |
/* |
| 98 |
ABI related extensions. |
| 99 |
Note: you should use this functions if you are using shared version |
| 100 |
of vidix. |
| 101 |
*/ |
| 102 |
extern vidix_capability_t * vdlAllocCapabilityS( void ); |
| 103 |
extern vidix_fourcc_t * vdlAllocFourccS( void ); |
| 104 |
extern vidix_playback_t * vdlAllocPlaybackS( void ); |
| 105 |
extern vidix_yuv_t * vdlAllocYUVS( void ); |
| 106 |
extern vidix_rect_t * vdlAllocRectS( void ); |
| 107 |
extern vidix_grkey_t * vdlAllocGrKeyS( void ); |
| 108 |
extern vidix_video_eq_t * vdlAllocVideoEqS( void ); |
| 109 |
extern vidix_deinterlace_t * vdlAllocDeinterlaceS( void ); |
| 110 |
extern vidix_dma_t * vdlAllocDmaS( void ); |
| 111 |
extern vidix_oem_fx_t * vdlAllocOemFxS( void ); |
| 112 |
|
| 113 |
extern void vdlFreeCapabilityS(vidix_capability_t * ); |
| 114 |
extern void vdlFreeFourccS( vidix_fourcc_t * ); |
| 115 |
extern void vdlFreePlaybackS( vidix_playback_t * ); |
| 116 |
extern void vdlFreeYUVS( vidix_yuv_t * ); |
| 117 |
extern void vdlFreeRectS( vidix_rect_t * ); |
| 118 |
extern void vdlFreeGrKeyS( vidix_grkey_t * ); |
| 119 |
extern void vdlFreeVideoEqS( vidix_video_eq_t * ); |
| 120 |
extern void vdlFreeDeinterlaceS( vidix_deinterlace_t * ); |
| 121 |
extern void vdlFreeDmaS( vidix_dma_t * ); |
| 122 |
extern void vdlFreeOemFxS( vidix_oem_fx_t * ); |
| 123 |
|
| 124 |
#ifdef __cplusplus |
| 125 |
} |
| 126 |
#endif |
| 127 |
|
| 128 |
#endif |