summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2010-04-08 16:04:21 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2010-04-08 16:04:21 +0100
commit818165da93f72b8b32c164bcabb3eae2d4e4dc31 (patch)
tree0fbd03ef488ec7d1539e7764d41dfc033039c25b /src
parentedc1d619f78897a5ea382c335a1dd9b2818002fe (diff)
downloadxine-lib-818165da93f72b8b32c164bcabb3eae2d4e4dc31.tar.gz
xine-lib-818165da93f72b8b32c164bcabb3eae2d4e4dc31.tar.bz2
Add support for Xv gamma adjustment.
Diffstat (limited to 'src')
-rw-r--r--src/video_out/video_out_xcbxv.c4
-rw-r--r--src/video_out/video_out_xv.c4
-rw-r--r--src/video_out/video_out_xvmc.c4
-rw-r--r--src/video_out/video_out_xxmc.c5
-rw-r--r--src/xine-engine/video_out.c5
-rw-r--r--src/xine-engine/video_out.h1
-rw-r--r--src/xine-engine/xine_interface.c2
7 files changed, 24 insertions, 1 deletions
diff --git a/src/video_out/video_out_xcbxv.c b/src/video_out/video_out_xcbxv.c
index b3a141e61..e8797505b 100644
--- a/src/video_out/video_out_xcbxv.c
+++ b/src/video_out/video_out_xcbxv.c
@@ -1502,6 +1502,10 @@ static vo_driver_t *open_plugin(video_driver_class_t *class_gen, const void *vis
xv_check_capability (this, VO_PROP_CONTRAST, attribute_it.data,
adaptor_it.data->base_id,
NULL, NULL, NULL);
+ } else if(!strcmp(name, "XV_GAMMA")) {
+ xv_check_capability (this, VO_PROP_GAMMA, attribute_it.data,
+ adaptor_it.data->base_id,
+ NULL, NULL, NULL);
} else if(!strcmp(name, "XV_COLORKEY")) {
xv_check_capability (this, VO_PROP_COLORKEY, attribute_it.data,
adaptor_it.data->base_id,
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 65cd29aa4..73236ec0d 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -1555,6 +1555,10 @@ static vo_driver_t *open_plugin_2 (video_driver_class_t *class_gen, const void *
xv_check_capability (this, VO_PROP_CONTRAST, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
+ } else if(!strcmp(name, "XV_GAMMA")) {
+ xv_check_capability (this, VO_PROP_GAMMA, attr[k],
+ adaptor_info[adaptor_num].base_id,
+ NULL, NULL, NULL);
} else if(!strcmp(name, "XV_COLORKEY")) {
xv_check_capability (this, VO_PROP_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
diff --git a/src/video_out/video_out_xvmc.c b/src/video_out/video_out_xvmc.c
index aeb536fc1..34b925c8f 100644
--- a/src/video_out/video_out_xvmc.c
+++ b/src/video_out/video_out_xvmc.c
@@ -1456,6 +1456,10 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
xvmc_check_capability (this, VO_PROP_CONTRAST, attr[k],
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
+ } else if(!strcmp(name, "XV_GAMMA")) {
+ xvmc_check_capability (this, VO_PROP_GAMMA, attr[k],
+ adaptor_info[adaptor_num].base_id,
+ NULL, NULL, NULL);
} else if(!strcmp(name, "XV_COLORKEY")) {
xvmc_check_capability (this, VO_PROP_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
diff --git a/src/video_out/video_out_xxmc.c b/src/video_out/video_out_xxmc.c
index 256e2f5a8..654cad7d9 100644
--- a/src/video_out/video_out_xxmc.c
+++ b/src/video_out/video_out_xxmc.c
@@ -2581,6 +2581,11 @@ static vo_driver_t *open_plugin (video_driver_class_t *class_gen, const void *vi
adaptor_info[adaptor_num].base_id,
NULL, NULL, NULL);
+ } else if(!strcmp(name, "XV_GAMMA")) {
+ xxmc_check_capability (this, VO_PROP_GAMMA, attr[k],
+ adaptor_info[adaptor_num].base_id,
+ NULL, NULL, NULL);
+
} else if(!strcmp(name, "XV_COLORKEY")) {
xxmc_check_capability (this, VO_PROP_COLORKEY, attr[k],
adaptor_info[adaptor_num].base_id,
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index d06e82afa..cd73233c3 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -1430,7 +1430,9 @@ static int vo_get_property (xine_video_port_t *this_gen, int property) {
case XINE_PARAM_VO_HUE:
case XINE_PARAM_VO_SATURATION:
case XINE_PARAM_VO_CONTRAST:
- case XINE_PARAM_VO_BRIGHTNESS: {
+ case XINE_PARAM_VO_BRIGHTNESS:
+ case XINE_PARAM_VO_GAMMA:
+ {
int v, min_v, max_v, range_v;
pthread_mutex_lock( &this->driver_lock );
@@ -1523,6 +1525,7 @@ static int vo_set_property (xine_video_port_t *this_gen, int property, int value
case XINE_PARAM_VO_SATURATION:
case XINE_PARAM_VO_CONTRAST:
case XINE_PARAM_VO_BRIGHTNESS:
+ case XINE_PARAM_VO_GAMMA:
if (!this->grab_only) {
int v, min_v, max_v, range_v;
diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h
index b1a517565..9a4bd56c9 100644
--- a/src/xine-engine/video_out.h
+++ b/src/xine-engine/video_out.h
@@ -235,6 +235,7 @@ struct xine_video_port_s {
#define VO_PROP_PAN_SCAN 9
#define VO_PROP_TVMODE 10
#define VO_PROP_MAX_NUM_FRAMES 11
+#define VO_PROP_GAMMA 12
#define VO_PROP_ZOOM_Y 13
#define VO_PROP_DISCARD_FRAMES 14 /* not used by drivers */
#define VO_PROP_WINDOW_WIDTH 15 /* read-only */
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index e39c19817..62de42678 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.c
@@ -478,6 +478,7 @@ void xine_set_param (xine_stream_t *stream, int param, int value) {
case XINE_PARAM_VO_SATURATION:
case XINE_PARAM_VO_CONTRAST:
case XINE_PARAM_VO_BRIGHTNESS:
+ case XINE_PARAM_VO_GAMMA:
case XINE_PARAM_VO_DEINTERLACE:
case XINE_PARAM_VO_ASPECT_RATIO:
case XINE_PARAM_VO_ZOOM_X:
@@ -642,6 +643,7 @@ int xine_get_param (xine_stream_t *stream, int param) {
case XINE_PARAM_VO_SATURATION:
case XINE_PARAM_VO_CONTRAST:
case XINE_PARAM_VO_BRIGHTNESS:
+ case XINE_PARAM_VO_GAMMA:
case XINE_PARAM_VO_DEINTERLACE:
case XINE_PARAM_VO_ASPECT_RATIO:
case XINE_PARAM_VO_ZOOM_X: