diff options
Diffstat (limited to 'src/video_out')
-rw-r--r-- | src/video_out/video_out_syncfb.c | 178 | ||||
-rw-r--r-- | src/video_out/video_out_xshm.c | 23 | ||||
-rw-r--r-- | src/video_out/video_out_xv.c | 62 |
3 files changed, 145 insertions, 118 deletions
diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 9397dffdb..4b088eb88 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.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_syncfb.c,v 1.46 2001/11/17 14:26:39 f1rmb Exp $ + * $Id: video_out_syncfb.c,v 1.47 2001/11/18 03:53:24 guenter Exp $ * * video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine * @@ -60,8 +60,6 @@ #include "alphablend.h" #include "xineutils.h" -uint32_t xine_debug; - typedef struct { int value; int min; @@ -96,12 +94,12 @@ typedef struct { vo_overlay_t *overlay; - // syncfb module related stuff - int fd; // file descriptor of the syncfb device - int yuv_format; // either YUV420P3, YUV420P2 or YUV422 - int overlay_state; // 0 = off, 1 = on - uint8_t* video_mem; // mmapped video memory - int default_repeat; // how many times a frame will be repeatedly displayed + /* syncfb module related stuff */ + int fd; /* file descriptor of the syncfb device */ + int yuv_format; /* either YUV420P3, YUV420P2 or YUV422 */ + int overlay_state; /* 0 = off, 1 = on */ + uint8_t* video_mem; /* mmapped video memory */ + int default_repeat; /* how many times a frame will be repeatedly displayed */ uint32_t supported_capabilities; syncfb_config_t syncfb_config; @@ -160,13 +158,13 @@ typedef struct { int gX11Fail; -// -// internal video_out_syncfb functions -// +/* + * internal video_out_syncfb functions + */ -// returns boolean value (1 success, 0 failure) -int syncfb_overlay_on(syncfb_driver_t* this) -{ +/* returns boolean value (1 success, 0 failure) */ +int syncfb_overlay_on(syncfb_driver_t* this) { + if(ioctl(this->fd, SYNCFB_ON)) { printf("video_out_syncfb: error. (on ioctl failed)\n"); return 0; @@ -176,9 +174,8 @@ int syncfb_overlay_on(syncfb_driver_t* this) } } -// returns boolean value (1 success, 0 failure) -int syncfb_overlay_off(syncfb_driver_t* this) -{ +/* returns boolean value (1 success, 0 failure) */ +int syncfb_overlay_off(syncfb_driver_t* this) { if(ioctl(this->fd, SYNCFB_OFF)) { printf("video_out_syncfb: error. (off ioctl failed)\n"); return 0; @@ -188,8 +185,7 @@ int syncfb_overlay_off(syncfb_driver_t* this) } } -static void write_frame_YUV422(syncfb_driver_t* this, syncfb_frame_t* frame) -{ +static void write_frame_YUV422(syncfb_driver_t* this, syncfb_frame_t* frame) { uint_8* y = (uint_8 *)frame->vo_frame.base[0]; uint_8* cb = (uint_8 *)frame->vo_frame.base[1]; uint_8* cr = (uint_8 *)frame->vo_frame.base[2]; @@ -498,9 +494,10 @@ static void syncfb_adapt_to_output_area(syncfb_driver_t* this, this->output_width = (this->output_width + 1) & 0xfffe; /* Round to even */ this->output_height = (this->output_height + 1) & 0xfffe; /* Round to even */ - // try to minimize our config ioctls by checking if anything really has - // changed, otherwise leave things untouched because every config ioctl - // also turns off and on the SyncFB module. + /* try to minimize our config ioctls by checking if anything really has + * changed, otherwise leave things untouched because every config ioctl + * also turns off and on the SyncFB module. + */ if(prev_output_width != this->output_width || prev_output_height != this->output_height || prev_output_xoffset != this->output_xoffset || @@ -525,13 +522,14 @@ static void syncfb_adapt_to_output_area(syncfb_driver_t* this, prev_v_w_visibility = this->video_win_visibility; prev_logo_visibility = this->logo_visibility; - // - // configuring SyncFB module from this point on. - // + /* + * configuring SyncFB module from this point on. + */ syncfb_overlay_off(this); - // sanity checking - certain situations *may* crash the SyncFB module, so - // take care that we always have valid numbers. + /* sanity checking - certain situations *may* crash the SyncFB module, so + * take care that we always have valid numbers. + */ if(posx >= 0 && posy >= 0 && this->frame_width > 0 && this->frame_height > 0 && this->output_width > 0 && this->output_height > 0 && this->frame_format > 0) { if(ioctl(this->fd, SYNCFB_GET_CONFIG, &this->syncfb_config)) printf("video_out_syncfb: error. (get_config ioctl failed)\n"); @@ -612,10 +610,6 @@ static void syncfb_calc_format(syncfb_driver_t* this, image_ratio = (double) this->delivered_width / (double) this->delivered_height; - xprintf (VERBOSE | VIDEO, "display_ratio : %f\n", this->display_ratio); - xprintf (VERBOSE | VIDEO, "stream aspect ratio : %f , code : %d\n", - image_ratio, ratio_code); - switch (this->props[VO_PROP_ASPECT_RATIO].value) { case ASPECT_AUTO: switch (ratio_code) { @@ -630,10 +624,10 @@ static void syncfb_calc_format(syncfb_driver_t* this, desired_ratio = image_ratio; break; case 0: /* forbidden */ - fprintf (stderr, "invalid ratio, using 4:3\n"); + printf ("video_out_syncfb: invalid ratio, using 4:3\n"); default: - xprintf (VIDEO, "unknown aspect ratio (%d) in stream => using 4:3\n", - ratio_code); + printf ("video_out_syncfb: unknown aspect ratio (%d) in stream => using 4:3\n", + ratio_code); case XINE_ASPECT_RATIO_4_3: /* 4:3 */ desired_ratio = 4.0 / 3.0; break; @@ -721,11 +715,11 @@ static void syncfb_translate_gui2video(syncfb_driver_t* this, } -// -// X error handler functions -// (even though the syncfb plugin doesn't check for gX11Fail yet, it is -// probably a good idea to leave this in place for future use) -// +/* + * X error handler functions + * (even though the syncfb plugin doesn't check for gX11Fail yet, it is + * probably a good idea to leave this in place for future use) + */ int HandleXError(Display* display, XErrorEvent* xevent) { char str [1024]; @@ -738,24 +732,25 @@ int HandleXError(Display* display, XErrorEvent* xevent) { return 0; } -static void x11_InstallXErrorHandler(syncfb_driver_t* this) -{ +static void x11_InstallXErrorHandler(syncfb_driver_t* this) { + XSetErrorHandler (HandleXError); XFlush (this->display); } -static void x11_DeInstallXErrorHandler(syncfb_driver_t* this) -{ +static void x11_DeInstallXErrorHandler(syncfb_driver_t* this) { + XSetErrorHandler (NULL); XFlush (this->display); } -// -// video_out_syncfb functions available to the outside world :) -// +/* + * video_out_syncfb functions available to the outside world :) + */ static uint32_t syncfb_get_capabilities(vo_driver_t* this_gen) { - // FIXME: VO_CAP_CONTRAST and VO_CAP_BRIGHTNESS unsupported at the moment, - // because they seem to be disabled in the syncfb module anyway. :( + /* FIXME: VO_CAP_CONTRAST and VO_CAP_BRIGHTNESS unsupported at the moment, + * because they seem to be disabled in the syncfb module anyway. :( + */ syncfb_driver_t* this = (syncfb_driver_t *) this_gen; return this->supported_capabilities; @@ -765,8 +760,8 @@ static void syncfb_frame_field (vo_frame_t *vo_img, int which_field) { /* not needed for Xv */ } -static void syncfb_frame_dispose(vo_frame_t* vo_img) -{ +static void syncfb_frame_dispose(vo_frame_t* vo_img) { + syncfb_frame_t* frame = (syncfb_frame_t *) vo_img ; if(frame->vo_frame.base[0]) { @@ -778,8 +773,8 @@ static void syncfb_frame_dispose(vo_frame_t* vo_img) free (frame); } -static vo_frame_t* syncfb_alloc_frame(vo_driver_t* this_gen) -{ +static vo_frame_t* syncfb_alloc_frame(vo_driver_t* this_gen) { + syncfb_frame_t* frame; frame = (syncfb_frame_t *) malloc(sizeof (syncfb_frame_t)); @@ -805,8 +800,8 @@ static vo_frame_t* syncfb_alloc_frame(vo_driver_t* this_gen) static void syncfb_update_frame_format(vo_driver_t* this_gen, vo_frame_t* frame_gen, uint32_t width, uint32_t height, - int ratio_code, int format, int flags) -{ + int ratio_code, int format, int flags) { + syncfb_frame_t* frame = (syncfb_frame_t *) frame_gen; if((frame->width != width) @@ -823,8 +818,10 @@ static void syncfb_update_frame_format(vo_driver_t* this_gen, frame->height = height; frame->format = format; - // we only know how to do 4:2:0 planar yuv right now. - // we prepare for YUY2 sizes + /* + * we only know how to do 4:2:0 planar yuv right now. + * we prepare for YUY2 sizes + */ frame->id = shmget(IPC_PRIVATE, frame->width * frame->height * 2, IPC_CREAT | 0777); if(frame->id < 0 ) { @@ -853,8 +850,8 @@ static void syncfb_update_frame_format(vo_driver_t* this_gen, frame->ratio_code = ratio_code; } -static void syncfb_overlay_blend(vo_driver_t* this_gen, vo_frame_t* frame_gen, vo_overlay_t* overlay) -{ +static void syncfb_overlay_blend(vo_driver_t* this_gen, vo_frame_t* frame_gen, vo_overlay_t* overlay) { + syncfb_frame_t* frame = (syncfb_frame_t *) frame_gen; if(overlay->rle) { @@ -862,8 +859,8 @@ static void syncfb_overlay_blend(vo_driver_t* this_gen, vo_frame_t* frame_gen, v } } -static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) -{ +static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) { + syncfb_driver_t* this = (syncfb_driver_t *) this_gen; syncfb_frame_t* frame = (syncfb_frame_t *) frame_gen; @@ -879,7 +876,7 @@ static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) syncfb_calc_format(this, frame->width, frame->height, frame->ratio_code); } - // the rest is only successful and safe, if the overlay is really on + /* the rest is only successful and safe, if the overlay is really on */ if(this->overlay_state) { if(this->bufinfo.id != -1) { printf("video_out_syncfb: error. (invalid syncfb image buffer state)\n"); @@ -906,15 +903,15 @@ static void syncfb_display_frame(vo_driver_t* this_gen, vo_frame_t* frame_gen) this->bufinfo.id = -1; } -static int syncfb_get_property(vo_driver_t* this_gen, int property) -{ +static int syncfb_get_property(vo_driver_t* this_gen, int property) { + syncfb_driver_t* this = (syncfb_driver_t *) this_gen; return this->props[property].value; } -static int syncfb_set_property(vo_driver_t* this_gen, int property, int value) -{ +static int syncfb_set_property(vo_driver_t* this_gen, int property, int value) { + syncfb_driver_t* this = (syncfb_driver_t *) this_gen; switch (property) { @@ -1034,16 +1031,16 @@ static int syncfb_set_property(vo_driver_t* this_gen, int property, int value) return value; } -static void syncfb_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max) -{ +static void syncfb_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max) { + syncfb_driver_t *this = (syncfb_driver_t *) this_gen; *min = this->props[property].min; *max = this->props[property].max; } -static int syncfb_gui_data_exchange (vo_driver_t* this_gen, int data_type, void *data) -{ +static int syncfb_gui_data_exchange (vo_driver_t* this_gen, int data_type, void *data) { + syncfb_driver_t* this = (syncfb_driver_t *) this_gen; x11_rectangle_t* area; @@ -1055,7 +1052,7 @@ static int syncfb_gui_data_exchange (vo_driver_t* this_gen, int data_type, void } break; - // FIXME: consider if this is of use for us... + /* FIXME: consider if this is of use for us... */ case GUI_DATA_EX_EXPOSE_EVENT: break; @@ -1104,21 +1101,21 @@ static int syncfb_gui_data_exchange (vo_driver_t* this_gen, int data_type, void return 0; } -static void syncfb_exit (vo_driver_t* this_gen) -{ +static void syncfb_exit (vo_driver_t* this_gen) { + syncfb_driver_t *this = (syncfb_driver_t *) this_gen; - // get it off the screen - I wanna see my desktop again :-) + /* get it off the screen - I wanna see my desktop again :-) */ syncfb_overlay_off(this); - // don't know if it is necessary are even right, but anyway...?! + /* don't know if it is necessary are even right, but anyway...?! */ munmap(0, this->capabilities.memory_size); close(this->fd); } -vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) -{ +vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { + XWindowAttributes attr; XColor dummy; @@ -1128,8 +1125,8 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) int i = 0; char* device_name; - device_name = config->lookup_str(config, "syncfb_device", "/dev/syncfb"); - xine_debug = config->lookup_int(config, "xine_debug", 0); + device_name = config->register_string (config, "video.syncfb_device", "/dev/syncfb", + "syncfb (teletux) device node", NULL, NULL, NULL); if(!(this = malloc (sizeof (syncfb_driver_t)))) { printf("video_out_syncfb: aborting. (malloc failed)\n"); @@ -1137,14 +1134,14 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) } memset(this, 0, sizeof(syncfb_driver_t)); - // check for syncfb device + /* check for syncfb device */ if((this->fd = open(device_name, O_RDWR)) < 0) { printf("video_out_syncfb: aborting. (unable to open device \"%s\")\n", device_name); free(this); return NULL; } - // get capabilities from the syncfb module + /* get capabilities from the syncfb module */ if(ioctl(this->fd, SYNCFB_GET_CAPS, &this->capabilities)) { printf("video_out_syncfb: aborting. (syncfb_get_caps ioctl failed)\n"); @@ -1165,15 +1162,17 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) this->props[i].key = NULL; } - // mmap whole video memory + /* mmap whole video memory */ this->video_mem = (char *) mmap(0, this->capabilities.memory_size, PROT_WRITE, MAP_SHARED, this->fd, 0); - // check for formats we need... + /* check for formats we need... */ this->supported_capabilities = 0; this->yuv_format = 0; - // simple fallback mechanism - we want YUV 4:2:0 (3 plane) but we can also - // convert YV12 material to YUV 4:2:0 (2 plane) and YUV 4:2:2 ... + /* + * simple fallback mechanism - we want YUV 4:2:0 (3 plane) but we can also + * convert YV12 material to YUV 4:2:0 (2 plane) and YUV 4:2:2 ... + */ if(this->capabilities.palettes & (1<<VIDEO_PALETTE_YUV420P3)) { this->supported_capabilities |= VO_CAP_YV12; this->yuv_format = VIDEO_PALETTE_YUV420P3; @@ -1193,8 +1192,9 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) printf("video_out_syncfb: SyncFB module supports YUY2.\n"); } if(this->capabilities.palettes & (1<<VIDEO_PALETTE_RGB565)) { -// FIXME: no RGB support yet -// this->supported_capabilities |= VO_CAP_RGB; + /* FIXME: no RGB support yet + * this->supported_capabilities |= VO_CAP_RGB; + */ printf("video_out_syncfb: SyncFB module supports RGB565.\n"); } @@ -1229,7 +1229,9 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) this->bufinfo.id = -1; this->config = config; - this->default_repeat = config->lookup_int(config, "syncfb_default_repeat", 3); + this->default_repeat = config->register_num (config, "video.syncfb_default_repeat", 3, + "Specifies how many times a frame is repeated", + NULL, NULL, NULL); this->display = visual->display; this->display_ratio = visual->display_ratio; this->displayed_height = 0; diff --git a/src/video_out/video_out_xshm.c b/src/video_out/video_out_xshm.c index 85cbaf261..4a919fd7f 100644 --- a/src/video_out/video_out_xshm.c +++ b/src/video_out/video_out_xshm.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_xshm.c,v 1.50 2001/11/17 14:26:39 f1rmb Exp $ + * $Id: video_out_xshm.c,v 1.51 2001/11/18 03:53:24 guenter Exp $ * * video_out_xshm.c, X11 shared memory extension interface for xine * @@ -59,8 +59,6 @@ #include "yuv2rgb.h" #include "xineutils.h" -uint32_t xine_debug; - extern int XShmGetEventBase(Display *); typedef struct xshm_frame_s { @@ -471,10 +469,10 @@ static void xshm_calc_output_size (xshm_driver_t *this) { desired_ratio = image_ratio; break; case 0: /* forbidden -> 4:3 */ - fprintf (stderr, "invalid ratio, using 4:3\n"); + printf ("video_out_xshm: invalid ratio, using 4:3\n"); default: - xprintf (VIDEO, "unknown aspect ratio (%d) in stream => using 4:3\n", - this->delivered_ratio_code); + printf ("video_out_xshm: unknown aspect ratio (%d) in stream => using 4:3\n", + this->delivered_ratio_code); case XINE_ASPECT_RATIO_4_3: /* 4:3 */ desired_ratio = 4.0 / 3.0; break; @@ -778,8 +776,10 @@ static void xshm_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen) { || (frame->rgb_height != this->last_frame_rgb_height) || (frame->drawable_ref != this->last_frame_drawable_ref) ) { + /* xprintf (VIDEO, "video_out_xshm: requesting dest size of %d x %d \n", frame->rgb_width, frame->rgb_height); + */ this->request_dest_size (this->user_data, frame->rgb_width, frame->rgb_height, @@ -883,7 +883,7 @@ static int xshm_set_property (vo_driver_t *this_gen, aspect_ratio_name(value)); } else if ( property == VO_PROP_BRIGHTNESS) { yuv2rgb_set_gamma(this->yuv2rgb,value); - this->config->set_int (this->config, "xshm_gamma", value); + printf("video_out_xshm: gamma changed to %d\n",value); } else { printf ("video_out_xshm: tried to set unsupported property %d\n", property); @@ -1169,7 +1169,6 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { visual = (x11_visual_t *) visual_gen; display = visual->display; - xine_debug = config->lookup_int (config, "xine_debug", 0); /* * allocate plugin struct @@ -1196,7 +1195,9 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->output_scale_factor = 1.0; this->gui_width = 0; this->gui_height = 0; - this->zoom_mpeg1 = config->lookup_int (config, "zoom_mpeg1", 1); + this->zoom_mpeg1 = config->register_bool (config, "video.zoom_mpeg1", 1, + "Zoom small video formats to double size", + NULL, NULL, NULL); /* * FIXME: replace getenv() with config->lookup_int, merge with zoom_mpeg1? * @@ -1339,7 +1340,9 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { } this->yuv2rgb = yuv2rgb_init (mode, swapped, this->fast_rgb); - yuv2rgb_set_gamma(this->yuv2rgb, config->lookup_int (config, "xshm_gamma", 0)); + yuv2rgb_set_gamma(this->yuv2rgb, config->register_range (config, "video.xshm_gamma", 0, + -100, 100, "gamma correction for XShm driver", + NULL, NULL, NULL)); return &this->vo_driver; } diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c index 4299bac9f..2be189506 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.75 2001/11/17 14:26:39 f1rmb Exp $ + * $Id: video_out_xv.c,v 1.76 2001/11/18 03:53:24 guenter Exp $ * * video_out_xv.c, X11 video extension interface for xine * @@ -58,14 +58,17 @@ #include "deinterlace.h" #include "xineutils.h" -uint32_t xine_debug; +/* +#define XV_LOG +*/ typedef struct { int value; int min; int max; Atom atom; - char *key; + + cfg_entry_t *entry; } xv_property_t; @@ -154,6 +157,8 @@ typedef struct { int *dest_x, int *dest_y, int *dest_height, int *dest_width); + char scratch[256]; + } xv_driver_t; int gX11Fail; @@ -680,9 +685,11 @@ static void xv_calc_format (xv_driver_t *this, image_ratio = (double) this->delivered_width / (double) this->delivered_height; - xprintf (VERBOSE | VIDEO, "display_ratio : %f\n", this->display_ratio); - xprintf (VERBOSE | VIDEO, "stream aspect ratio : %f , code : %d\n", - image_ratio, ratio_code); +#ifdef XV_LOG + printf ("video_out_xv: display_ratio : %f\n", this->display_ratio); + printf ("video_out_xv: stream aspect ratio : %f , code : %d\n", + image_ratio, ratio_code); +#endif switch (this->props[VO_PROP_ASPECT_RATIO].value) { case ASPECT_AUTO: @@ -700,8 +707,8 @@ static void xv_calc_format (xv_driver_t *this, case 0: /* forbidden */ fprintf (stderr, "invalid ratio, using 4:3\n"); default: - xprintf (VIDEO, "unknown aspect ratio (%d) in stream => using 4:3\n", - ratio_code); + printf ("video_out_xv: unknown aspect ratio (%d) in stream => using 4:3\n", + ratio_code); case XINE_ASPECT_RATIO_4_3: /* 4:3 */ desired_ratio = 4.0 / 3.0; break; @@ -885,8 +892,7 @@ static int xv_set_property (vo_driver_t *this_gen, this->props[property].atom, &this->props[property].value); - this->config->set_int (this->config, this->props[property].key, - this->props[property].value); + this->props[property].entry->num_value = this->props[property].value; return this->props[property].value; } else { @@ -1116,19 +1122,27 @@ static void xv_check_capability (xv_driver_t *this, int property, XvAttribute attr, int base_id, char *str_prop) { - int nDefault; + int int_default; + cfg_entry_t *entry; 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); + this->props[property].atom, &int_default); + + sprintf (this->scratch, "video.%s", str_prop); - xv_set_property (&this->vo_driver, property, - this->config->lookup_int (this->config, str_prop, nDefault)); + this->config->register_num (this->config, this->scratch, int_default, + "Xv property", NULL, NULL, NULL); + + entry = this->config->lookup_entry (this->config, this->scratch); + + this->props[property].entry = entry; + + xv_set_property (&this->vo_driver, property, entry->num_value); } vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { @@ -1146,9 +1160,10 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { XColor dummy; XvImage *myimage; XShmSegmentInfo myshminfo; + static char *deinterlace_methods[] = {"none", "bob", "weave", "greedy", "onefield", + "onefieldxy", NULL}; display = visual->display; - xine_debug = config->lookup_int (config, "xine_debug", 0); /* * check for Xvideo support @@ -1266,7 +1281,7 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->props[i].min = 0; this->props[i].max = 0; this->props[i].atom = None; - this->props[i].key = NULL; + this->props[i].entry = NULL; } this->props[VO_PROP_INTERLACED].value = 0; @@ -1317,7 +1332,9 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { int xv_filter; /* This setting is specific to Permedia 2/3 cards. */ atom = XInternAtom (this->display, attr[k].name, False); - xv_filter = config->lookup_int (config, "XV_FILTER", 0); + xv_filter = config->register_num (config, "video.XV_FILTER", 0, + "bilinear scaling mode (permedia 2/3)", + NULL, NULL, NULL); XvSetPortAttribute (this->display, this->xv_port, atom, xv_filter); printf("video_out_xv: bilinear scaling mode (XV_FILTER) = %d\n", xv_filter); @@ -1343,9 +1360,11 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { this->xv_format_rgb = 0; for(i = 0; i < formats; i++) { - xprintf(VERBOSE|VIDEO, "video_out_xv: Xv image format: 0x%x (%4.4s) %s\n", +#ifdef XV_LOG + printf ("video_out_xv: Xv image format: 0x%x (%4.4s) %s\n", fo[i].id, (char*)&fo[i].id, (fo[i].format == XvPacked) ? "packed" : "planar"); +#endif if (fo[i].id == IMGFMT_YV12) { this->xv_format_yv12 = fo[i].id; this->capabilities |= VO_CAP_YV12; @@ -1369,7 +1388,10 @@ vo_driver_t *init_video_out_plugin (config_values_t *config, void *visual_gen) { myimage = create_ximage (this, &myshminfo, 100, 100, IMGFMT_YV12); dispose_ximage (this, &myshminfo, myimage); - this->deinterlace_method = config->lookup_int (config, "deinterlace_method", 4); + this->deinterlace_method = config->register_enum (config, "video.deinterlace_method", 4, + deinterlace_methods, + "Software deinterlace method (Key I toggles deinterlacer on/off", + NULL, NULL, NULL); this->deinterlace_enabled = 0; return &this->vo_driver; |