diff options
Diffstat (limited to 'libvo/vo_dxr3.c')
-rw-r--r-- | libvo/vo_dxr3.c | 183 |
1 files changed, 68 insertions, 115 deletions
diff --git a/libvo/vo_dxr3.c b/libvo/vo_dxr3.c index 0c031013da..a4e012894e 100644 --- a/libvo/vo_dxr3.c +++ b/libvo/vo_dxr3.c @@ -36,7 +36,6 @@ #include "config.h" #include "mp_msg.h" -#include "help_mp.h" #include "fastmemcpy.h" #include "video_out.h" @@ -44,9 +43,6 @@ #include "aspect.h" #include "spuenc.h" #include "sub.h" -#ifdef CONFIG_GUI -#include "gui/interface.h" -#endif #ifdef CONFIG_X11 #include "x11_common.h" #endif @@ -174,19 +170,12 @@ static overlay_t *overlay_data; /* Functions for working with the em8300's internal clock */ /* End of internal clock functions */ -static int control(uint32_t request, void *data, ...) +static int control(uint32_t request, void *data) { switch (request) { - case VOCTRL_GUISUPPORT: - return VO_TRUE; - case VOCTRL_GUI_NOWINDOW: - if (dxr3_overlay) { - return VO_FALSE; - } - return VO_TRUE; case VOCTRL_SET_SPU_PALETTE: if (ioctl(fd_spu, EM8300_IOCTL_SPU_SETPALETTE, data) < 0) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToLoadNewSPUPalette); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to load new SPU palette!\n"); return VO_ERROR; } return VO_TRUE; @@ -216,7 +205,7 @@ static int control(uint32_t request, void *data, ...) if (dxr3_prebuf) { ioval = EM8300_PLAYMODE_PLAY; if (ioctl(fd_control, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetPlaymode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set playmode!\n"); } } return VO_TRUE; @@ -224,7 +213,7 @@ static int control(uint32_t request, void *data, ...) if (dxr3_prebuf) { ioval = EM8300_PLAYMODE_PAUSED; if (ioctl(fd_control, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetPlaymode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set playmode!\n"); } } return VO_TRUE; @@ -252,22 +241,17 @@ static int control(uint32_t request, void *data, ...) } case VOCTRL_SET_EQUALIZER: { - va_list ap; - int value; em8300_bcs_t bcs; - - va_start(ap, data); - value = va_arg(ap, int); - va_end(ap); + struct voctrl_set_equalizer_args *args = data; if (ioctl(fd_control, EM8300_IOCTL_GETBCS, &bcs) < 0) return VO_FALSE; - if (!strcasecmp(data, "brightness")) - bcs.brightness = (value+100)*5; - else if (!strcasecmp(data, "contrast")) - bcs.contrast = (value+100)*5; - else if (!strcasecmp(data, "saturation")) - bcs.saturation = (value+100)*5; + if (!strcasecmp(args->name, "brightness")) + bcs.brightness = (args->value+100)*5; + else if (!strcasecmp(args->name, "contrast")) + bcs.contrast = (args->value+100)*5; + else if (!strcasecmp(args->name, "saturation")) + bcs.saturation = (args->value+100)*5; else return VO_FALSE; if (ioctl(fd_control, EM8300_IOCTL_SETBCS, &bcs) < 0) @@ -276,23 +260,18 @@ static int control(uint32_t request, void *data, ...) } case VOCTRL_GET_EQUALIZER: { - va_list ap; - int *value; em8300_bcs_t bcs; - - va_start(ap, data); - value = va_arg(ap, int*); - va_end(ap); + struct voctrl_get_equalizer_args *args = data; if (ioctl(fd_control, EM8300_IOCTL_GETBCS, &bcs) < 0) return VO_FALSE; - if (!strcasecmp(data, "brightness")) - *value = (bcs.brightness/5)-100; - else if (!strcasecmp(data, "contrast")) - *value = (bcs.contrast/5)-100; - else if (!strcasecmp(data, "saturation")) - *value = (bcs.saturation/5)-100; + if (!strcasecmp(args->name, "brightness")) + *args->valueptr = (bcs.brightness/5)-100; + else if (!strcasecmp(args->name, "contrast")) + *args->valueptr = (bcs.contrast/5)-100; + else if (!strcasecmp(args->name, "saturation")) + *args->valueptr = (bcs.saturation/5)-100; else return VO_FALSE; return VO_TRUE; @@ -322,7 +301,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ { int tmp1, tmp2, size; em8300_register_t reg; - extern float monitor_aspect; /* Softzoom turned on, downscale */ /* This activates the subpicture processor, you can safely disable this and still send */ @@ -330,7 +308,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ /* up in a lockup */ ioval = EM8300_SPUMODE_ON; if (ioctl(fd_control, EM8300_IOCTL_SET_SPUMODE, &ioval) < 0) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetSubpictureMode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set subpicture mode!\n"); uninit(); return -1; } @@ -338,7 +316,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ /* Set the playmode to play (just in case another app has set it to something else) */ ioval = EM8300_PLAYMODE_PLAY; if (ioctl(fd_control, EM8300_IOCTL_SET_PLAYMODE, &ioval) < 0) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetPlaymode); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set playmode!\n"); } /* Start em8300 prebuffering and sync engine */ @@ -370,7 +348,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ monitor_aspect = (float) width / (float) height; if (ioctl(fd_control, EM8300_IOCTL_GET_VIDEOMODE, &old_vmode) < 0) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToGetTVNorm); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to get TV norm!\n"); old_vmode = -1; } @@ -389,7 +367,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ ioval = EM8300_VIDEOMODE_PAL; } - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoSelectedTVNormByFrameRate); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Auto-selected TV norm by framerate: "); ioval == EM8300_VIDEOMODE_PAL60 ? mp_msg(MSGT_VO,MSGL_INFO, "PAL-60") : mp_msg(MSGT_VO,MSGL_INFO, "PAL"); printf(".\n"); } else { @@ -399,14 +377,14 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ ioval = EM8300_VIDEOMODE_PAL; } - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoSelectedTVNormByFrameRate); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Auto-selected TV norm by framerate: "); ioval == EM8300_VIDEOMODE_NTSC ? mp_msg(MSGT_VO,MSGL_INFO, "NTSC") : mp_msg(MSGT_VO,MSGL_INFO, "PAL"); printf(".\n"); } if (old_vmode != ioval) { if (ioctl(fd_control, EM8300_IOCTL_SET_VIDEOMODE, &ioval) < 0) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToSetTVNorm); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to set TV norm!\n"); } } } @@ -417,10 +395,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ aspect_save_prescale(d_width, d_height); ioctl(fd_control, EM8300_IOCTL_GET_VIDEOMODE, &ioval); if (ioval == EM8300_VIDEOMODE_NTSC) { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingUpForNTSC); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting up for NTSC.\n"); aspect_save_screenres(352, 240); } else { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingUpForPALSECAM); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting up for PAL/SECAM.\n"); aspect_save_screenres(352, 288); } aspect(&s_width, &s_height, A_ZOOM); @@ -433,10 +411,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ tmp2 = abs(d_height - (int) (d_width / 2.35)); if (tmp1 < tmp2) { ioval = EM8300_ASPECTRATIO_4_3; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingAspectRatioTo43); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting aspect ratio to 4:3.\n"); } else { ioval = EM8300_ASPECTRATIO_16_9; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_SettingAspectRatioTo169); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Setting aspect ratio to 16:9.\n"); } ioctl(fd_control, EM8300_IOCTL_SET_ASPECTRATIO, &ioval); @@ -455,20 +433,20 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ osdpicbuf = calloc( 1,s_width * s_height); if (osdpicbuf == NULL) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_OutOfMemory); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] out of memory\n"); return -1; } spued = malloc(sizeof(encodedata)); if (spued == NULL) { free( osdpicbuf ); - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_OutOfMemory); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] out of memory\n"); return -1; } spubuf = malloc(sizeof(encodedata)); if (spubuf == NULL) { free( osdpicbuf ); free( spued ); - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_OutOfMemory); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] out of memory\n"); return -1; } osd_w = s_width; @@ -499,19 +477,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ vo_dy = (vo_screenheight - d_height) / 2; vo_dwidth = d_width; vo_dheight = d_height; -#ifdef CONFIG_GUI - if (use_gui) { - guiGetEvent(guiSetShVideo, 0); - XSetWindowBackground(mDisplay, vo_window, KEY_COLOR); - XClearWindow(mDisplay, vo_window); - XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &xwin_attribs); - depth = xwin_attribs.depth; - if (depth != 15 && depth != 16 && depth != 24 && depth != 32) { - depth = 24; - } - XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &vinfo); - } else -#endif { XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &xwin_attribs); depth = xwin_attribs.depth; @@ -547,13 +512,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_ ((key_color.blue >> (16 - blue_prec)) << blue_shift)); key_color.flags = DoRed | DoGreen | DoBlue; if (!XAllocColor(mDisplay, cmap, &key_color)) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToAllocateKeycolor); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to allocate keycolor!\n"); return -1; } acq_color = ((key_color.red / 256) << 16) | ((key_color.green / 256) << 8) | key_color.blue; if (key_color.pixel != KEY_COLOR) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_UnableToAllocateExactKeycolor, key_color.pixel); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Unable to allocate exact keycolor, using closest match (0x%lx).\n", key_color.pixel); } /* Set keycolor and activate overlay */ @@ -705,25 +670,19 @@ static int draw_slice(uint8_t *srcimg[], int stride[], int w, int h, int x0, int static void uninit(void) { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Uninitializing); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Uninitializing.\n"); #ifdef CONFIG_X11 if (dxr3_overlay) { overlay_set_mode(overlay_data, EM8300_OVERLAY_MODE_OFF); overlay_release(overlay_data); -#ifdef CONFIG_GUI - if (!use_gui) { -#endif vo_x11_uninit(); -#ifdef CONFIG_GUI - } -#endif } #endif if (old_vmode != -1) { if (ioctl(fd_control, EM8300_IOCTL_SET_VIDEOMODE, &old_vmode) < 0) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedRestoringTVNorm); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed restoring TV norm!\n"); } } @@ -758,24 +717,24 @@ static int preinit(const char *arg) /* Parse commandline */ while (arg) { if (!strncmp("prebuf", arg, 6) && !dxr3_prebuf) { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_EnablingPrebuffering); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Enabling prebuffering.\n"); dxr3_prebuf = 1; } else if (!strncmp("sync", arg, 4) && !dxr3_newsync) { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingNewSyncEngine); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Using new sync engine.\n"); dxr3_newsync = 1; } else if (!strncmp("overlay", arg, 7) && !dxr3_overlay) { #ifdef CONFIG_X11 - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingOverlay); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Using overlay.\n"); dxr3_overlay = 1; #else - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorYouNeedToCompileMplayerWithX11); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error: Overlay requires compiling with X11 libs/headers installed.\n"); #endif } else if (!strncmp("norm=", arg, 5)) { arg += 5; // dxr3_norm is 0 (-> don't change norm) by default // but maybe someone changes this in the future - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_WillSetTVNormTo); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Will set TV norm to: "); if (*arg == '5') { dxr3_norm = 5; @@ -788,16 +747,16 @@ static int preinit(const char *arg) mp_msg(MSGT_VO,MSGL_INFO, "PAL"); } else if (*arg == '2') { dxr3_norm = 2; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoAdjustToMovieFrameRatePALPAL60); + mp_tmsg(MSGT_VO,MSGL_INFO, "auto-adjust to movie framerate (PAL/PAL-60)"); } else if (*arg == '1') { dxr3_norm = 1; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_AutoAdjustToMovieFrameRatePALNTSC); + mp_tmsg(MSGT_VO,MSGL_INFO, "auto-adjust to movie framerate (PAL/NTSC)"); } else if (*arg == '0') { dxr3_norm = 0; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UseCurrentNorm); + mp_tmsg(MSGT_VO,MSGL_INFO, "Use current norm."); } else { dxr3_norm = 0; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UseUnknownNormSuppliedCurrentNorm); + mp_tmsg(MSGT_VO,MSGL_INFO, "Unknown norm supplied. Use current norm."); } mp_msg(MSGT_VO,MSGL_INFO, ".\n"); @@ -817,15 +776,15 @@ static int preinit(const char *arg) fd_control = open(devname, fdflags); if (fd_control < 1) { /* Fall back to old naming scheme */ - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingTrying, devname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error opening %s for writing, trying /dev/em8300 instead.\n", devname); sprintf(devname, "/dev/em8300"); fd_control = open(devname, fdflags); if (fd_control < 1) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingAsWell); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Error opening /dev/em8300 for writing as well!\nBailing out.\n"); return -1; } } else { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Opened, devname); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Opened: %s.\n", devname); } /* Open the video interface */ @@ -833,16 +792,16 @@ static int preinit(const char *arg) fd_video = open(devname, fdflags); if (fd_video < 0) { /* Fall back to old naming scheme */ - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingTryingMV, devname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error opening %s for writing, trying /dev/em8300_mv instead.\n", devname); sprintf(devname, "/dev/em8300_mv"); fd_video = open(devname, fdflags); if (fd_video < 0) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingAsWellMV); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Error opening /dev/em8300_mv for writing as well!\nBailing out.\n"); uninit(); return -1; } } else { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Opened, devname); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Opened: %s.\n", devname); } strcpy(fdv_name, devname); @@ -851,16 +810,16 @@ static int preinit(const char *arg) fd_spu = open(devname, fdflags); if (fd_spu < 0) { /* Fall back to old naming scheme */ - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingTryingSP, devname); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Error opening %s for writing, trying /dev/em8300_sp instead.\n", devname); sprintf(devname, "/dev/em8300_sp"); fd_spu = open(devname, fdflags); if (fd_spu < 0) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_ErrorOpeningForWritingAsWellSP); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Error opening /dev/em8300_sp for writing as well!\nBailing out.\n"); uninit(); return -1; } } else { - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Opened, devname); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Opened: %s.\n", devname); } strcpy(fds_name, devname); @@ -877,7 +836,7 @@ static int preinit(const char *arg) dpy = XOpenDisplay(NULL); if (!dpy) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToOpenDisplayDuringHackSetup); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to open display during overlay hack setup!\n"); return -1; } XGetWindowAttributes(dpy, RootWindow(dpy, DefaultScreen(dpy)), &attribs); @@ -893,16 +852,10 @@ static int preinit(const char *arg) /* Initialize overlay and X11 */ overlay_data = overlay_init(fd_control); -#ifdef CONFIG_GUI - if (!use_gui) { -#endif if (!vo_init()) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_UnableToInitX11); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Unable to init X11!\n"); return -1; } -#ifdef CONFIG_GUI - } -#endif } #endif @@ -936,7 +889,7 @@ static int overlay_set_attribute(overlay_t *o, int attribute, int value) attr.value = value; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SET_ATTRIBUTE, &attr)==-1) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSettingOverlayAttribute); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed setting overlay attribute.\n"); return -1; } @@ -1142,7 +1095,7 @@ static int overlay_set_screen(overlay_t *o, int xres, int yres, int depth) if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETSCREEN, &scr)==-1) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSettingOverlayScreen); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed setting overlay screen!\nExiting.\n"); return -1; } return 0; @@ -1151,7 +1104,7 @@ static int overlay_set_screen(overlay_t *o, int xres, int yres, int depth) static int overlay_set_mode(overlay_t *o, int mode) { if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETMODE, &mode)==-1) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedEnablingOverlay); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed enabling overlay!\nExiting.\n"); return -1; } return 0; @@ -1167,7 +1120,7 @@ static int overlay_set_window(overlay_t *o, int xpos,int ypos,int width,int heig if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETWINDOW, &win)==-1) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedResizingOverlayWindow); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed resizing overlay window!\n"); return -1; } return 0; @@ -1182,7 +1135,7 @@ static int overlay_set_bcs(overlay_t *o, int brightness, int contrast, int satur if (ioctl(o->dev, EM8300_IOCTL_GETBCS, &bcs)==-1) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSettingOverlayBcs); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed setting overlay bcs!\n"); return -1; } return 0; @@ -1270,11 +1223,11 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) cal.cal_mode = EM8300_OVERLAY_CALMODE_YOFFSET; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_CALIBRATE, &cal)) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedGettingOverlayYOffsetValues); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed getting overlay Y-offset values!\nExiting.\n"); return -1; } o->yoffset = cal.result; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_YOffset,cal.result); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Yoffset: %d.\n",cal.result); /* Calibrate X-offset */ @@ -1283,11 +1236,11 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) cal.cal_mode = EM8300_OVERLAY_CALMODE_XOFFSET; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_CALIBRATE, &cal)) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedGettingOverlayXOffsetValues); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed getting overlay X-offset values!\nExiting.\n"); return -1; } o->xoffset = cal.result; - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_XOffset,cal.result); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Xoffset: %d.\n",cal.result); /* Calibrate X scale correction */ @@ -1296,10 +1249,10 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) cal.cal_mode = EM8300_OVERLAY_CALMODE_XCORRECTION; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_CALIBRATE, &cal)) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedGettingOverlayXScaleCorrection); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed getting overlay X scale correction!\nExiting.\n"); return -1; } - mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_XCorrection,cal.result); + mp_tmsg(MSGT_VO,MSGL_INFO, "[VO_DXR3] Xcorrection: %d.\n",cal.result); o->xcorr = cal.result; win.xpos = 10; @@ -1307,7 +1260,7 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) win.width = o->xres-20; win.height = o->yres-20; if (ioctl(o->dev, EM8300_IOCTL_OVERLAY_SETWINDOW, &win)==-1) { - mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_DXR3_FailedResizingOverlayWindow); + mp_tmsg(MSGT_VO,MSGL_ERR, "[VO_DXR3] Failed resizing overlay window!\n"); exit(1); } @@ -1370,7 +1323,7 @@ static int overlay_autocalibrate(overlay_t *o, pattern_drawer_cb pd, void *arg) static int overlay_signalmode(overlay_t *o, int mode) { if(ioctl(o->dev, EM8300_IOCTL_OVERLAY_SIGNALMODE, &mode) ==-1) { - mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_DXR3_FailedSetSignalMix); + mp_tmsg(MSGT_VO,MSGL_WARN, "[VO_DXR3] Failed to set signal mix!\n"); return -1; } return 0; |