changeset 4070:b61ba6c256dd

Minor interface changes: color and video keys are moved out from playback configuring
author nick
date Wed, 09 Jan 2002 18:58:25 +0000
parents a773fa0a9c4c
children 9e77ea7212a2
files vidix/drivers/radeon_vid.c vidix/vidix.h vidix/vidixlib.c vidix/vidixlib.h
diffstat 4 files changed, 39 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/radeon_vid.c	Wed Jan 09 18:17:18 2002 +0000
+++ b/vidix/drivers/radeon_vid.c	Wed Jan 09 18:58:25 2002 +0000
@@ -672,6 +672,7 @@
   /* 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;  
--- a/vidix/vidix.h	Wed Jan 09 18:17:18 2002 +0000
+++ b/vidix/vidix.h	Wed Jan 09 18:58:25 2002 +0000
@@ -137,13 +137,6 @@
 	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 @@
 			/* 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 */
--- a/vidix/vidixlib.c	Wed Jan 09 18:17:18 2002 +0000
+++ b/vidix/vidixlib.c	Wed Jan 09 18:58:25 2002 +0000
@@ -43,6 +43,8 @@
 	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 @@
   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 @@
 {
   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;
+}
--- a/vidix/vidixlib.h	Wed Jan 09 18:17:18 2002 +0000
+++ b/vidix/vidixlib.h	Wed Jan 09 18:58:25 2002 +0000
@@ -61,6 +61,12 @@
 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 * );
 
 			/* Returns 0 if ok else errno */