[FFmpeg-devel] [PATCH 3/4] lavd/avfoundation: Refine some log messages.

Thilo Borgmann thilo.borgmann at mail.de
Sun Jun 30 15:14:50 EEST 2019


$SUBJECT

-Thilo
-------------- next part --------------
From 312df3342b98fd805c3bda584de88b261a59329e Mon Sep 17 00:00:00 2001
From: Thilo Borgmann <thilo.borgmann at mail.de>
Date: Sun, 30 Jun 2019 14:00:42 +0200
Subject: [PATCH 3/4] lavd/avfoundation: Refine some log messages.

---
 libavdevice/avfoundation.m | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavdevice/avfoundation.m b/libavdevice/avfoundation.m
index 0ce0a37..5dd6ea5 100644
--- a/libavdevice/avfoundation.m
+++ b/libavdevice/avfoundation.m
@@ -316,13 +316,13 @@ static int configure_video_device(AVFormatContext *s, AVCaptureDevice *video_dev
     }
 
     if (!selected_format) {
-        av_log(s, AV_LOG_ERROR, "Selected video size (%dx%d) is not supported by the device\n",
+        av_log(s, AV_LOG_ERROR, "Selected video size (%dx%d) is not supported by the device.\n",
             ctx->width, ctx->height);
         goto unsupported_format;
     }
 
     if (!selected_range) {
-        av_log(s, AV_LOG_ERROR, "Selected framerate (%f) is not supported by the device\n",
+        av_log(s, AV_LOG_ERROR, "Selected framerate (%f) is not supported by the device.\n",
             framerate);
         goto unsupported_format;
     }
@@ -334,7 +334,7 @@ static int configure_video_device(AVFormatContext *s, AVCaptureDevice *video_dev
         [video_device setValue:min_frame_duration forKey:@"activeVideoMinFrameDuration"];
         [video_device setValue:min_frame_duration forKey:@"activeVideoMaxFrameDuration"];
     } else {
-        av_log(s, AV_LOG_ERROR, "Could not lock device for configuration");
+        av_log(s, AV_LOG_ERROR, "Could not lock device for configuration.\n");
         return AVERROR(EINVAL);
     }
 
@@ -908,7 +908,7 @@ static int copy_cvpixelbuffer(AVFormatContext *s,
 
     status = CVPixelBufferLockBaseAddress(image_buffer, 0);
     if (status != kCVReturnSuccess) {
-        av_log(s, AV_LOG_ERROR, "Could not lock base address: %d\n", status);
+        av_log(s, AV_LOG_ERROR, "Could not lock base address: %d (%dx%d)\n", status, width, height);
         return AVERROR_EXTERNAL;
     }
 
-- 
1.8.3.2



More information about the ffmpeg-devel mailing list