From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 99F8647475 for ; Fri, 8 Sep 2023 02:56:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 531C468C884; Fri, 8 Sep 2023 05:56:01 +0300 (EEST) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 12D2D68C83C for ; Fri, 8 Sep 2023 05:55:53 +0300 (EEST) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-31c73c21113so1438068f8f.1 for ; Thu, 07 Sep 2023 19:55:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694141753; x=1694746553; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=BjssOh5KTiXgFW36PBFkrfa+mIt4IBIz/MpQGk1/GFk=; b=Y1wbDemINfWQ8PUxZcu40t7A/Xm8oBvSaZmfJEtNB/LkXAyVq/blAn2v3yUxViqOGe GGjLfrXn+C6i8Lay9JT/H3lcNf5THmolqyG6H5wLZGk6/DbaW0DdA9Id6TUnUbQd/GQn Wm5cBnm6WTDfuG0x9Qaug79o3Xstxq2ULt03jryfMir5O1YGsj7AbyApfO3XupMi/hGa X+K0gGAVJAYxmGFGzIX6yvfQwbgNDKLOAqS78K7MxHUraLFXpj6SulF+aVNL03Qne1yV l1z4aj4Odq1lByseBuepozsZvsD0l1RkGJUS++8IozU9x9NCx1VG/kYJoqFAmkemr6hH UX9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694141753; x=1694746553; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BjssOh5KTiXgFW36PBFkrfa+mIt4IBIz/MpQGk1/GFk=; b=VyuSXZvc/jdq9SVaND9JL89kEsPnB2vg23Ub5FOEGDiy72dZhEUukSbgaDiT9Y3jtJ gO8R7u7/KFXUVaGGvNHhKKPjdJrEHBmGYH5acSBN8VsQL2KyNZXcdNhV89thRYe6CmNN 4SvlezcgRMNceZIcePxWqBgWgW5CKWTVd6wIx5bueGLBz3wqx1r8PWVf5XTrQHoo8Pb/ IKmoRgksnYuQc7ib8DJKSYv6ZFW+g+uUh79J5zZkrTeREbq6a8z4QFVCMcpq9N1oUDZ0 wEc5OG6DvWOeamX+PaGryAVEuEM1eL2A2ro2wKVI2d2vuWcaGYQbb8e4m3GSj3OyjaZr 0+FA== X-Gm-Message-State: AOJu0Yx6uDzMZm1W7VB0hOJ7G1Wfx33R+AgMxeSCfsROPIA6M85GjCQJ Tk88jVzKhcPNrn3araKt53bKKFiH0eaEIw== X-Google-Smtp-Source: AGHT+IGZBUeZ60I6VzOI1H2DjSIJZ3SDWlMdsOr0gYubrqTUaZ0EyXDhzd6LhlbE0OATVAJAT6ia+A== X-Received: by 2002:adf:f552:0:b0:31d:d48f:12a3 with SMTP id j18-20020adff552000000b0031dd48f12a3mr764934wrp.43.1694141752428; Thu, 07 Sep 2023 19:55:52 -0700 (PDT) Received: from localhost.localdomain ([49.51.162.193]) by smtp.gmail.com with ESMTPSA id e11-20020adffc4b000000b0031f65cdd271sm803831wrs.100.2023.09.07.19.55.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 19:55:52 -0700 (PDT) From: Jun Zhao To: ffmpeg-devel@ffmpeg.org Date: Fri, 8 Sep 2023 10:55:45 +0800 Message-Id: <20230908025546.3205524-1-mypopydev@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 1/2] lavc/videotoolboxenc: Dump the encoder X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Jun Zhao , Jun Zhao Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Dump the encoder, it's will help debug some case Signed-off-by: Jun Zhao --- libavcodec/videotoolboxenc.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index d0a00347b5..2e96990741 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -1110,6 +1110,34 @@ static int vtenc_create_encoder(AVCodecContext *avctx, return AVERROR_EXTERNAL; } + // Dump the init encoder + { + CFStringRef encoderID = NULL; + status = VTSessionCopyProperty(vtctx->session, + kVTCompressionPropertyKey_EncoderID, + kCFAllocatorDefault, + &encoderID); + if (status == noErr) { + CFIndex length = CFStringGetLength(encoderID); + CFIndex max_size = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); + char *name = av_malloc(max_size); + if (!name) { + CFRelease(encoderID); + return AVERROR(ENOMEM); + } + + CFStringGetCString(encoderID, + name, + max_size, + kCFStringEncodingUTF8); + av_log(avctx, AV_LOG_DEBUG, "Init the encoder: %s\n", name); + + av_freep(&name); + } + if (encoderID != NULL) + CFRelease(encoderID); + } + if (avctx->flags & AV_CODEC_FLAG_QSCALE && !vtenc_qscale_enabled()) { av_log(avctx, AV_LOG_ERROR, "Error: -q:v qscale not available for encoder. Use -b:v bitrate instead.\n"); return AVERROR_EXTERNAL; -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".