summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/xine.h.tmpl.in15
-rw-r--r--src/video_out/video_out_xv.c52
2 files changed, 49 insertions, 18 deletions
diff --git a/include/xine.h.tmpl.in b/include/xine.h.tmpl.in
index 3b5a9c439..0aa579b22 100644
--- a/include/xine.h.tmpl.in
+++ b/include/xine.h.tmpl.in
@@ -29,7 +29,7 @@
\endverbatim
*/
/*
- * $Id: xine.h.tmpl.in,v 1.16 2001/05/17 21:52:10 guenter Exp $
+ * $Id: xine.h.tmpl.in,v 1.17 2001/05/22 13:26:06 f1rmb Exp $
*
*/
@@ -90,8 +90,19 @@ struct config_values_s {
void (*read) (config_values_t *this, char *filename);
};
-/* constants for the get/set property functions */
+/*
+ * video driver capabilities
+ */
+/* driver can set HUE value */
+#define VO_CAP_HUE 0x00000010 /* driver can set HUE value */
+#define VO_CAP_SATURATION 0x00000020 /* driver can set SATURATION value */
+#define VO_CAP_BRIGHTNESS 0x00000040 /* driver can set BRIGHTNESS value */
+#define VO_CAP_CONTRAST 0x00000080 /* driver can set CONTRAST value */
+#define VO_CAP_COLORKEY 0x00000100 /* driver can set COLORKEY value */
+/*
+ * constants for the get/set property functions
+ */
#define VO_PROP_INTERLACED 0
#define VO_PROP_ASPECT_RATIO 1
#define VO_PROP_HUE 2
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index b3f1b93df..c0a78f2ea 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out_xv.c,v 1.16 2001/05/19 21:53:46 guenter Exp $
+ * $Id: video_out_xv.c,v 1.17 2001/05/22 13:26:06 f1rmb Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -381,7 +381,6 @@ static int xv_get_property (vo_driver_t *this_gen, int property) {
xv_driver_t *this = (xv_driver_t *) this_gen;
return this->props[property].value;
-
}
static int xv_set_property (vo_driver_t *this_gen,
@@ -389,7 +388,7 @@ static int xv_set_property (vo_driver_t *this_gen,
xv_driver_t *this = (xv_driver_t *) this_gen;
- if (this->props[property].atom) {
+ if (this->props[property].atom != None) {
XvSetPortAttribute (this->display, this->xv_port,
this->props[property].atom, value);
XvGetPortAttribute (this->display, this->xv_port,
@@ -421,6 +420,10 @@ static void xv_get_property_min_max (vo_driver_t *this_gen,
xv_driver_t *this = (xv_driver_t *) this_gen;
+ printf("this property(%d): min=%d, max=%d\n", property,
+ this->props[property].min,
+ this->props[property].max);
+
*min = this->props[property].min;
*max = this->props[property].max;
}
@@ -479,13 +482,13 @@ static void xv_check_capability (xv_driver_t *this,
XvAttribute attr, int base_id, char *str_prop) {
int nDefault;
-
+
this->capabilities |= capability;
this->props[property].min = attr.min_value;
this->props[property].max = attr.max_value;
this->props[property].atom = XInternAtom (this->display, str_prop, False);
this->props[property].key = str_prop;
-
+
XvGetPortAttribute (this->display, this->xv_port, this->props[property].atom, &nDefault);
xv_set_property (&this->vo_driver, property, this->config->lookup_int (this->config, str_prop, nDefault) );
@@ -597,7 +600,8 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
this->props[i].value = 0;
this->props[i].min = 0;
this->props[i].max = 0;
- this->props[i].atom = 0;
+ this->props[i].atom = None;
+ this->props[i].key = NULL;
}
this->props[VO_PROP_INTERLACED].value = 0;
@@ -614,21 +618,37 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) {
for(k = 0; k < nattr; k++) {
if(attr[k].flags & XvSettable) {
- if(!strcmp(attr[k].name, "XV_HUE"))
- xv_check_capability (this, VO_CAP_HUE, VO_PROP_HUE, attr[k],
+ if(!strcmp(attr[k].name, "XV_HUE")) {
+ xv_check_capability (this, VO_CAP_HUE,
+ VO_PROP_HUE, attr[k],
adaptor_info[i].base_id, "XV_HUE");
- else if(!strcmp(attr[k].name, "XV_SATURATION"))
- xv_check_capability (this, VO_CAP_SATURATION, VO_PROP_SATURATION, attr[k],
+ printf("XV_HUE ");
+ }
+ else if(!strcmp(attr[k].name, "XV_SATURATION")) {
+ xv_check_capability (this, VO_CAP_SATURATION,
+ VO_PROP_SATURATION, attr[k],
adaptor_info[i].base_id, "XV_SATURATION");
- else if(!strcmp(attr[k].name, "XV_BRIGHTNESS"))
- xv_check_capability (this, VO_CAP_BRIGHTNESS, VO_PROP_BRIGHTNESS, attr[k],
+ printf("XV_SATURATION ");
+ }
+ else if(!strcmp(attr[k].name, "XV_BRIGHTNESS")) {
+ xv_check_capability (this, VO_CAP_BRIGHTNESS,
+ VO_PROP_BRIGHTNESS, attr[k],
adaptor_info[i].base_id, "XV_BRIGHTNESS");
- else if(!strcmp(attr[k].name, "XV_CONTRAST"))
- xv_check_capability (this, VO_CAP_CONTRAST, VO_PROP_CONTRAST, attr[k],
+ printf("XV_BRIGHTNESS ");
+ }
+ else if(!strcmp(attr[k].name, "XV_CONTRAST")) {
+ xv_check_capability (this, VO_CAP_CONTRAST,
+ VO_PROP_CONTRAST, attr[k],
adaptor_info[i].base_id, "XV_CONTRAST");
- else if(!strcmp(attr[k].name, "XV_COLORKEY"))
- xv_check_capability (this, VO_CAP_COLORKEY, VO_PROP_COLORKEY, attr[k],
+ printf("XV_CONTRAST ");
+ }
+ else if(!strcmp(attr[k].name, "XV_COLORKEY")) {
+ xv_check_capability (this, VO_CAP_COLORKEY,
+ VO_PROP_COLORKEY, attr[k],
adaptor_info[i].base_id, "XV_COLORKEY");
+ printf("XV_COLORKEY ");
+ }
+ printf("\n");
}
}
XFree(attr);