Mercurial > mplayer.hg
diff vidix/pm3_vid.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 |
line wrap: on
line diff
--- a/vidix/pm3_vid.c Tue May 13 21:06:40 2014 +0000 +++ b/vidix/pm3_vid.c Sat May 17 01:38:00 2014 +0000 @@ -32,12 +32,13 @@ #include "dha.h" #include "pci_ids.h" #include "pci_names.h" +#include "mp_msg.h" #include "pm3_regs.h" #if 0 -#define TRACE_ENTER() fprintf(stderr, "%s: enter\n", __FUNCTION__) -#define TRACE_EXIT() fprintf(stderr, "%s: exit\n", __FUNCTION__) +#define TRACE_ENTER() mp_msg(MSGT_VO, MSGL_DBG2, "[pm3] %s: enter\n", __FUNCTION__) +#define TRACE_EXIT() mp_msg(MSGT_VO, MSGL_DBG2, "[pm3] %s: exit\n", __FUNCTION__) #else #define TRACE_ENTER() #define TRACE_EXIT() @@ -89,7 +90,7 @@ err = pci_scan(lst,&num_pci); if(err) { - printf("[pm3] Error occurred during pci scan: %s\n",strerror(err)); + mp_msg(MSGT_VO, MSGL_STATUS, "[pm3] Error occurred during pci scan: %s\n",strerror(err)); return err; } else @@ -106,11 +107,11 @@ continue; dname = pci_device_name(VENDOR_3DLABS, lst[i].device); dname = dname ? dname : "Unknown chip"; - printf("[pm3] Found chip: %s\n", dname); + mp_msg(MSGT_VO, MSGL_STATUS, "[pm3] Found chip: %s\n", dname); #if 0 if ((lst[i].command & PCI_COMMAND_IO) == 0) { - printf("[pm3] Device is disabled, ignoring\n"); + mp_msg(MSGT_VO, MSGL_STATUS, "[pm3] Device is disabled, ignoring\n"); continue; } #endif @@ -121,14 +122,14 @@ } } } - if(err && verbose) printf("[pm3] Can't find chip\n"); + if(err && verbose) mp_msg(MSGT_VO, MSGL_STATUS, "[pm3] Can't find chip\n"); return err; } #define PRINT_REG(reg) \ { \ long _foo = READ_REG(reg); \ - printf("[pm3] " #reg " (%x) = %#lx (%li)\n", reg, _foo, _foo); \ + mp_msg(MSGT_VO, MSGL_STATUS, "[pm3] " #reg " (%x) = %#lx (%li)\n", reg, _foo, _foo); \ } static int pm3_init(void)