aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-19 16:58:33 +0000
committerGravatar alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-01-19 16:58:33 +0000
commitc8f1194dda04074a959712d878f9dc7c3333f99b (patch)
tree475e61f1f3e4c35e22f35c2e0982473313e0cc2e
parentc78615bc71a86d52ed8849b2a12dade1e88e7dfd (diff)
vidix_grkey_support checking for colorkeying
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4256 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_xvidix.c18
-rw-r--r--libvo/vosub_vidix.c6
-rw-r--r--libvo/vosub_vidix.h1
3 files changed, 17 insertions, 8 deletions
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 60198e8bdd..57c07a3b05 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -187,7 +187,6 @@ static void set_window(int force_update)
static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
- unsigned int fg, bg;
XVisualInfo vinfo;
XEvent xev;
XSizeHints hint;
@@ -359,13 +358,16 @@ else
}
#endif
- vidix_grkey_get(&gr_key);
- gr_key.key_op = KEYS_PUT;
- gr_key.ckey.op = CKEY_TRUE;
- gr_key.ckey.red = 255;
- gr_key.ckey.green = 0;
- gr_key.ckey.blue = 255;
- vidix_grkey_set(&gr_key);
+ if (vidix_grkey_support())
+ {
+ vidix_grkey_get(&gr_key);
+ gr_key.key_op = KEYS_PUT;
+ gr_key.ckey.op = CKEY_TRUE;
+ gr_key.ckey.red = 255;
+ gr_key.ckey.green = 0;
+ gr_key.ckey.blue = 255;
+ vidix_grkey_set(&gr_key);
+ }
set_window(1);
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c
index 29e7ff3615..a2994701c0 100644
--- a/libvo/vosub_vidix.c
+++ b/libvo/vosub_vidix.c
@@ -190,6 +190,7 @@ int vidix_start(void)
printf("vosub_vidix: Can't start playback: %s\n",strerror(err));
return -1;
}
+
vid_eq.brightness = vo_gamma_brightness;
vid_eq.saturation = vo_gamma_saturation;
vid_eq.contrast = vo_gamma_contrast;
@@ -373,6 +374,11 @@ uint32_t vidix_query_fourcc(uint32_t format)
return vidix_fourcc.depth != VID_DEPTH_NONE;
}
+int vidix_grkey_support(void)
+{
+ return (vidix_fourcc.flags & VID_CAP_COLORKEY);
+}
+
int vidix_grkey_get(vidix_grkey_t *gr_key)
{
return(vdlGetGrKeys(vidix_handler, gr_key));
diff --git a/libvo/vosub_vidix.h b/libvo/vosub_vidix.h
index 584279572d..3b39ccb715 100644
--- a/libvo/vosub_vidix.h
+++ b/libvo/vosub_vidix.h
@@ -31,6 +31,7 @@ void vidix_draw_osd(void);
#include "../vidix/vidix.h"
/* graphic keys */
+int vidix_grkey_support(void);
int vidix_grkey_get(vidix_grkey_t *gr_key);
int vidix_grkey_set(const vidix_grkey_t *gr_key);