[FFmpeg-cvslog] r14685 - in trunk/libavcodec: avcodec.h utils.c

Stefano Sabatini stefano.sabatini-lala
Mon Aug 11 00:12:40 CEST 2008


On date Sunday 2008-08-10 22:29:43 +0200, superdump wrote:
> Author: superdump
> Date: Sun Aug 10 22:29:43 2008
> New Revision: 14685
> 
> Log:
> Add a generic function to lavc to log messages about missing features.
> 
> Patch by Justin Ruggles (justin ruggles gmail com)
> 
> 
> Modified:
>    trunk/libavcodec/avcodec.h
>    trunk/libavcodec/utils.c
> 
> Modified: trunk/libavcodec/avcodec.h
> ==============================================================================
> --- trunk/libavcodec/avcodec.h	(original)
> +++ trunk/libavcodec/avcodec.h	Sun Aug 10 22:29:43 2008
> @@ -3011,6 +3011,18 @@ int av_parse_video_frame_size(int *width
>   */
>  int av_parse_video_frame_rate(AVRational *frame_rate, const char *str);
>  
> +/**
> + * Logs a generic warning message about a missing feature.
> + * @param[in] avc a pointer to an arbitrary struct of which the first field is
> + * a pointer to an AVClass struct
> + * @param[in] feature string containing the name of the missing feature
> + * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
> + * If \p want_sample is non-zero, additional verbage will be added to the log
> + * message which tells the user how to report samples to the development
> + * mailing list.
> + */
> +void av_log_missing_feature(void *avc, const char *feature, int want_sample);
> +
>  /* error handling */
>  #if EINVAL > 0
>  #define AVERROR(e) (-(e)) /**< Returns a negative error code from a POSIX error code, to return from library functions. */
> 
> Modified: trunk/libavcodec/utils.c
> ==============================================================================
> --- trunk/libavcodec/utils.c	(original)
> +++ trunk/libavcodec/utils.c	Sun Aug 10 22:29:43 2008
> @@ -1513,3 +1513,16 @@ int av_parse_video_frame_rate(AVRational
>      else
>          return 0;
>  }
> +
> +void av_log_missing_feature(void *avc, const char *feature, int want_sample)
> +{
> +    av_log(avc, AV_LOG_WARNING, "%s not implemented. Update your FFmpeg "
> +            "version to the newest one from SVN. If the problem still "
> +            "occurs, it means that your file has a feature which has not "
> +            "been implemented.", feature);
> +    if(want_sample)
> +        av_log(avc, AV_LOG_WARNING, " If you want to help, upload a sample "
> +                "of this file to ftp://upload.mplayerhq.hu/MPlayer/incoming/ "
> +                "and contact the FFmpeg-devel mailing list.");
> +    av_log(avc, AV_LOG_WARNING, "\n");
> +}

It's adding a new function to the public API, so it should also bump
lavc minor version.

Regards.




More information about the ffmpeg-cvslog mailing list