summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--include/xine/video_out.h9
-rw-r--r--src/video_out/video_out_directfb.c18
-rw-r--r--src/video_out/video_out_fb.c2
-rw-r--r--src/video_out/video_out_opengl.c2
-rw-r--r--src/video_out/video_out_pgx64.c3
-rw-r--r--src/video_out/video_out_vidix.c6
-rw-r--r--src/video_out/video_out_xcbshm.c2
-rw-r--r--src/video_out/video_out_xcbxv.c8
-rw-r--r--src/video_out/video_out_xshm.c2
-rw-r--r--src/video_out/video_out_xv.c8
-rw-r--r--src/video_out/video_out_xvmc.c8
-rw-r--r--src/video_out/video_out_xxmc.c8
13 files changed, 64 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index e9b0c3ce0..efecc4ccd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -57,6 +57,8 @@ xine-lib (1.1.90) (Unreleased)
please use DirectFB or VIDIX instead.
* The Xv and XxMC video output plugins now support Xv port selection.
(XvMC does not, at present.)
+ * Report more video output capabilities via (port)->get_capabilities():
+ colour controls, zooming, colour keying.
xine-lib (1.1.11) unreleased
* Reworked the plugin directory naming so that external plugins don't have
diff --git a/include/xine/video_out.h b/include/xine/video_out.h
index f34380af1..02eff3cac 100644
--- a/include/xine/video_out.h
+++ b/include/xine/video_out.h
@@ -282,7 +282,14 @@ struct xine_video_port_s {
#define VO_CAP_UNSCALED_OVERLAY 0x00000010 /* driver can blend overlay at output resolution */
#define VO_CAP_CROP 0x00000020 /* driver can crop */
#define VO_CAP_XXMC 0x00000040 /* driver can use extended XvMC */
-
+#define VO_CAP_HUE 0x00010000
+#define VO_CAP_SATURATION 0x00020000
+#define VO_CAP_CONTRAST 0x00040000
+#define VO_CAP_BRIGHTNESS 0x00080000
+#define VO_CAP_COLORKEY 0x00100000
+#define VO_CAP_AUTOPAINT_COLORKEY 0x00200000
+#define VO_CAP_ZOOM_X 0x00400000
+#define VO_CAP_ZOOM_Y 0x00800000
/*
* vo_driver_s contains the functions every display driver
diff --git a/src/video_out/video_out_directfb.c b/src/video_out/video_out_directfb.c
index d85df411a..fecc2c5b0 100644
--- a/src/video_out/video_out_directfb.c
+++ b/src/video_out/video_out_directfb.c
@@ -1742,6 +1742,20 @@ static void directfb_frame_output_cb (void *user_data, int video_width, int vide
/*** DirectFB plugin functions ***/
+static inline int convert_caps (DFBDisplayLayerCapabilities caps)
+{
+ int vo = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_CROP | VO_CAP_ZOOM_X | VO_CAP_ZOOM_Y;
+ if (caps & DLCAPS_HUE)
+ vo |= VO_CAP_HUE;
+ if (caps & DLCAPS_SATURATION)
+ vo |= VO_CAP_SATURATION;
+ if (caps & DLCAPS_CONTRAST)
+ vo |= VO_CAP_CONTRAST;
+ if (caps & DLCAPS_BRIGHTNESS)
+ vo |= VO_CAP_BRIGHTNESS;
+ return vo;
+}
+
static vo_driver_t *open_plugin_fb (video_driver_class_t *class_gen, const void *visual_gen) {
directfb_class_t *class = (directfb_class_t *) class_gen;
directfb_driver_t *this;
@@ -1821,7 +1835,7 @@ static vo_driver_t *open_plugin_fb (video_driver_class_t *class_gen, const void
return NULL;
}
- this->capabilities = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_CROP;
+ this->capabilities = convert_caps (this->caps);
/* set default configuration */
this->buffermode = 1; // double
this->vsync = 0;
@@ -2000,7 +2014,7 @@ static vo_driver_t *open_plugin_x11 (video_driver_class_t *class_gen, const void
xprintf (this->xine, XINE_VERBOSITY_LOG,
_("video_out_directfb: using display layer #%d.\n"), id);
- this->capabilities = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_CROP;
+ this->capabilities = convert_caps (this->caps);
/* set default configuration */
this->buffermode = 1; // double
this->vsync = 0;
diff --git a/src/video_out/video_out_fb.c b/src/video_out/video_out_fb.c
index 17224ecad..5a49b80a3 100644
--- a/src/video_out/video_out_fb.c
+++ b/src/video_out/video_out_fb.c
@@ -155,7 +155,7 @@ typedef struct
static uint32_t fb_get_capabilities(vo_driver_t *this_gen)
{
- return VO_CAP_YV12 | VO_CAP_YUY2;
+ return VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS | VO_CAP_CONTRAST | VO_CAP_SATURATION;
}
static void fb_frame_proc_slice(vo_frame_t *vo_img, uint8_t **src)
diff --git a/src/video_out/video_out_opengl.c b/src/video_out/video_out_opengl.c
index 21383453e..2ffd83637 100644
--- a/src/video_out/video_out_opengl.c
+++ b/src/video_out/video_out_opengl.c
@@ -1200,7 +1200,7 @@ static void *render_run (opengl_driver_t *this) {
static uint32_t opengl_get_capabilities (vo_driver_t *this_gen) {
/* opengl_driver_t *this = (opengl_driver_t *) this_gen; */
- uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2;
+ uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS | VO_CAP_CONTRAST | VO_CAP_SATURATION;
/* TODO: somehow performance goes down during the first few frames */
/* if (this->xoverlay) */
diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c
index d0e74b1e3..0bdcc35fe 100644
--- a/src/video_out/video_out_pgx64.c
+++ b/src/video_out/video_out_pgx64.c
@@ -552,8 +552,7 @@ static uint32_t pgx64_get_capabilities(vo_driver_t *this_gen)
{
/*pgx64_driver_t *this = (pgx64_driver_t *)(void *)this_gen;*/
- return VO_CAP_YV12 |
- VO_CAP_YUY2;
+ return VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS | VO_CAP_SATURATION;
}
static vo_frame_t *pgx64_alloc_frame(vo_driver_t *this_gen)
diff --git a/src/video_out/video_out_vidix.c b/src/video_out/video_out_vidix.c
index f4b74ad2a..586268513 100644
--- a/src/video_out/video_out_vidix.c
+++ b/src/video_out/video_out_vidix.c
@@ -964,7 +964,7 @@ static vidix_driver_t *open_plugin (video_driver_class_t *class_gen) {
this->config = config;
this->got_frame_data = 0;
- this->capabilities = VO_CAP_CROP;
+ this->capabilities = VO_CAP_CROP | VO_CAP_ZOOM_X | VO_CAP_ZOOM_Y;
/* Find what equalizer flags are supported */
if(this->vidix_cap.flags & FLAG_EQUALIZER) {
@@ -973,24 +973,28 @@ static vidix_driver_t *open_plugin (video_driver_class_t *class_gen) {
"video_out_vidix: couldn't get equalizer capabilities: %s\n", strerror(err));
} else {
if(this->vidix_eq.cap & VEQ_CAP_BRIGHTNESS) {
+ this->capabilities |= VO_CAP_BRIGHTNESS;
this->props[VO_PROP_BRIGHTNESS].value = 0;
this->props[VO_PROP_BRIGHTNESS].min = -1000;
this->props[VO_PROP_BRIGHTNESS].max = 1000;
}
if(this->vidix_eq.cap & VEQ_CAP_CONTRAST) {
+ this->capabilities |= VO_CAP_CONTRAST;
this->props[VO_PROP_CONTRAST].value = 0;
this->props[VO_PROP_CONTRAST].min = -1000;
this->props[VO_PROP_CONTRAST].max = 1000;
}
if(this->vidix_eq.cap & VEQ_CAP_SATURATION) {
+ this->capabilities |= VO_CAP_SATURATION;
this->props[VO_PROP_SATURATION].value = 0;
this->props[VO_PROP_SATURATION].min = -1000;
this->props[VO_PROP_SATURATION].max = 1000;
}
if(this->vidix_eq.cap & VEQ_CAP_HUE) {
+ this->capabilities |= VO_CAP_HUE;
this->props[VO_PROP_HUE].value = 0;
this->props[VO_PROP_HUE].min = -1000;
this->props[VO_PROP_HUE].max = 1000;
diff --git a/src/video_out/video_out_xcbshm.c b/src/video_out/video_out_xcbshm.c
index 9895d1852..1bacf50c9 100644
--- a/src/video_out/video_out_xcbshm.c
+++ b/src/video_out/video_out_xcbshm.c
@@ -221,7 +221,7 @@ static void dispose_ximage(xshm_driver_t *this, xshm_frame_t *frame)
static uint32_t xshm_get_capabilities (vo_driver_t *this_gen) {
xshm_driver_t *this = (xshm_driver_t *) this_gen;
- uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2;
+ uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS | VO_CAP_CONTRAST | VO_CAP_SATURATION;
if( this->xoverlay )
capabilities |= VO_CAP_UNSCALED_OVERLAY;
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c
index 6fed0f90a..18d752431 100644
--- a/src/video_out/video_out_xcbxv.c
+++ b/src/video_out/video_out_xcbxv.c
@@ -1234,7 +1234,7 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
this->gc = xcb_generate_id(this->connection);
xcb_create_gc(this->connection, this->gc, this->window, 0, NULL);
- this->capabilities = VO_CAP_CROP;
+ this->capabilities = VO_CAP_CROP | VO_CAP_ZOOM_X | VO_CAP_ZOOM_Y;
this->use_shm = 1;
this->use_colorkey = 0;
this->colorkey = 0;
@@ -1295,28 +1295,34 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
if (!strncmp(xcb_xv_adaptor_info_name(adaptor_it.data), "NV", 2)) {
xprintf (this->xine, XINE_VERBOSITY_NONE, LOG_MODULE ": ignoring broken XV_HUE settings on NVidia cards\n");
} else {
+ this->capabilities |= VO_CAP_HUE;
xv_check_capability (this, VO_PROP_HUE, attribute_it.data,
adaptor_it.data->base_id,
NULL, NULL, NULL);
}
} else if(!strcmp(name, "XV_SATURATION")) {
+ this->capabilities |= VO_CAP_SATURATION;
xv_check_capability (this, VO_PROP_SATURATION, attribute_it.data,
adaptor_it.data->base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_BRIGHTNESS")) {
+ this->capabilities |= VO_CAP_BRIGHTNESS;
xv_check_capability (this, VO_PROP_BRIGHTNESS, attribute_it.data,
adaptor_it.data->base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_CONTRAST")) {
+ this->capabilities |= VO_CAP_CONTRAST;
xv_check_capability (this, VO_PROP_CONTRAST, attribute_it.data,
adaptor_it.data->base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_COLORKEY")) {
+ this->capabilities |= VO_CAP_COLORKEY;
xv_check_capability (this, VO_PROP_COLORKEY, attribute_it.data,
adaptor_it.data->base_id,
"video.device.xv_colorkey",
VIDEO_DEVICE_XV_COLORKEY_HELP);
} else if(!strcmp(name, "XV_AUTOPAINT_COLORKEY")) {
+ this->capabilities |= VO_CAP_AUTOPAINT_COLORKEY;
xv_check_capability (this, VO_PROP_AUTOPAINT_COLORKEY, attribute_it.data,
adaptor_it.data->base_id,
"video.device.xv_autopaint_colorkey",
diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c
index 7801bb03b..8f51964e2 100644
--- a/src/video_out/video_out_xshm.c
+++ b/src/video_out/video_out_xshm.c
@@ -314,7 +314,7 @@ static void dispose_ximage (xshm_driver_t *this,
static uint32_t xshm_get_capabilities (vo_driver_t *this_gen) {
xshm_driver_t *this = (xshm_driver_t *) this_gen;
- uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2;
+ uint32_t capabilities = VO_CAP_YV12 | VO_CAP_YUY2 | VO_CAP_BRIGHTNESS | VO_CAP_CONTRAST | VO_CAP_SATURATION;
if( this->xoverlay )
capabilities |= VO_CAP_UNSCALED_OVERLAY;
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 6f5c68e51..115489e57 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -1275,7 +1275,7 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void *
LOCK_DISPLAY(this);
this->gc = XCreateGC (this->display, this->drawable, 0, NULL);
UNLOCK_DISPLAY(this);
- this->capabilities = VO_CAP_CROP;
+ this->capabilities = VO_CAP_CROP | VO_CAP_ZOOM_X | VO_CAP_ZOOM_Y;
this->use_shm = 1;
this->use_colorkey = 0;
this->colorkey = 0;
@@ -1342,28 +1342,34 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void *
if (!strncmp(adaptor_info[adaptor_num].name, "NV", 2)) {
xprintf (this->xine, XINE_VERBOSITY_NONE, LOG_MODULE ": ignoring broken XV_HUE settings on NVidia cards\n");
} else {
+ this->capabilities |= VO_CAP_HUE;
xv_check_capability (this, VO_PROP_HUE, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
}
} else if(!strcmp(name, "XV_SATURATION")) {
+ this->capabilities |= VO_CAP_SATURATION;
xv_check_capability (this, VO_PROP_SATURATION, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_BRIGHTNESS")) {
+ this->capabilities |= VO_CAP_BRIGHTNESS;
xv_check_capability (this, VO_PROP_BRIGHTNESS, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_CONTRAST")) {
+ this->capabilities |= VO_CAP_CONTRAST;
xv_check_capability (this, VO_PROP_CONTRAST, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_COLORKEY")) {
+ this->capabilities |= VO_CAP_COLORKEY;
xv_check_capability (this, VO_PROP_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
"video.device.xv_colorkey",
VIDEO_DEVICE_XV_COLORKEY_HELP);
} else if(!strcmp(name, "XV_AUTOPAINT_COLORKEY")) {
+ this->capabilities |= VO_CAP_AUTOPAINT_COLORKEY;
xv_check_capability (this, VO_PROP_AUTOPAINT_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
"video.device.xv_autopaint_colorkey",
diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c
index 9618b082c..7f282ee53 100644
--- a/src/video_out/video_out_xvmc.c
+++ b/src/video_out/video_out_xvmc.c
@@ -1332,7 +1332,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
XLockDisplay(this->display);
this->gc = XCreateGC(this->display, this->drawable, 0, NULL);
XUnlockDisplay(this->display);
- this->capabilities = VO_CAP_XVMC_MOCOMP | VO_CAP_CROP;
+ this->capabilities = VO_CAP_XVMC_MOCOMP | VO_CAP_CROP | VO_CAP_ZOOM_X | VO_CAP_ZOOM_Y;
this->surface_type_id = class->surface_type_id;
this->max_surface_width = class->max_surface_width;
@@ -1401,28 +1401,34 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
if (!strncmp(adaptor_info[adaptor_num].name, "NV", 2)) {
xprintf (this->xine, XINE_VERBOSITY_NONE, LOG_MODULE ": ignoring broken XV_HUE settings on NVidia cards\n");
} else {
+ this->capabilities |= VO_CAP_HUE;
xvmc_check_capability (this, VO_PROP_HUE, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
}
} else if(!strcmp(name, "XV_SATURATION")) {
+ this->capabilities |= VO_CAP_SATURATION;
xvmc_check_capability (this, VO_PROP_SATURATION, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(attr[k].name, "XV_BRIGHTNESS")) {
+ this->capabilities |= VO_CAP_BRIGHTNESS;
xvmc_check_capability (this, VO_PROP_BRIGHTNESS, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_CONTRAST")) {
+ this->capabilities |= VO_CAP_CONTRAST;
xvmc_check_capability (this, VO_PROP_CONTRAST, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_COLORKEY")) {
+ this->capabilities |= VO_CAP_COLORKEY;
xvmc_check_capability (this, VO_PROP_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
"video.device.xv_colorkey",
VIDEO_DEVICE_XV_COLORKEY_HELP);
} else if(!strcmp(name, "XV_AUTOPAINT_COLORKEY")) {
+ this->capabilities |= VO_CAP_AUTOPAINT_COLORKEY;
xvmc_check_capability (this, VO_PROP_AUTOPAINT_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
"video.device.xv_autopaint_colorkey",
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c
index 2c42dda2e..35346dd1d 100644
--- a/src/video_out/video_out_xxmc.c
+++ b/src/video_out/video_out_xxmc.c
@@ -2520,7 +2520,7 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
XLockDisplay (this->display);
this->gc = XCreateGC (this->display, this->drawable, 0, NULL);
XUnlockDisplay (this->display);
- this->capabilities = VO_CAP_CROP;
+ this->capabilities = VO_CAP_CROP | VO_CAP_ZOOM_X | VO_CAP_ZOOM_Y;
this->use_shm = 1;
this->use_colorkey = 0;
this->colorkey = 0;
@@ -2584,28 +2584,34 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
if (!strncmp(adaptor_info[adaptor_num].name, "NV", 2)) {
xprintf (this->xine, XINE_VERBOSITY_NONE, LOG_MODULE ": ignoring broken XV_HUE settings on NVidia cards\n");
} else {
+ this->capabilities |= VO_CAP_HUE;
xxmc_check_capability (this, VO_PROP_HUE, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
}
} else if(!strcmp(name, "XV_SATURATION")) {
+ this->capabilities |= VO_CAP_SATURATION;
xxmc_check_capability (this, VO_PROP_SATURATION, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_BRIGHTNESS")) {
+ this->capabilities |= VO_CAP_BRIGHTNESS;
xxmc_check_capability (this, VO_PROP_BRIGHTNESS, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_CONTRAST")) {
+ this->capabilities |= VO_CAP_CONTRAST;
xxmc_check_capability (this, VO_PROP_CONTRAST, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
} else if(!strcmp(name, "XV_COLORKEY")) {
+ this->capabilities |= VO_CAP_COLORKEY;
xxmc_check_capability (this, VO_PROP_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
"video.device.xv_colorkey",
VIDEO_DEVICE_XV_COLORKEY_HELP);
} else if(!strcmp(name, "XV_AUTOPAINT_COLORKEY")) {
+ this->capabilities |= VO_CAP_AUTOPAINT_COLORKEY;
xxmc_check_capability (this, VO_PROP_AUTOPAINT_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
"video.device.xv_autopaint_colorkey",