From patchwork Fri Jun 11 20:30:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Diederick C. Niehorster" X-Patchwork-Id: 28212 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp764451iol; Fri, 11 Jun 2021 13:35:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxme3mgZABfUEspxMi+wIBFadRlGgU9/ICg34PMRbqXaGvpWqVo2elJj3FXa5koEfnDv9Zw X-Received: by 2002:a17:906:3da9:: with SMTP id y9mr5245931ejh.303.1623443743709; Fri, 11 Jun 2021 13:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623443743; cv=none; d=google.com; s=arc-20160816; b=DGpbdNq81M4l6T36/V3rYEqc+c+90gGkyR4m/5oNbb7OoXDb31vR1v8QnbUhjxuSi5 Z7OAMmIIbssAAOtbosM3Lf00KjVVXBSOVpsJKCQfLGKpoFfa8RFVqOZ4i+ci1Ad6mxOO rAHCgqix/6II3nK0fvwtIvhI5Z3SXgiMTxXvByi/ZYT0BDIXe6F/+JUv3fM47YIq9Wyz IXlBdoubNIcYhOGVRTs9r6sAU3vB0XpnC2n9Luj0nOJroOeTD0ODz3dUUXhhwDBtyORe u3k8SiEYjNy1pufR5EZD6F2t/idkx1VMov6sxo3UCCslusq2wyOI/rraQNQ4gRD3nZAR e9EA== 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=vXzvftL8tNKA6YByCkmhtezNTtx19DUCryBIybLHYH0=; b=VAOKUi3Yuoy//YPp3hBwDSv8dyM1WiZhrztOBX97nbmcsKiRhAaMgGe9Ifrxdlq+cD em2iUzwfsANE4h1coYSi3ExHVuXDHaGbRW/0qDR1V/+gqIDGneEIj9z8YsF5Pnl+HchZ GE81psHQMIm4doFBGUO5eitjKBRw9i/9+ut4Ux2sbgOi/B3zoXBhozYvMT5EPKA5/M26 8rHmNyxVWw719NMl9GcFNindjbxuoOd+Jy4+jnD2QBKK9bXqjOOMVl/r8273ZX/Ab7lb lCHAhftghhdz9y1/gTza9pXgPIyl/AZ185Xx5FT8ZjkFynnPG0NJdiEqa9x8zXKmQhtd b7DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=W0F2eVM7; 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 f6si6050414ejl.241.2021.06.11.13.35.24; Fri, 11 Jun 2021 13:35:43 -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=20161025 header.b=W0F2eVM7; 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 73CD0689767; Fri, 11 Jun 2021 23:35:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 609BA680267 for ; Fri, 11 Jun 2021 23:35:19 +0300 (EEST) Received: by mail-lj1-f173.google.com with SMTP id r16so11284452ljk.9 for ; Fri, 11 Jun 2021 13:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gdbFtrmMHyQgF9UhHtf/VoQVophBV2w7zjcP62i5XT4=; b=W0F2eVM7OzFmr9K0YOyRkYyAxUIID8TB1L90CuBLyoEjQZxBkLaee40XPp9V+eFQkz SXKVtHYB6PPTDXQ82/UXbyPAG9HTlGFnTTDog+naRqjusRL1noRVyMcV20mIMtAwAP+W sSlmt+m+PmbPE/8wZQZusBV5IWeSwc7D24uoseg+vcTW8KyfvBHQNhk0qnUn3zQkEf4q esbOlaSqk0NQ8oXM6K6r4vVqSVzgR/In3sBh/iQTdGlxmVRJNRorPLcNVtM03y+iB/YR Kv3AUftPBtv2/hDFtLxHzdoXqBy43yMJXichuH5k6j2Exn0FaTfrxjPEusDVPeFoJ8/S SkwQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=gdbFtrmMHyQgF9UhHtf/VoQVophBV2w7zjcP62i5XT4=; b=JpfnQ1nCSIzLw0YVX3E19JBhVSDMkJ4+K7V9Fxmhl++OpyoCdHCqMI3mhOI+Qho7+O j0fsbDvvLB+PlVZcIhLTtgzkNKfq/VQSq7sJJNuTh+pwdKrA7sVDUbnH14uLIj3wRZs1 T02L4F3rfuu6MRRVusf4I7D38G1JBZ8T4IQmFxNp1siKNN3/KV1qGiUsBTqmel/UboHF q4Gzse4qcDjlMfHo5a29wSzfsl/lDUfF+ySKipVaWpZIAGKrwH81ftckJeJbtyCGf3X3 nR30FBcA6eA6LmUWGRWFivHRS37TUNpIhTJftMoK/iYYXhU8W2mSOU/jSRgW+nlJFDmN Q7sg== X-Gm-Message-State: AOAM533iCaALS+OaJgJ2Wvt+mo9RxiufBJyZyqebQQ/Vny4Pqu9te5Q+ S+G2dJyUTZgLFNaGVqUdy+T9GX5ZCDahOw== X-Received: by 2002:a05:651c:2c7:: with SMTP id f7mr4331556ljo.287.1623443718268; Fri, 11 Jun 2021 13:35:18 -0700 (PDT) Received: from localhost.localdomain ([196.196.203.214]) by smtp.gmail.com with ESMTPSA id b18sm686101lfb.277.2021.06.11.13.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Jun 2021 13:35:17 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Fri, 11 Jun 2021 22:30:44 +0200 Message-Id: <20210611203104.1692-14-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210611203104.1692-1-dcnieho@gmail.com> References: <20210611203104.1692-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 13/33] avdevice: adding 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: DOwr0GZxQo0C 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 | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index 685b1357a6..970441ee06 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -668,6 +668,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 6f24976dcc..bbeb1ae21b 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -190,6 +190,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 6e593ba00e..0381d6cd0d 100644 --- a/libavdevice/version.h +++ b/libavdevice/version.h @@ -28,7 +28,7 @@ #include "libavutil/version.h" #define LIBAVDEVICE_VERSION_MAJOR 59 -#define LIBAVDEVICE_VERSION_MINOR 1 +#define LIBAVDEVICE_VERSION_MINOR 2 #define LIBAVDEVICE_VERSION_MICRO 100 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \