diff options
author | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-24 04:23:53 +0000 |
---|---|---|
committer | reynaldo <reynaldo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-04-24 04:23:53 +0000 |
commit | 78417bf0ddb3e5711e6cc22ed98ed095286a0ece (patch) | |
tree | f7c5c3ca1c7ac07e6da82b70e3e1ce62e807a787 /libvo/vo_tdfx_vid.c | |
parent | 141b72fe05ec33239e1be6ff6ce064a67440fb8f (diff) | |
download | mpv-78417bf0ddb3e5711e6cc22ed98ed095286a0ece.tar.bz2 mpv-78417bf0ddb3e5711e6cc22ed98ed095286a0ece.tar.xz |
Part 5 and final of otvos attila's oattila AT chello-hu mp_msg changes, with lots of corrections
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18235 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_tdfx_vid.c')
-rw-r--r-- | libvo/vo_tdfx_vid.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/libvo/vo_tdfx_vid.c b/libvo/vo_tdfx_vid.c index 63447e1274..7d8b5553f9 100644 --- a/libvo/vo_tdfx_vid.c +++ b/libvo/vo_tdfx_vid.c @@ -36,6 +36,7 @@ #include "video_out_internal.h" #include "aspect.h" #include "mp_msg.h" +#include "help_mp.h" #include "fastmemcpy.h" #include "drivers/tdfx_vid.h" @@ -88,10 +89,10 @@ static void clear_screen(void) { mov.dst = front_buffer; mov.dst_stride = tdfx_cfg.screen_stride; - printf("Move %d(%d) x %d => %d \n", mov.width,mov.src_stride,mov.height,mov.dst_stride); + mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_Move, mov.width,mov.src_stride,mov.height,mov.dst_stride); if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) - printf("tdfx_vid: AGP move failed to clear the screen\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AGPMoveFailedToClearTheScreen); } @@ -176,7 +177,7 @@ flip_page(void) blit.dst_h = src_height; blit.dst_format = IMGFMT_BGR16; if(ioctl(tdfx_fd,TDFX_VID_BLIT,&blit)) - printf("tdfx_vid: Blit failed\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_BlitFailed); } return; } @@ -198,7 +199,7 @@ flip_page(void) blit.dst_format = dst_fmt; if(ioctl(tdfx_fd,TDFX_VID_BLIT,&blit)) - printf("tdfx_vid: Blit failed\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_BlitFailed); } static int @@ -266,7 +267,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin case IMGFMT_BGR24: case IMGFMT_BGR32: if(use_overlay) - printf("tdfx_vid: Non-native overlay format need conversion\n"); + mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_NonNativeOverlayFormatNeedConversion); case IMGFMT_BGR15: case IMGFMT_BGR16: src_bpp = ((format & 0x3F)+7)/8; @@ -282,7 +283,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin src_bpp = 2; break; default: - printf("Unsupported input format 0x%x\n",format); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_UnsupportedInputFormat,format); return 1; } @@ -338,28 +339,28 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin ov.use_colorkey = 0; if(ioctl(tdfx_fd,TDFX_VID_SET_OVERLAY,&ov)) { - printf("tdfxvid: Overlay setup failed\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_OverlaySetupFailed); use_overlay = 0; break; } tdfx_ov = ov; if(use_overlay == 1) { if(ioctl(tdfx_fd,TDFX_VID_OVERLAY_ON)) { - printf("tdfx_vid: Overlay on failed\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_OverlayOnFailed); use_overlay = 0; break; } use_overlay++; } - printf("tdfx_vid: Overlay ready : %d(%d) x %d @ %d => %d(%d) x %d @ %d\n", + mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_OverlayReady, src_width,src_stride,src_height,src_bpp, dst_width,dst_stride,dst_height,dst_bpp); break; } if(!use_overlay) - printf("tdfx_vid : Texture blit ready %d(%d) x %d @ %d => %d(%d) x %d @ %d\n", + mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_TDFXVID_TextureBlitReady, src_width,src_stride,src_height,src_bpp, dst_width,dst_stride,dst_height,dst_bpp); @@ -371,7 +372,7 @@ uninit(void) { if(use_overlay == 2) { if(ioctl(tdfx_fd,TDFX_VID_OVERLAY_OFF)) - printf("tdfx_vid: Overlay off failed\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_OverlayOffFailed); use_overlay--; } close(tdfx_fd); @@ -388,17 +389,17 @@ static int preinit(const char *arg) tdfx_fd = open(arg ? arg : "/dev/tdfx_vid", O_RDWR); if(tdfx_fd < 0) { - printf("tdfx_vid: Can't open %s: %s\n",arg ? arg : "/dev/tdfx_vid", + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_CantOpen,arg ? arg : "/dev/tdfx_vid", strerror(errno)); return 1; } if(ioctl(tdfx_fd,TDFX_VID_GET_CONFIG,&tdfx_cfg)) { - printf("tdfx_vid: Can't get current cfg: %s\n",strerror(errno)); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_CantGetCurrentCfg,strerror(errno)); return 1; } - printf("tdfx_vid version %d\n" + mp_msg(MSGT_VO,MSGL_INFO, "tdfx_vid version %d\n" " Ram: %d\n" " Screen: %d x %d\n" " Format: %c%c%c%d\n", @@ -413,7 +414,7 @@ static int preinit(const char *arg) tdfx_fd, 0); if(agp_mem == MAP_FAILED) { - printf("tdfx_vid: Memmap failed !!!!!\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_MemmapFailed); return 1; } @@ -465,7 +466,7 @@ static uint32_t get_image(mp_image_t *mpi) { mpi->stride[2] = mpi->chroma_width; break; default: - printf("Get image todo\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_GetImageTodo); return VO_FALSE; } mpi->flags |= MP_IMGFLAG_DIRECT; @@ -532,7 +533,7 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.dst_stride = src_stride; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) - printf("tdfx_vid: AGP move failed\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailed); break; case IMGFMT_YV12: @@ -561,7 +562,7 @@ static uint32_t draw_image(mp_image_t *mpi){ yuv.base = back_buffer; yuv.stride = src_stride; if(ioctl(tdfx_fd,TDFX_VID_SET_YUV,&yuv)) { - printf("tdfx_vid: Set yuv failed\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_SetYuvFailed); break; } @@ -577,7 +578,7 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.dst_stride = TDFX_VID_YUV_STRIDE; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) { - printf("tdfx_vid: AGP move failed on Y plane\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnYPlane); break; } //return 0; @@ -589,7 +590,7 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.src_stride = buffer_stride[p]; mov.dst += TDFX_VID_YUV_PLANE_SIZE; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) { - printf("tdfx_vid: AGP move failed on U plane\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnUPlane); break; } // V @@ -598,12 +599,12 @@ static uint32_t draw_image(mp_image_t *mpi){ mov.src_stride = buffer_stride[p]; mov.dst += TDFX_VID_YUV_PLANE_SIZE; if(ioctl(tdfx_fd,TDFX_VID_AGP_MOVE,&mov)) { - printf("tdfx_vid: AGP move failed on U plane\n"); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnVPlane); break; } break; default: - printf("What's that for a format 0x%x\n",mpi->imgfmt); + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_TDFXVID_WhatsThatForAFormat,mpi->imgfmt); return VO_TRUE; } |