summaryrefslogtreecommitdiffstats
path: root/libavcodec/v4l2_m2m.c
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2019-08-22 11:33:24 -0700
committerAman Gupta <aman@tmm1.net>2019-09-10 18:52:37 -0700
commitac52e06e56fd0232f13c0da74177181e04172e00 (patch)
tree13f0c57cc2e16b8bf14b669913321da670c98ecc /libavcodec/v4l2_m2m.c
parentab4835f41885c0f2e2f75101d72b888557c0e284 (diff)
downloadffmpeg-streaming-ac52e06e56fd0232f13c0da74177181e04172e00.zip
ffmpeg-streaming-ac52e06e56fd0232f13c0da74177181e04172e00.tar.gz
avcodec/v4l2_m2m: disable info logging during device probe
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/v4l2_m2m.c')
-rw-r--r--libavcodec/v4l2_m2m.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index 48104d0..0cf5db2 100644
--- a/libavcodec/v4l2_m2m.c
+++ b/libavcodec/v4l2_m2m.c
@@ -60,7 +60,7 @@ static inline int v4l2_mplane_video(struct v4l2_capability *cap)
return 0;
}
-static int v4l2_prepare_contexts(V4L2m2mContext* s)
+static int v4l2_prepare_contexts(V4L2m2mContext* s, int probe)
{
struct v4l2_capability cap;
int ret;
@@ -76,9 +76,10 @@ static int v4l2_prepare_contexts(V4L2m2mContext* s)
if (ret < 0)
return ret;
- av_log(s->avctx, AV_LOG_INFO, "driver '%s' on card '%s' in %s mode\n", cap.driver, cap.card,
- v4l2_mplane_video(&cap) ? "mplane" :
- v4l2_splane_video(&cap) ? "splane" : "unknown");
+ av_log(s->avctx, probe ? AV_LOG_DEBUG : AV_LOG_INFO,
+ "driver '%s' on card '%s' in %s mode\n", cap.driver, cap.card,
+ v4l2_mplane_video(&cap) ? "mplane" :
+ v4l2_splane_video(&cap) ? "splane" : "unknown");
if (v4l2_mplane_video(&cap)) {
s->capture.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
@@ -103,7 +104,7 @@ static int v4l2_probe_driver(V4L2m2mContext* s)
if (s->fd < 0)
return AVERROR(errno);
- ret = v4l2_prepare_contexts(s);
+ ret = v4l2_prepare_contexts(s, 1);
if (ret < 0)
goto done;
@@ -140,7 +141,7 @@ static int v4l2_configure_contexts(V4L2m2mContext* s)
if (s->fd < 0)
return AVERROR(errno);
- ret = v4l2_prepare_contexts(s);
+ ret = v4l2_prepare_contexts(s, 0);
if (ret < 0)
goto error;
OpenPOWER on IntegriCloud