diff options
author | JonY <10walls@gmail.com> | 2008-09-04 20:45:13 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-09-04 20:45:13 +0000 |
commit | f2eb8c5bf63f5efdcb5d57b2b0e85530ffc52843 (patch) | |
tree | 4540af722ec13ff0c48fa4deaa0b086a3ff4c245 /vhook/fish.c | |
parent | 991945d0e4a0a8191342de4c168e594281f5ac12 (diff) | |
download | ffmpeg-f2eb8c5bf63f5efdcb5d57b2b0e85530ffc52843.tar.gz |
Properly use av_log rather than fprintf/printf.
Fix the "implicit declaration of function 'please_use_av_log'" warnings.
Patch by JonY <10walls _AT_ gmail #dot# com>
Originally committed as revision 15200 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'vhook/fish.c')
-rw-r--r-- | vhook/fish.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vhook/fish.c b/vhook/fish.c index f0cd0085cc..0e79eacc3b 100644 --- a/vhook/fish.c +++ b/vhook/fish.c @@ -155,7 +155,7 @@ int Configure(void **ctxp, int argc, char *argv[]) case 't': ci->threshold = atof(optarg) * 1000; if (ci->threshold > 1000 || ci->threshold < 0) { - fprintf(stderr, "Invalid threshold value '%s' (range is 0-1)\n", optarg); + av_log(NULL, AV_LOG_ERROR, "Invalid threshold value '%s' (range is 0-1)\n", optarg); return -1; } break; @@ -169,20 +169,20 @@ int Configure(void **ctxp, int argc, char *argv[]) ci->dir = av_strdup(optarg); break; default: - fprintf(stderr, "Unrecognized argument '%s'\n", argv[optind]); + av_log(NULL, AV_LOG_ERROR, "Unrecognized argument '%s'\n", argv[optind]); return -1; } } - fprintf(stderr, "Fish detector configured:\n"); - fprintf(stderr, " HSV range: %d,%d,%d - %d,%d,%d\n", + av_log(NULL, AV_LOG_INFO, "Fish detector configured:\n"); + av_log(NULL, AV_LOG_INFO, " HSV range: %d,%d,%d - %d,%d,%d\n", ci->dark.h, ci->dark.s, ci->dark.v, ci->bright.h, ci->bright.s, ci->bright.v); - fprintf(stderr, " Threshold is %d%% pixels\n", ci->threshold / 10); + av_log(NULL, AV_LOG_INFO, " Threshold is %d%% pixels\n", ci->threshold / 10); return 0; @@ -234,7 +234,7 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, int rowsize = picture->linesize[0]; #if 0 - printf("pix_fmt = %d, width = %d, pts = %lld, ci->next_pts = %lld\n", + av_log(NULL, AV_LOG_DEBUG, "pix_fmt = %d, width = %d, pts = %lld, ci->next_pts = %lld\n", pix_fmt, width, pts, ci->next_pts); #endif @@ -281,7 +281,7 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, get_hsv(&hsv, r, g, b); if (ci->debug > 1) - fprintf(stderr, "(%d,%d,%d) -> (%d,%d,%d)\n", + av_log(NULL, AV_LOG_DEBUG, "(%d,%d,%d) -> (%d,%d,%d)\n", r,g,b,hsv.h,hsv.s,hsv.v); @@ -306,7 +306,7 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width, } if (ci->debug) - fprintf(stderr, "Fish: Inrange=%d of %d = %d threshold\n", inrange, pixcnt, 1000 * inrange / pixcnt); + av_log(NULL, AV_LOG_INFO, "Fish: Inrange=%d of %d = %d threshold\n", inrange, pixcnt, 1000 * inrange / pixcnt); if (inrange * 1000 / pixcnt >= ci->threshold) { /* Save to file */ |