From patchwork Fri Mar 25 14:10:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Diederick C. Niehorster" X-Patchwork-Id: 34967 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:ab0:5fda:0:0:0:0:0 with SMTP id g26csp1376576uaj; Fri, 25 Mar 2022 07:12:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/B5Xv+PTRUGr56WWixPH4qrXiaWtLnrDsXTNgrvUdpHmBktVpjEH+2nn0gzKGF60+8FZX X-Received: by 2002:a17:906:6a81:b0:6da:d7e5:4fa with SMTP id p1-20020a1709066a8100b006dad7e504famr11900867ejr.223.1648217527132; Fri, 25 Mar 2022 07:12:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648217527; cv=none; d=google.com; s=arc-20160816; b=h8me+fQhiE0SVCqJIgF20ZRwYqt9kG0bvtFBPIE48S4k2MAIAIhj8kShgFqE7j6irF P6wGaYPToQK1caTiIZQ0hgqKNCk4CXxlqfkASE0WVdezfOiFRBUpBdYQE6TBIbXC50rk ZY2VvNuustV21zOu3LjjXU/WcJ3vmMMuA0BtvTMwffGCBOoZF5jtra3DJ1S0sTrVQzc4 MOGxauHFHOoN16ZvVZP9G6u7UF2k+tXeo4DM8Gvo357Pzph3gjHNOXGmwLtnSCZDGGbO S7G4XCu1NWEE+FeajWE1INAueD0Tm+KN+LEoRWvuIG7ATrhKmyPDi6BpoX4Bnq/Q/VLF p7+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:delivered-to; bh=LkE3p9PuuJq4gzpRut73FtCqlFMY5PgYmz1y1Pn58l4=; b=aeJwWsKOosX00FYRhaIeQJDtaJ83x8ecBcWMm6GP/6zbNOnMvjrcGZEjnvkfn99jKe DESonfjaWQq6aM6giandBfZtP86RgepxWvdRbOIy+SkELHXNJ+QZ3l41qiz8zbV7xu6t JK/rBLAbDPm4zcAZWaSI6NjMBnee1LXGTk6LIsjOdQk0GVVApZXolVWeprb6SDT15tk3 4bBBY2QT24jePJp5RL165gAhhDWGrNBNcuMR9zN5Mg7yrNAe19nsso//So+ZR8iF8m/G jks37DgDRW7GD4RL6A5WsXl/U7a+yfsm5NSMahVl3rJvucd2531I0S9rzgLGzZA3MRt9 v/yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=ZcPgU33+; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id kz10-20020a17090777ca00b006df76385e5asi2647809ejc.762.2022.03.25.07.12.06; Fri, 25 Mar 2022 07:12:07 -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=@gmail.com header.s=20210112 header.b=ZcPgU33+; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E054368B24C; Fri, 25 Mar 2022 16:11:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DFDF368B239 for ; Fri, 25 Mar 2022 16:11:40 +0200 (EET) Received: by mail-lf1-f49.google.com with SMTP id m3so13569297lfj.11 for ; Fri, 25 Mar 2022 07:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lmRYz16L51G1okEkN7HBUHQAWXgpdxYTGfVOQdpJSVE=; b=ZcPgU33+j8LdxCmpE7EvYA0HNJulm62uqLEKosfIjMMPUY/0IKC3HU8/BGXaNEg0MW TcgVHblhOFCKNiBWxPEqEjt5z6BJIXrpJ5Qwt4SiDhiIT2R0x0HZQLDzmUlObW6H8r2c nNP0q4uev6wgDgNr1SBVNyIOikwmNaGm1u89wnyl8IvGFxRE+FHDnGo5+fsl56gIZXQL /RXAgHoTu6TPSATwn0LVvlo7idmS85/MW2Q5GoYzKj3dBi0DSDTs0mhfa88km47YIHT2 ORjdNdXRsPYyUozu0m56NhSIDdmIQzbFMljsyYx1S4WQj8yvRONf0qp7Do6uvFuTwjZ8 Xh1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lmRYz16L51G1okEkN7HBUHQAWXgpdxYTGfVOQdpJSVE=; b=tXTrMvlY77gohtIye+YbcQfbgYmVdkyrux249zyPawo4QRsSkrXGrkeUil9A0VdWXQ QZBpdDyRFKN/Y2UMatHe80J7PdVrwUiGZ1RFkz7fkQ6hOngw+W7FaagM8CeGilkMSK3g xonAUiMe2xkTRPYwrH6/hDR0XkRXn+GrdUfZaqawD+x/mnpLRIvX7MnXlrWxXmZ1sz2G 1Bt+mb1664BU5D+hEbx3B8jhy4wIlp4bRuCB7luHqHcS7dTismLidilHmCawPZF1JcDZ SSEqP3H5u71Zvuv5XC5l5Wga4eizjgZQ2/qDJiDHZTzb78KPPvU5O+L26fn4FoSPr8O/ bJjQ== X-Gm-Message-State: AOAM530UjbtVDzqTl7kAffoKymd0EKtjfWumj9RuTS+rmq4JV2aCNmPt 2yDUBbXHivSSV0q/fA0cfLkf8Kk2g4U= X-Received: by 2002:a05:6512:2214:b0:44a:348a:d6d with SMTP id h20-20020a056512221400b0044a348a0d6dmr7908707lfu.506.1648217499566; Fri, 25 Mar 2022 07:11:39 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id x1-20020a056512130100b004484c116de3sm717108lfu.246.2022.03.25.07.11.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 07:11:38 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Fri, 25 Mar 2022 15:10:24 +0100 Message-Id: <20220325141041.1748-6-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220325141041.1748-1-dcnieho@gmail.com> References: <20220325141041.1748-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 05/22] avdevice: add control message requesting to show config dialog 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: Diederick Niehorster Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 1EH19tl/X7lU This control message can be used to programmatically ask a device to show one of its configuration dialogs. Adding documentation of this message's int argument. Bumping avdevice version. Signed-off-by: Diederick Niehorster --- doc/indevs.texi | 34 ++++++++++++++++++++++++++++++++++ libavdevice/avdevice.h | 10 ++++++++++ libavdevice/version.h | 4 ++-- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index 9d8020311a..0302859552 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -682,6 +682,40 @@ $ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_numbe @end itemize +@subsection Libavdevice user notes + +The dshow device supports the @code{avdevice_app_to_dev_control_message} +interface. + +It understands the @code{AV_APP_TO_DEV_PAUSE}, @code{AV_APP_TO_DEV_PLAY} +and @code{AV_APP_TO_DEV_TOGGLE_PAUSE} commands, which respective stop and +start whether data is captured from the connected device, and toggle +capture state. + +It furthermore understands the @code{AV_APP_TO_DEV_CONFIG} message, which +requests the device to show a configuration dialog (if available). An +@code{int} should be passed along with this command to indicate which +configuration dialog should be shown. The bits in this @code{int} have +the following meaning: + +@itemize @bullet +@item +1st bit: If set, the dialog for the audio device will be shown. If not set +the dialog for the video device will be shown. + +@item +2nd bit: If set, show property dialog for the audio or video capture device, +allowing to change audio or video filter properties and configurations +manually. + +@item +3rd bit: If set, show property dialog where crossbar pin routings of the +audio/video device can be manually modified. + +@item +4th bit: If set, show property dialog where TV channels and frequencies can be manually modified (in case of video device), or TV audio (like mono vs. stereo, Language A, B or C) can be manually modified in case of audio device. +@end itemize + @section fbdev Linux framebuffer input device. diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index db16a2f27e..74e9518a8e 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -206,6 +206,16 @@ enum AVAppToDevMessageType { */ AV_APP_TO_DEV_GET_VOLUME = MKBETAG('G', 'V', 'O', 'L'), AV_APP_TO_DEV_GET_MUTE = MKBETAG('G', 'M', 'U', 'T'), + + /** + * Request to show configuration dialog. + * + * If device has a configuration dialog of type indicated by + * data, show it. + * + * data: int (device-specific). + */ + AV_APP_TO_DEV_CONFIG = MKBETAG('C', 'O', 'N', 'F'), }; /** diff --git a/libavdevice/version.h b/libavdevice/version.h index 69317c9280..96347a3893 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -30,8 +30,8 @@ #include "version_major.h" -#define LIBAVDEVICE_VERSION_MINOR 7 -#define LIBAVDEVICE_VERSION_MICRO 101 +#define LIBAVDEVICE_VERSION_MINOR 8 +#define LIBAVDEVICE_VERSION_MICRO 100 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ LIBAVDEVICE_VERSION_MINOR, \