Code Search for Developers
 
 
  

mp_msg.h from The Open2x Project at Krugle


Show mp_msg.h syntax highlighted


#ifndef _MP_MSG_H
#    define _MP_MSG_H

// defined in mplayer.c and mencoder.c
extern int      verbose;
extern int      identify;

// verbosity elevel:

// stuff from level MSGL_FATAL-MSGL_STATUS should be translated.

#    define MSGL_FATAL 0        // will exit/abort
#    define MSGL_ERR 1          // continues
#    define MSGL_WARN 2         // only warning
#    define MSGL_HINT 3         // short help message
#    define MSGL_INFO 4         // -quiet
#    define MSGL_STATUS 5       // v=0
#    define MSGL_V 6            // v=1
#    define MSGL_DBG2 7         // v=2
#    define MSGL_DBG3 8         // v=3
#    define MSGL_DBG4 9         // v=4

#    define MSGL_FIXME 1        // for conversions from printf where the appropriate MSGL is not known; set equal to ERR for obtrusiveness
#    define MSGT_FIXME 0        // for conversions from printf where the appropriate MSGT is not known; set equal to GLOBAL for obtrusiveness

// code/module:

#    define MSGT_GLOBAL 0       // common player stuff errors
#    define MSGT_CPLAYER 1      // console player (mplayer.c)
#    define MSGT_GPLAYER 2      // gui player

#    define MSGT_VO 3           // libvo
#    define MSGT_AO 4           // libao

#    define MSGT_DEMUXER 5      // demuxer.c (general stuff)
#    define MSGT_DS 6           // demux stream (add/read packet etc)
#    define MSGT_DEMUX 7        // fileformat-specific stuff (demux_*.c)
#    define MSGT_HEADER 8       // fileformat-specific header (*header.c)

#    define MSGT_AVSYNC 9       // mplayer.c timer stuff
#    define MSGT_AUTOQ 10       // mplayer.c auto-quality stuff

#    define MSGT_CFGPARSER 11   // cfgparser.c

#    define MSGT_DECAUDIO 12    // av decoder
#    define MSGT_DECVIDEO 13

#    define MSGT_SEEK 14        // seeking code
#    define MSGT_WIN32 15       // win32 dll stuff
#    define MSGT_OPEN 16        // open.c (stream opening)
#    define MSGT_DVD 17         // open.c (DVD init/read/seek)

#    define MSGT_PARSEES 18     // parse_es.c (mpeg stream parser)
#    define MSGT_LIRC 19        // lirc_mp.c and input lirc driver

#    define MSGT_STREAM 20      // stream.c
#    define MSGT_CACHE 21       // cache2.c

#    define MSGT_MENCODER 22

#    define MSGT_XACODEC 23     // XAnim codecs

#    define MSGT_TV 24          // TV input subsystem

#    define MSGT_OSDEP 25       // OS Dependant parts (linux/ for now)

#    define MSGT_SPUDEC 26      // spudec.c

#    define MSGT_PLAYTREE 27    // Playtree handeling (playtree.c, playtreeparser.c)

#    define MSGT_INPUT 28

#    define MSGT_VFILTER 29

#    define MSGT_OSD 30

#    define MSGT_NETWORK 31

#    define MSGT_CPUDETECT 32

#    define MSGT_CODECCFG 33

#    define MSGT_SWS 34

#    define MSGT_VOBSUB 35
#    define MSGT_SUBREADER 36

#    define MSGT_AFILTER 37     // Audio filter messages

#    define MSGT_NETST 38       // Netstream

#    define MSGT_MUXER 39       // muxer layer

#    define MSGT_MAX 64

void            mp_msg_init();
void            mp_msg_set_level(int verbose);
int             mp_msg_test(int mod, int lev);

#    include "config.h"

#    ifdef TARGET_OS2
// va_start/vsnprintf seems to be broken under OS2 :(
#        define mp_msg(mod,lev, fmt, args... ) do{if((lev)<=mp_msg_levels[mod]) printf( fmt, ## args );}while(0)
#        define mp_dbg(mod,lev, args... )
#    else

#        ifdef USE_I18N
#            include <libintl.h>
#            include <locale.h>
#            define mp_gettext(String) gettext(String)
#        else
#            define mp_gettext(String) String
#        endif

