summaryrefslogtreecommitdiffstats
path: root/libvo/mga_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/mga_common.c')
-rw-r--r--libvo/mga_common.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libvo/mga_common.c b/libvo/mga_common.c
index 52b6e2c340..83ca93acce 100644
--- a/libvo/mga_common.c
+++ b/libvo/mga_common.c
@@ -5,6 +5,7 @@
#include "postproc/rgb2rgb.h"
#include "libmpcodecs/vf_scale.h"
#include "mp_msg.h"
+#include "help_mp.h"
// mga_vid drawing functions
static void set_window( void ); /* forward declaration to kill warnings */
@@ -138,7 +139,7 @@ vo_mga_flip_page(void)
static int
draw_frame(uint8_t *src[])
{
- printf("!!! mga::draw_frame() called !!!\n");
+ mp_msg(MSGT_VO,MSGL_WARN,"!!! mga::draw_frame() called !!!\n");
return 0;
}
@@ -226,7 +227,7 @@ static void mga_fullscreen()
mga_vid_config.x_org=(vo_screenwidth-w)/2;
mga_vid_config.y_org=(vo_screenheight-h)/2;
if ( ioctl( f,MGA_VID_CONFIG,&mga_vid_config ) )
- printf( "Error in mga_vid_config ioctl (wrong mga_vid.o version?)" );
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_ErrorInConfigIoctl );
}
static int control(uint32_t request, void *data, ...)
@@ -248,7 +249,7 @@ static int control(uint32_t request, void *data, ...)
if (ioctl(f,MGA_VID_GET_LUMA,&prev)) {
perror("Error in mga_vid_config ioctl()");
- printf("Could not get luma values from the kernel module!\n");
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotGetLumaValuesFromTheKernelModule);
return VO_FALSE;
}
@@ -269,7 +270,7 @@ static int control(uint32_t request, void *data, ...)
if (ioctl(f,MGA_VID_SET_LUMA,luma)) {
perror("Error in mga_vid_config ioctl()");
- printf("Could not set luma values in the kernel module!\n");
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotSetLumaValuesFromTheKernelModule);
return VO_FALSE;
}
@@ -287,7 +288,7 @@ static int control(uint32_t request, void *data, ...)
if (ioctl(f,MGA_VID_GET_LUMA,&luma)) {
perror("Error in mga_vid_config ioctl()");
- printf("Could not get luma values from the kernel module!\n");
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldNotGetLumaValuesFromTheKernelModule);
return VO_FALSE;
}
@@ -310,7 +311,7 @@ static int control(uint32_t request, void *data, ...)
if (vo_screenwidth && vo_screenheight)
mga_fullscreen();
else
- printf("Screen width/height unknown!\n");
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_ScreenWidthHeightUnknown);
return VO_TRUE;
case VOCTRL_GET_PANSCAN:
if ( !vo_fs ) return VO_FALSE;
@@ -367,7 +368,7 @@ static int mga_init(int width,int height,unsigned int format){
mga_vid_config.frame_size = ((width + 31) & ~31) * height * 2;
mga_vid_config.format=MGA_VID_FORMAT_UYVY; break;
default:
- printf("mga: invalid output format %0X\n",format);
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_InvalidOutputFormat,format);
return (-1);
}
@@ -385,11 +386,11 @@ static int mga_init(int width,int height,unsigned int format){
if (ioctl(f,MGA_VID_CONFIG,&mga_vid_config))
{
perror("Error in mga_vid_config ioctl()");
- printf("Your mga_vid driver version is incompatible with this MPlayer version!\n");
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_IncompatibleDriverVersion);
return -1;
}
- printf("[mga] Using %d buffers.\n",mga_vid_config.num_frames);
+ mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_MGA_UsingBuffers,mga_vid_config.num_frames);
frames[0] = (char*)mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,f,0);
frames[1] = frames[0] + 1*mga_vid_config.frame_size;
@@ -427,7 +428,7 @@ static int preinit(const char *vo_subdevice)
if(f == -1)
{
perror("open");
- printf("vo_mga: Couldn't open %s\n",devname);
+ mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_MGA_CouldntOpen,devname);
return(-1);
}