--- video.c 2006-10-20 02:21:51.000000000 +0200 +++ video-RoundRobinBTTVBrightness.c 2007-02-07 23:02:47.000000000 +0100 @@ -146,6 +146,7 @@ vid_pic.brightness = cnt->conf.brightness * 256; viddev->brightness = cnt->conf.brightness; } + } if (make_change) { @@ -434,8 +435,7 @@ return 0; } -static void v4l_set_input(struct context *cnt, struct video_dev *viddev, unsigned char *map, int width, int height, int input, - int norm, int skip, unsigned long freq, int tuner_number) +static void v4l_set_input(struct context *cnt, struct video_dev *viddev, unsigned char *map, int width, int height, int input, int norm, int skip, unsigned long freq, int tuner_number, int bright_c, int contrast_c, int saturation_c, int hue_c) { int dev=viddev->fd; int i; @@ -444,7 +444,9 @@ unsigned long frequnits = freq; if (input != viddev->input || width != viddev->width || height!=viddev->height || - freq!=viddev->freq || tuner_number!=viddev->tuner_number) { + freq!=viddev->freq || tuner_number!=viddev->tuner_number || + viddev->brightness != bright_c || viddev->contrast != contrast_c || + viddev->saturation != saturation_c || viddev->hue != hue_c) { if (freq) { vid_tuner.tuner = tuner_number; if (ioctl (dev, VIDIOCGTUNER, &vid_tuner)==-1) { @@ -475,6 +477,10 @@ } } v4l_picture_controls(cnt, viddev); + viddev->brightness=bright_c; + viddev->contrast=contrast_c; + viddev->saturation=saturation_c; + viddev->hue=hue_c; viddev->input=input; viddev->width=width; viddev->height=height; @@ -961,7 +967,8 @@ } v4l_set_input(cnt, viddevs[i], map, width, height, conf->input, conf->norm, - conf->roundrobin_skip, conf->frequency, conf->tuner_number); + conf->roundrobin_skip, conf->frequency, conf->tuner_number, + conf->brightness, conf->contrast, conf->saturation, conf->hue); ret = v4l_next(viddevs[i], map, width, height);