mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
vidix_grkey_support checking for colorkeying
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4256 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c78615bc71
commit
c8f1194dda
@ -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);
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user