[FFmpeg-cvslog] r22875 - trunk/libavformat/librtmp.c
Stefano Sabatini
stefano.sabatini-lala
Wed Apr 14 01:19:14 CEST 2010
On date Wednesday 2010-04-14 00:11:21 +0200, diego wrote:
> Author: diego
> Date: Wed Apr 14 00:11:21 2010
> New Revision: 22875
>
> Log:
> Plug librtmp logging into av_log.
> patch by Howard Chu, hyc highlandsun com
>
> Modified:
> trunk/libavformat/librtmp.c
>
> Modified: trunk/libavformat/librtmp.c
> ==============================================================================
> --- trunk/libavformat/librtmp.c Wed Apr 14 00:08:36 2010 (r22874)
> +++ trunk/libavformat/librtmp.c Wed Apr 14 00:11:21 2010 (r22875)
> @@ -29,6 +29,22 @@
> #include <librtmp/rtmp.h>
> #include <librtmp/log.h>
>
> +static void rtmp_log(int level, const char *fmt, va_list args)
> +{
> + switch (level) {
> + default:
> + case RTMP_LOGCRIT: level = AV_LOG_FATAL; break;
> + case RTMP_LOGERROR: level = AV_LOG_ERROR; break;
> + case RTMP_LOGWARNING: level = AV_LOG_WARNING; break;
> + case RTMP_LOGINFO: level = AV_LOG_INFO; break;
> + case RTMP_LOGDEBUG: level = AV_LOG_VERBOSE; break;
> + case RTMP_LOGDEBUG2: level = AV_LOG_DEBUG; break;
> + }
> +
> + av_vlog(NULL, level, fmt, args);
> + av_log(NULL, level, "\n");
> +}
> +
> static int rtmp_close(URLContext *s)
> {
> RTMP *r = s->priv_data;
> @@ -69,6 +85,7 @@ static int rtmp_open(URLContext *s, cons
> case AV_LOG_DEBUG: rc = RTMP_LOGDEBUG2; break;
> }
> RTMP_LogSetLevel(rc);
> + RTMP_LogSetCallback(rtmp_log);
This breaks compilation when using a not-updated librtmp version.
I suggest to add some check in configure on librtmp version, that
should save quite some noise on the user MLs.
Regards.
More information about the ffmpeg-cvslog
mailing list