comparison vidix/vidix.c @ 37107:3c5c93a30fb7

vidix: Replace printf with mp_msg - Make MPlayer more quiet when requested (e.g. when using -really-quiet) - Additionally change some minor capitalization and "bla:" to "[bla]" Patch-by: Arne Bochem >arneb.mp ccan de< Patch-also-OKed-by: Reimar
author al
date Sat, 17 May 2014 01:38:00 +0000
parents 945eab072c9d
children
comparison
equal deleted inserted replaced
37106:1b9907dfe2f4 37107:3c5c93a30fb7
41 #include "config.h" 41 #include "config.h"
42 #include "vidix.h" 42 #include "vidix.h"
43 #include "drivers.h" 43 #include "drivers.h"
44 #include "libavutil/common.h" 44 #include "libavutil/common.h"
45 #include "mpbswap.h" 45 #include "mpbswap.h"
46 #include "mp_msg.h"
46 47
47 VDXContext *vdlOpen(const char *name,unsigned cap,int verbose) 48 VDXContext *vdlOpen(const char *name,unsigned cap,int verbose)
48 { 49 {
49 VDXContext *ctx; 50 VDXContext *ctx;
50 51
60 free (ctx); 61 free (ctx);
61 return NULL; 62 return NULL;
62 } 63 }
63 64
64 if (verbose) 65 if (verbose)
65 printf ("vidixlib: will use %s driver\n", ctx->drv->name); 66 mp_msg(MSGT_VO, MSGL_STATUS, "[vidixlib] Will use %s driver\n", ctx->drv->name);
66 67
67 if (!ctx->drv || !ctx->drv->init) 68 if (!ctx->drv || !ctx->drv->init)
68 { 69 {
69 if (verbose) 70 if (verbose)
70 printf ("vidixlib: Can't init driver\n"); 71 mp_msg(MSGT_VO, MSGL_STATUS, "[vidixlib] Can't init driver\n");
71 free (ctx); 72 free (ctx);
72 return NULL; 73 return NULL;
73 } 74 }
74 75
75 if (verbose) 76 if (verbose)
76 printf ("vidixlib: Attempt to initialize driver at: %p\n", 77 mp_msg(MSGT_VO, MSGL_STATUS, "[vidixlib] Attempt to initialize driver at: %p\n",
77 ctx->drv->init); 78 ctx->drv->init);
78 79
79 if (ctx->drv->init () !=0) 80 if (ctx->drv->init () !=0)
80 { 81 {
81 if (verbose) 82 if (verbose)
82 printf ("vidixlib: Can't init driver\n"); 83 mp_msg(MSGT_VO, MSGL_STATUS, "[vidixlib] Can't init driver\n");
83 free (ctx); 84 free (ctx);
84 return NULL; 85 return NULL;
85 } 86 }
86 87
87 if (verbose) 88 if (verbose)
88 printf("vidixlib: '%s'successfully loaded\n", ctx->drv->name); 89 mp_msg(MSGT_VO, MSGL_STATUS, "[vidixlib] '%s'successfully loaded\n", ctx->drv->name);
89 90
90 return ctx; 91 return ctx;
91 } 92 }
92 93
93 void vdlClose(VDXContext *ctx) 94 void vdlClose(VDXContext *ctx)