From patchwork Wed May 24 13:47:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wm4 X-Patchwork-Id: 3726 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp319144vsk; Wed, 24 May 2017 06:47:55 -0700 (PDT) X-Received: by 10.28.152.133 with SMTP id a127mr6349827wme.115.1495633675693; Wed, 24 May 2017 06:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495633675; cv=none; d=google.com; s=arc-20160816; b=NONWDQ3/n7nI/rvu+Hev9BSR2t63WnZK2BTyzlBNA4LsbV0y6GG8wxEcm+T1n/wT9m 9uZT+PvRn3+5DPwfZ9PY0+9XBW4ftk2Rdvz0cImPPJyl9lIGiNiwjWvcozydN379Fodn mflkwIeTQcNj86cVBnd6HSyWC7guS4ktKCj3cx1QeaiMQZDFnKlF98sZ+gLJYPqxB98T QLg2+9dLlO/mU22FIEfQbYjYO/WBvZhv05ibiuRl7Hb/SLOTikfkv1aLs5JCXQf4Rzv4 PyJh3tI/hrb19US0qnTjfTz5GmxI+Lth+3S/RgMYokGUBW7n1FVqOuZvqMZGkUFfNEM2 9acQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=K0iwtjVMRdK3M4mJjjE6klkmKnANZ5MIsv9Piy1MSqA=; b=kkmZ+N6XZPJ+z5p8gVGxkscxSlhroZd9vuobOaOhrndHKQe2u42QSIc4wHRPhcGmzk D7c+/rNiV+46XQ+X1gzqTbBpsdDGQLHIWmfE9xg0PhhA7MTUAfUmAalj8BZT6/kAyBOm 9aFi5U+g0p9rYpK13hbxPYWHSFPG+YmWzy354ZudfSqgVApG6Ly0DxvPPr5y8ghPG2lU E4HbyWPPZqH7ttEjoQXYGFYk2WIMmwpP9ZPMGfR/KJevuBis0Fs8BchfKTzf06mWj0Cl IhQMupjTe2pT3wz1FhV6qKFqtgBH8kTz/azLWcWJlZqXeQ/EuG+wzRdF/O7PMnCuBlP/ UPqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s14si19495311wrb.195.2017.05.24.06.47.54; Wed, 24 May 2017 06:47:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CEF24689B1C; Wed, 24 May 2017 16:47:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1768E689A14 for ; Wed, 24 May 2017 16:47:43 +0300 (EEST) Received: by mail-wm0-f43.google.com with SMTP id e127so75638338wmg.1 for ; Wed, 24 May 2017 06:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ltYBrCCl42V7A4j+X985IsHOhCt7531NsAaplJylXKE=; b=fSyyA+CUla4I13TnmKCPHvGDCCPAvqN2D8nzqpUHYODr4W+3mat2hK9yWdGdaaBhZq gMmC+M29bm9W8hpYY8X7CxA3aG0ZLNhM3Ru7hof/5CndA37sBAm9pWPlUseni8CBAMVy i3pe9xN2JPlf6goT96hsN8IWwwE0sgwnxpp7tFue/wVEEji+KEoX3jDm1/ay92+jR8tV xcruVDWspipDl9IuTYj4mwxrJQqxr6uwow/8soFq1J4vAUrVQ/YdQMuwzeb/Izp2jzbY Aj8/0gwd48XN2UF40VrcRyByS/MUZn1HOmVSZmWhoKxAaoIAVaklugI0nbDigxdpCpIo R+Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ltYBrCCl42V7A4j+X985IsHOhCt7531NsAaplJylXKE=; b=eiy+N4hPcSBkw/LjTCJ9+gwG4SYNcGduqPeNT8p2CwHhi0ROOKsmB2TwEFuvWILCQy T9720SPAE9q1qs8zMGCCfyOTlamSMVg0VyRQUbC4sHkq3IyEXvywGkv3gSp6OFw74fbH RGKq8om15Mf1kSzkYr1z/Dc4XRQKoRm0ncu3MiF3665jbzWJMZ+IUkPquRZZhtUToJdc w6Wi6uP+I1JtAMbnJf8Z77TZPjNDy5YV2mXX9gXPIIu1Y0+1YMLP/lEXYcEMMazHvsiv DsofmeP40i1b7I2AIdz196FYGOFOwygWwsBXrnzEY8YeE+m3W3wt925ljbU8G9zuDteH ZqzQ== X-Gm-Message-State: AODbwcBj8s6nw8jddger1Wa7qinFQiYramO6avf9Tc+sTgVKXKUOmP0Y svw2cJbe0iMbcbkj X-Received: by 10.28.7.16 with SMTP id 16mr6363811wmh.16.1495633664700; Wed, 24 May 2017 06:47:44 -0700 (PDT) Received: from localhost.localdomain (p4FF02935.dip0.t-ipconnect.de. [79.240.41.53]) by smtp.googlemail.com with ESMTPSA id v52sm5610854wrc.53.2017.05.24.06.47.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 May 2017 06:47:43 -0700 (PDT) From: wm4 To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 May 2017 15:47:36 +0200 Message-Id: <20170524134736.22631-1-nfxjfg@googlemail.com> X-Mailer: git-send-email 2.11.0 Subject: [FFmpeg-devel] [PATCH] videotoolbox: log errors X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: wm4 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" With the new decode API, you can't handle errors directly in the API user - you only know that the hwaccel did not initialize at all. Add some approximate logging. --- libavcodec/videotoolbox.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index d36a33efcd..85cd2215c9 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -648,15 +648,21 @@ static int videotoolbox_default_init(AVCodecContext *avctx) switch (status) { case kVTVideoDecoderNotAvailableNowErr: + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox session not available.\n"); + return AVERROR(ENOSYS); case kVTVideoDecoderUnsupportedDataFormatErr: + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox does not support this format.\n"); return AVERROR(ENOSYS); case kVTVideoDecoderMalfunctionErr: + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox malfunction.\n"); return AVERROR(EINVAL); case kVTVideoDecoderBadDataErr : + av_log(avctx, AV_LOG_VERBOSE, "VideoToolbox reported invalid data.\n"); return AVERROR_INVALIDDATA; case 0: return 0; default: + av_log(avctx, "Unknown VideoToolbox session creation error %u\n", (unsigned)status); return AVERROR_UNKNOWN; } }