From patchwork Thu Mar 16 14:05:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Hunstock X-Patchwork-Id: 2955 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.50.79 with SMTP id y76csp771625vsy; Thu, 16 Mar 2017 07:06:22 -0700 (PDT) X-Received: by 10.28.60.65 with SMTP id j62mr5608652wma.73.1489673182626; Thu, 16 Mar 2017 07:06:22 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y187si4700341wmd.87.2017.03.16.07.06.22; Thu, 16 Mar 2017 07:06:22 -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; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CC807688343; Thu, 16 Mar 2017 16:05:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail.annaberg6.de (mail.annaberg6.de [89.238.64.82]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A8FA9688323 for ; Thu, 16 Mar 2017 16:05:46 +0200 (EET) Received: (qmail 12269 invoked from network); 16 Mar 2017 14:06:02 -0000 Received: from build.erfurt.vpn.annaberg6.de (10.0.8.11) by mail.annaberg6.de with ESMTPS (AES128-SHA encrypted); 16 Mar 2017 14:06:02 -0000 From: Matthias Hunstock To: ffmpeg-devel@ffmpeg.org Date: Thu, 16 Mar 2017 15:05:59 +0100 Message-Id: <1489673161-18533-2-git-send-email-atze@fem.tu-ilmenau.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1489673161-18533-1-git-send-email-atze@fem.tu-ilmenau.de> References: <1489673161-18533-1-git-send-email-atze@fem.tu-ilmenau.de> Subject: [FFmpeg-devel] [PATCH 1/3] decklink: add fourCC of display mode to list_format output 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- libavdevice/decklink_common.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index 8b499c5..131d186 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -276,6 +276,7 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct struct decklink_ctx *ctx = (struct decklink_ctx *)cctx->ctx; IDeckLinkDisplayModeIterator *itermode; IDeckLinkDisplayMode *mode; + char fourcc[32]; int i=0; HRESULT res; @@ -297,13 +298,15 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct return AVERROR(EIO); } - av_log(avctx, AV_LOG_INFO, "Supported formats for '%s':\n", + av_log(avctx, AV_LOG_INFO, "Supported formats for '%s':\n\tmode\tfourCC\tdescription", avctx->filename); while (itermode->Next(&mode) == S_OK) { BMDTimeValue tb_num, tb_den; mode->GetFrameRate(&tb_num, &tb_den); - av_log(avctx, AV_LOG_INFO, "\t%d\t%ldx%ld at %d/%d fps", - ++i,mode->GetWidth(), mode->GetHeight(), + av_get_codec_tag_string(fourcc, sizeof(fourcc), mode->GetDisplayMode()); + av_log(avctx, AV_LOG_INFO, "\n\t%d\t%c%c%c%c\t%ldx%ld at %d/%d fps", + ++i, fourcc[3], fourcc[2], fourcc[1], fourcc[0], + mode->GetWidth(), mode->GetHeight(), (int) tb_den, (int) tb_num); switch (mode->GetFieldDominance()) { case bmdLowerFieldFirst: @@ -311,9 +314,9 @@ int ff_decklink_list_formats(AVFormatContext *avctx, decklink_direction_t direct case bmdUpperFieldFirst: av_log(avctx, AV_LOG_INFO, " (interlaced, upper field first)"); break; } - av_log(avctx, AV_LOG_INFO, "\n"); mode->Release(); } + av_log(avctx, AV_LOG_INFO, "\n"); itermode->Release();