From patchwork Wed Mar 30 12:17:49 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: 35059 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c05:b0:7a:e998:b410 with SMTP id bw5csp773884pzb; Wed, 30 Mar 2022 05:19:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtFIjCZ3Z5Nr2Xu9o8mzWRzpiVOpqGtKEDwLxG/8faPE4TQVZst/eLCszEby7i68F8l/TF X-Received: by 2002:a17:907:7f8c:b0:6e0:614f:f13e with SMTP id qk12-20020a1709077f8c00b006e0614ff13emr39629813ejc.488.1648642748544; Wed, 30 Mar 2022 05:19:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648642748; cv=none; d=google.com; s=arc-20160816; b=QAgNHRkH5D7PnEZ+ebTnH7jBTntP8UmNOm9WSEfHTuy9G3xR7I98Us68sI+vE3SKFa brKiDr6M37z8m/dmcDz7H/kFDqySRSFWHRRWJ2CgHkObOTyS+JNT/1NDYOnqVRa84Svd 5v8PULOFLLANkUV6IX/PoTzc8XDYuiF195oJ5GVmI/ruaFOlvOBE8dnyCB9ABf7Es7ms sYOaXMtskP+o8nbchNmKzyIhLRPwTPXchTgovsjdzhjSF9nZ0r7zxxt5MaR71knS1gig GJSt1K2MWztVMWijBdU7E/3+iRHMNcTGr/+YwBJhSTP6GcZQtSEf/MMSc/v77Gcwm6zQ sbTg== 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=EWPyOsXiMKAFlXGhr/BO/fZoukarMvlYpbcDalr2gtY=; b=YssF21LP9ot9DcHGfCNrKUIeMfN1Xovo5f4650NxyLwWDdiIm0dBLOo9PWIgeFOAs3 1rR/ZJuyl62ZdbyQjHAekkhZq2Cx82mvQ4Dzws45ocFziG55z3E3Qjm4pkWcP5izgsbv yTV5cMjKe08R5a7iOv6przRCcX+UIxfwTXhVRTR3nsGzcU+Yy70mdLBlBWJ5LkMw+Rn7 W7d2b7M73WKVWtYgXeULhf4yU9zPJjQUP4SnRJiU1jh2wv642GzZl63iq079a3IJkKhL qufeCcfM3ZIime0b/gR/TA9JJh6N2tIKDinLOHWw2ztcbtdGHvbYqHfOrgb9eWFGIcIc 2RQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=VwayYTbj; 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 j2-20020a170906474200b006df76385d45si20158546ejs.485.2022.03.30.05.19.08; Wed, 30 Mar 2022 05:19:08 -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=VwayYTbj; 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 2615068B210; Wed, 30 Mar 2022 15:18:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55D8A68B1D4 for ; Wed, 30 Mar 2022 15:18:47 +0300 (EEST) Received: by mail-lj1-f179.google.com with SMTP id s13so10356820ljd.5 for ; Wed, 30 Mar 2022 05:18:47 -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=QMaDrP2eKDaJUfNBiigoWDNyVq8EvrUM+I4kIu04BHg=; b=VwayYTbjqlXSXgGS0iJaPsOvu4fsvD7GROsn+1IzzgHMrwcDzM6VuQkOUVOLx3kuPp WmsIMBly5Wu8TturqpnHZKswcaLyyWLQHAUdYx30xZWEHroEyHVlW2Qoqe3KpTgb2WhB zumHf1ihiPcsN2uq1zNO5bslPDhNuaHvWzQEdsgpTxNYL/cDKvV9MnZHalOBnsJL0DUZ bs2pwSlVuKM4kQFTwy0wxJL7m19rBEXYW87rte1tT8GXuGdexFrISHcs7hh5sRPXX74k q8b1PhjX6vDbJZnTcaCgxIpiEUFw+ebzwBB0OOjmtb3RvbUtTyxD38ntEqKzM6Z0Ls8p lqUA== 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=QMaDrP2eKDaJUfNBiigoWDNyVq8EvrUM+I4kIu04BHg=; b=Su3IDSnuZQOjOO/3uUop7rWX2EP2AvYlzq028jgVJu66pZI8Rof7KewZJt+KhpNx8O gjocS2dGvEoa1CsV+TJ7G1EW5wmubgDrc59ppgtsKFiTRrhkJU0Mfh/zOBL9dj4X8hyX MS9+SmxzY2FJIYGXB6F5GTB0VSEBhvaeLne3UJU88WeLHtgLDkoTkmeZbSsHWxDzOMoi NVVqViu3PC7kUQbbJ6ykMrcYSghQimO+XtGaesOBb0Kgzd/UnUeSlj6pF2x3AHAE3S+t 2IgZ2/JuUSbPPUf+ywlqX/idUCH52mbCIsxto5SHoW2jsy/VzVIJ9JehaOLTIKA6GPEe wPMQ== X-Gm-Message-State: AOAM533AOYVP2LeJrOv8SydphhWc0IxYO/kwZNd1p2T4SK1oLGQ8PCVD qQFUC5sM477+cM223QuKwAeOGPtQrvw= X-Received: by 2002:a2e:96d9:0:b0:249:8257:74ca with SMTP id d25-20020a2e96d9000000b00249825774camr6704206ljj.105.1648642726420; Wed, 30 Mar 2022 05:18:46 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id t10-20020a19910a000000b0044a8de015acsm1165095lfd.1.2022.03.30.05.18.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 05:18:46 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Wed, 30 Mar 2022 14:17:49 +0200 Message-Id: <20220330121806.822-5-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220330121806.822-1-dcnieho@gmail.com> References: <20220330121806.822-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 04/21] 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: IBb+vv/wqNrf 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 fb1dccb6b3..f27f9ad9bf 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, \