Minor interface changes: color and video keys are moved out from playback configuring

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4071 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nick 2002-01-09 18:58:25 +00:00
parent 9e2284fe3e
commit 1f6944f4cb
4 changed files with 39 additions and 7 deletions

View File

@ -672,6 +672,7 @@ int vixInit( void )
/* mem size is bits [28:0], mask off the rest. Range: from 1Mb up to 512 Mb */
radeon_ram_size &= CONFIG_MEMSIZE_MASK;
if((radeon_mem_base = map_phys_mem(pci_info.base0,radeon_ram_size))==(void *)-1) return ENOMEM;
memset(&besr,0,sizeof(bes_registers_t));
radeon_vid_make_default();
printf(RADEON_MSG" Video memory = %uMb\n",radeon_ram_size/0x100000);
return 0;

View File

@ -137,13 +137,6 @@ typedef struct vidix_playback_s
unsigned blend_factor; /* app -> driver: blenfing factor */
vidix_rect_t src; /* app -> driver: original movie size */
vidix_rect_t dest; /* app -> driver: destinition movie size. driver->app dest_pitch */
vidix_ckey_t ckey; /* app -> driver: color key */
vidix_vkey_t vkey; /* app -> driver: video key */
#define KEYS_PUT 0
#define KEYS_AND 1
#define KEYS_OR 2
#define KEYS_XOR 3
unsigned key_op; /* app -> driver: keys operations */
/* memory model */
unsigned frame_size; /* driver -> app; destinition frame size */
unsigned num_frames; /* app -> driver; after call: driver -> app */
@ -165,6 +158,24 @@ extern int vixPlaybackOff( void );
/* Returns 0 if ok else errno */
extern int vixPlaybackFrameSelect( unsigned frame_idx );
typedef struct vidix_grkey_s
{
vidix_ckey_t ckey; /* app -> driver: color key */
vidix_vkey_t vkey; /* app -> driver: video key */
#define KEYS_PUT 0
#define KEYS_AND 1
#define KEYS_OR 2
#define KEYS_XOR 3
unsigned key_op; /* app -> driver: keys operations */
}vidix_grkey_t;
/* Returns 0 if ok else errno */
extern int vixGetGrKeys( vidix_grkey_t * );
/* Returns 0 if ok else errno */
extern int vixSetGrKeys( const vidix_grkey_t * );
typedef struct vidix_video_eq_s
{
/* end-user app can have presets like: cold-normal-hot picture and so on */

View File

@ -43,6 +43,8 @@ typedef struct vdl_stream_s
int (*get_eq)( vidix_video_eq_t * );
int (*set_eq)( const vidix_video_eq_t * );
int (*copy_frame)( const vidix_dma_t * );
int (*get_gkey)( vidix_grkey_t * );
int (*set_gkey)( const vidix_grkey_t * );
}vdl_stream_t;
#define t_vdl(p) (((vdl_stream_t *)p))
@ -64,6 +66,8 @@ static int vdl_fill_driver(VDL_HANDLE stream)
t_vdl(stream)->frame_sel = dlsym(t_vdl(stream)->handle,"vixPlaybackFrameSelect");
t_vdl(stream)->get_eq = dlsym(t_vdl(stream)->handle,"vixPlaybackGetEq");
t_vdl(stream)->set_eq = dlsym(t_vdl(stream)->handle,"vixPlaybackSetEq");
t_vdl(stream)->get_gkey = dlsym(t_vdl(stream)->handle,"vixGetGrKeys");
t_vdl(stream)->set_gkey = dlsym(t_vdl(stream)->handle,"vixSetGrKeys");
t_vdl(stream)->copy_frame = dlsym(t_vdl(stream)->handle,"vixPlaybackCopyFrame");
/* check driver viability */
if(!( t_vdl(stream)->get_caps && t_vdl(stream)->query_fourcc &&
@ -250,3 +254,13 @@ int vdlPlaybackCopyFrame(VDL_HANDLE handle, const vidix_dma_t * f)
{
return t_vdl(handle)->copy_frame ? t_vdl(handle)->copy_frame(f) : ENOSYS;
}
int vdlGetGrKeys(VDL_HANDLE handle, vidix_grkey_t * k)
{
return t_vdl(handle)->get_gkey ? t_vdl(handle)->get_gkey(k) : ENOSYS;
}
int vdlSetGrKeys(VDL_HANDLE handle, const vidix_grkey_t * k)
{
return t_vdl(handle)->set_gkey ? t_vdl(handle)->set_gkey(k) : ENOSYS;
}

View File

@ -60,6 +60,12 @@ extern int vdlPlaybackOff(VDL_HANDLE);
/* Returns 0 if ok else errno */
extern int vdlPlaybackFrameSelect(VDL_HANDLE, unsigned frame_idx );
/* Returns 0 if ok else errno */
extern int vdlGetGrKeys(VDL_HANDLE, vidix_grkey_t * );
/* Returns 0 if ok else errno */
extern int vdlSetGrKeys(VDL_HANDLE, const vidix_grkey_t * );
/* Returns 0 if ok else errno */
extern int vdlPlaybackGetEq(VDL_HANDLE, vidix_video_eq_t * );