Annotation of multiplexer/error.c, revision 1.7

1.1       oskar       1: /*
                      2:  * ISO 13818 stream multiplexer
                      3:  * Copyright (C) 2001 Convergence Integrated Media GmbH Berlin
1.7     ! oskar       4:  * Author: Oskar Schirmer (schirmer@scara.com)
1.6       oskar       5:  *
                      6:  * This program is free software; you can redistribute it and/or modify
                      7:  * it under the terms of the GNU General Public License as published by
                      8:  * the Free Software Foundation; either version 2 of the License, or
                      9:  * (at your option) any later version.
                     10:  *
                     11:  * This program is distributed in the hope that it will be useful,
                     12:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
                     13:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     14:  * GNU General Public License for more details.
                     15:  *
                     16:  * You should have received a copy of the GNU General Public License
                     17:  * along with this program; if not, write to the Free Software
                     18:  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
1.1       oskar      19:  */
                     20: 
                     21: /*
                     22:  * Module:  Error
                     23:  * Purpose: Error and debug information provision.
1.2       oskar      24:  *          Other functions related to stderr.
1.1       oskar      25:  */
                     26: 
                     27: #include "error.h"
                     28: 
1.4       oskar      29: static char *warn_level_name[] = {
1.1       oskar      30:   "Error",
                     31:   "Warning",
                     32:   "Important",
                     33:   "Information",
                     34:   "Secondary",
                     35:   "Debug"
                     36: };
                     37: 
1.4       oskar      38: static char *warn_module_name[] = {
1.1       oskar      39:   "Init",
                     40:   "Dispatch",
                     41:   "Error",
                     42:   "Input",
                     43:   "Output",
                     44:   "Command",
                     45:   "Global",
                     46:   "Split PES",
                     47:   "Split PS",
                     48:   "Split TS",
                     49:   "Splice PS",
                     50:   "Splice TS",
1.2       oskar      51:   "Splice",
1.1       oskar      52:   "Descr"
                     53: };
                     54: 
                     55: int verbose_level;
                     56: 
                     57: void do_warn (int level1,
                     58:     char *text,
                     59:     int module1,
                     60:     int func,
                     61:     int numb,
                     62:     long value)
                     63: {
1.3       oskar      64:   fprintf (stderr, "%s: %s (%s,%02X,%02X,%08lX/%ld)\n",
1.1       oskar      65:     warn_level_name[level1],
1.3       oskar      66:     text, warn_module_name[module1], func, numb, value, value);
1.1       oskar      67: }
                     68: 

LinuxTV legacy CVS <linuxtv.org/cvs>