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 D5DD642FD0 for ; Thu, 13 Jan 2022 02:53:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0BF2368BAB6; Thu, 13 Jan 2022 04:09:44 +0200 (EET) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 787F368BA83 for ; Thu, 13 Jan 2022 04:09:40 +0200 (EET) Received: by mail-qv1-f47.google.com with SMTP id kl12so5120064qvb.5 for ; Wed, 12 Jan 2022 18:09:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=sbi5WL+o2jZlURapK1l8hcDArLplFL+1p2N3zJO8b1s=; b=eLtRxllFS30cNdgKD9ZztkI0hlgdqhOsy2LV8ZJ9Agpdq4XKBL/Sws1P92GfGljtix 4/pEzz7J30BzJgRfyGBkfFsB2FUQKGi2wabwVy93o1evBtwnrcaB6yDqyA+afUWWRehy pm6YSvGSSHFvQJ8r2C1y9OnQwRn26VsXWE9q2HyOcOLnMK/WNssVvgDep9hxRlxAGcr6 RNrqJe+EfPgNRRuFOsI/XTTo02t7rwuUYd2RbUuRITrChBs6wxoybba01fuK5+cdsjN9 oUvbkc7i4Je5WCPczn6TVBNUNTR+ilwecnf5ggPk5Ylf6tK6PKyICICh9bue2d3n8j1I HB3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sbi5WL+o2jZlURapK1l8hcDArLplFL+1p2N3zJO8b1s=; b=pKU2AIoD4E0sT3ykxZn6mhh/FTI1qTSOV7S2l30FJYBFIoDwFwp/1Q18PVYGAWp873 jQHnjSP2Mlnqk5DiZ0OJhi6WYqWRU1EwGelQTO08qxtLapwGwW8LhTIC1P8xH2a+PN3s /wKJh0PEuOclBXMlc5RKO7cRIyYZiZxafwxEmPvrnnCiFzv+/0/nrXix0QFXLHtbK/fV MXZL4a+oMuU0+V1rN9CMyDI4N67Gl3qDbl8kbm7ZlhaoU2C/72f1opkt0Yg1668DW/nx 93bhlxjKtkqPrrJLuxqt1dfAm1pOt+KV9AX3BsRgqXIp0NzKa9qal5MWKFfpN1oYXc2q f7jA== X-Gm-Message-State: AOAM5336w25U4lUxDBRd0/OPGeOn/mnk/z29wKdy4PCia5KSPLMF01vJ Uq+z4tdRNKZ3bebYXwNliUcp2VoZbms= X-Google-Smtp-Source: ABdhPJxOz6ijKnzQoI/m0LfZ6v5MdOL/X8Nr9aNVX/XaJQBp9wYHI823kr9gTtYj728lZAp8WZ4lQg== X-Received: by 2002:a05:6214:e65:: with SMTP id jz5mr2085548qvb.67.1642039779071; Wed, 12 Jan 2022 18:09:39 -0800 (PST) Received: from localhost.localdomain ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id u6sm1068031qko.83.2022.01.12.18.09.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 18:09:38 -0800 (PST) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 12 Jan 2022 23:09:10 -0300 Message-Id: <20220113020913.870-9-jamrial@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220113015101.4-1-jamrial@gmail.com> References: <20220113015101.4-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 278/281] ffprobe: convert to new channel layout-API 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 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: Signed-off-by: James Almer --- fftools/ffprobe.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 20582ca7ac..aff9b880cc 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2462,12 +2462,10 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream, if (s) print_str ("sample_fmt", s); else print_str_opt("sample_fmt", "unknown"); print_int("nb_samples", frame->nb_samples); - print_int("channels", frame->channels); - if (frame->channel_layout) { - av_bprint_clear(&pbuf); - av_bprint_channel_layout(&pbuf, frame->channels, - frame->channel_layout); - print_str ("channel_layout", pbuf.str); + print_int("channels", frame->ch_layout.nb_channels); + if (frame->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) { + av_channel_layout_describe(&frame->ch_layout, val_str, sizeof(val_str)); + print_str ("channel_layout", val_str); } else print_str_opt("channel_layout", "unknown"); break; @@ -2873,12 +2871,11 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id if (s) print_str ("sample_fmt", s); else print_str_opt("sample_fmt", "unknown"); print_val("sample_rate", par->sample_rate, unit_hertz_str); - print_int("channels", par->channels); + print_int("channels", par->ch_layout.nb_channels); - if (par->channel_layout) { - av_bprint_clear(&pbuf); - av_bprint_channel_layout(&pbuf, par->channels, par->channel_layout); - print_str ("channel_layout", pbuf.str); + if (par->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) { + av_channel_layout_describe(&par->ch_layout, val_str, sizeof(val_str)); + print_str ("channel_layout", val_str); } else { print_str_opt("channel_layout", "unknown"); } -- 2.34.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".