diff libavutil/log.h @ 2:897f711a7157

rearrange to work with autoconf
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 25 Sep 2012 15:55:33 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libavutil/log.h	Tue Sep 25 15:55:33 2012 +0200
     1.3 @@ -0,0 +1,120 @@
     1.4 +/*
     1.5 + * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
     1.6 + *
     1.7 + * This file is part of FFmpeg.
     1.8 + *
     1.9 + * FFmpeg is free software; you can redistribute it and/or
    1.10 + * modify it under the terms of the GNU Lesser General Public
    1.11 + * License as published by the Free Software Foundation; either
    1.12 + * version 2.1 of the License, or (at your option) any later version.
    1.13 + *
    1.14 + * FFmpeg is distributed in the hope that it will be useful,
    1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.17 + * Lesser General Public License for more details.
    1.18 + *
    1.19 + * You should have received a copy of the GNU Lesser General Public
    1.20 + * License along with FFmpeg; if not, write to the Free Software
    1.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    1.22 + */
    1.23 +
    1.24 +#ifndef AVUTIL_LOG_H
    1.25 +#define AVUTIL_LOG_H
    1.26 +
    1.27 +#include <stdarg.h>
    1.28 +//#include "avutil.h"
    1.29 +
    1.30 +/**
    1.31 + * Describes the class of an AVClass context structure. That is an
    1.32 + * arbitrary struct of which the first field is a pointer to an
    1.33 + * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.).
    1.34 + */
    1.35 +typedef struct {
    1.36 +    /**
    1.37 +     * The name of the class; usually it is the same name as the
    1.38 +     * context structure type to which the AVClass is associated.
    1.39 +     */
    1.40 +    const char* class_name;
    1.41 +
    1.42 +    /**
    1.43 +     * A pointer to a function which returns the name of a context
    1.44 +     * instance ctx associated with the class.
    1.45 +     */
    1.46 +    const char* (*item_name)(void* ctx);
    1.47 +
    1.48 +    /**
    1.49 +     * a pointer to the first option specified in the class if any or NULL
    1.50 +     *
    1.51 +     * @see av_set_default_options()
    1.52 +     */
    1.53 +    const struct AVOption *option;
    1.54 +
    1.55 +    /**
    1.56 +     * LIBAVUTIL_VERSION with which this structure was created.
    1.57 +     * This is used to allow fields to be added without requiring major
    1.58 +     * version bumps everywhere.
    1.59 +     */
    1.60 +
    1.61 +    int version;
    1.62 +} AVClass;
    1.63 +
    1.64 +/* av_log API */
    1.65 +
    1.66 +#define AV_LOG_QUIET    -8
    1.67 +
    1.68 +/**
    1.69 + * Something went really wrong and we will crash now.
    1.70 + */
    1.71 +#define AV_LOG_PANIC     0
    1.72 +
    1.73 +/**
    1.74 + * Something went wrong and recovery is not possible.
    1.75 + * For example, no header was found for a format which depends
    1.76 + * on headers or an illegal combination of parameters is used.
    1.77 + */
    1.78 +#define AV_LOG_FATAL     8
    1.79 +
    1.80 +/**
    1.81 + * Something went wrong and cannot losslessly be recovered.
    1.82 + * However, not all future data is affected.
    1.83 + */
    1.84 +#define AV_LOG_ERROR    16
    1.85 +
    1.86 +/**
    1.87 + * Something somehow does not look correct. This may or may not
    1.88 + * lead to problems. An example would be the use of '-vstrict -2'.
    1.89 + */
    1.90 +#define AV_LOG_WARNING  24
    1.91 +
    1.92 +#define AV_LOG_INFO     32
    1.93 +#define AV_LOG_VERBOSE  40
    1.94 +
    1.95 +/**
    1.96 + * Stuff which is only useful for libav* developers.
    1.97 + */
    1.98 +#define AV_LOG_DEBUG    48
    1.99 +
   1.100 +/**
   1.101 + * Sends the specified message to the log if the level is less than or equal
   1.102 + * to the current av_log_level. By default, all logging messages are sent to
   1.103 + * stderr. This behavior can be altered by setting a different av_vlog callback
   1.104 + * function.
   1.105 + *
   1.106 + * @param avcl A pointer to an arbitrary struct of which the first field is a
   1.107 + * pointer to an AVClass struct.
   1.108 + * @param level The importance level of the message, lower values signifying
   1.109 + * higher importance.
   1.110 + * @param fmt The format string (printf-compatible) that specifies how
   1.111 + * subsequent arguments are converted to output.
   1.112 + * @see av_vlog
   1.113 + */
   1.114 +
   1.115 +void av_log(int level, const char *fmt, ...);
   1.116 +
   1.117 +void av_vlog(int level, const char *fmt, va_list);
   1.118 +int av_log_get_level(void);
   1.119 +void av_log_set_level(int);
   1.120 +void av_log_set_callback(void (*)(int, const char*, va_list));
   1.121 +void av_log_default_callback(int level, const char* fmt, va_list vl);
   1.122 +
   1.123 +#endif /* AVUTIL_LOG_H */