#        ifdef __GNUC__
void            mp_msg_c(int x, const char *format, ...) __attribute__ ((format(printf, 2, 3)));

#            define mp_msg(mod,lev, args... ) mp_msg_c(((mod)<<8)|(lev), ## args )

#            ifdef MP_DEBUG
#                define mp_dbg(mod,lev, args... ) mp_msg_c(((mod)<<8)|(lev), ## args )
#            else
// these messages are only usefull for developers, disable them
#                define mp_dbg(mod,lev, args... )
#            endif
#        else                   // not GNU C
void            mp_msg_c(int x, const char *format, ...);

#            define mp_msg(mod,lev, ... ) mp_msg_c(((mod)<<8)|(lev), __VA_ARGS__)

#            ifdef MP_DEBUG
#                define mp_dbg(mod,lev, ... ) mp_msg_c(((mod)<<8)|(lev), __VA_ARGS__)
#            else
// these messages are only usefull for developers, disable them
#                define mp_dbg(mod,lev, ... )
#            endif
#        endif

#    endif
#endif




See more files for this project here

The Open2x Project

The Open2x project exists to provide an open source resource for the GP2X handheld console based on the MagicEyes MMSP2 processing platform and MP2520F SoC. The project hosts Linux kernel source for the GP2X, boot loader (U-Boot) source and more.

Project homepage: http://www.distant-earth.com/open2x
Programming language(s): Assembly,C,C++
License: other

  default_skin/
    asf.png
    avi.png
    body.png
    dat.png
    downarrow.png
    error.png
    ext.png
    ext_on.png
    folder.png
    full.png
    loading.png
    mpg.png
    nand.png
    nand_on.png
    normal.png
    resume.png
    save.png
    sd.png
    sd_on.png
    selectbar.png
    uparrow.png
    wmv.png
  etc/
    codecs.conf
    dvb-menu.conf
    example.conf
    input.conf
    inttypes.h
    menu.conf
    mplayer.desktop
    mplayer.ico
  fbdisp/
    Makefile
    fblin16.c
    fblin24.c
    fblin32.c
    fbs.h
    fontdisp.h
    fontout.c
    gfxdev.h
    gfxfontext.c
    gfxfontload.c
    gfxfontout.c
    gfxtype.h
    gulim_96_10_eng.c
    gulim_96_10_han.c
    main.c
    scr_fb.c
  help/
    help_diff.sh
    help_mp-bg.h
    help_mp-cs.h
    help_mp-de.h
    help_mp-dk.h
    help_mp-el.h
    help_mp-en.h
    help_mp-es.h
    help_mp-fr.h
    help_mp-hu.h
    help_mp-it.h
    help_mp-ja.h
    help_mp-ko.h
    help_mp-mk.h
    help_mp-nl.h
    help_mp-no.h
    help_mp-pl.h
    help_mp-pt_BR.h
    help_mp-ro.h
    help_mp-ru.h
  libaf/
  libao2/
  libmpcodecs/
  libmpdemux/
  loader/
  osdep/
  AUTHORS
  DirDisplay.c
  DirDisplay.h
  DirList.c
  DirList.h
  FontDisplay.c
  FontDisplay.h
  LICENSE
  Makefile
  bswap.h
  codec-cfg.c
  codec-cfg.h
  config.h
  config.mak
  csource.lst
  cx25874.h
  drawcontrol.c
  drawcontrol.h
  dualcpu.h
  filelistview.c
  filelistview.h
  find_sub.c
  g2player.h
  get_path.c
  glock.c
  glock.h
  guictrl.c
  guictrl.h
  gv.c
  gvlib_export.h
  help_mp.h
  i2c.h
  imgNumber.h
  imgbinary.h
  m_config.c
  m_config.h
  m_option.c
  m_option.h
  m_struct.c
  m_struct.h
  mangle.h
  mixer.c
  mixer.h
  mmsp2_940_if.c
  mmsp2_if.h
  mp_msg.c
  mp_msg.h
  mplayer.c
  mplayer.h
  open2x-mplayer.sh
  rtc_1024_table.h
  subdisp.c
  subdisp.h
  subreader.c
  subreader.h
  typed.h
  version.h
  vpp.h
  vpts_q.c
  wincetype.h