From patchwork Tue Jul 6 09:19:59 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: 28796 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp4920696ios; Tue, 6 Jul 2021 02:23:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/rwStMREuLl1iUlzfHyOKastfJxm09+WZ7uA/VBQIcitrpNqpAc0eijKM34CSPbuTFbN2 X-Received: by 2002:a05:6402:2681:: with SMTP id w1mr21607495edd.275.1625563413096; Tue, 06 Jul 2021 02:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625563413; cv=none; d=google.com; s=arc-20160816; b=zzUGnaEKio51ZnsUex8UTHriMeXinWb9cIc1CR68abG6bSmX5BVAFo6bICfd38fdDx Ru/b5KHxcLXPONql+C+TJ94CaE1BJ1juhkfzEyo/JnpfGb+00+4nAVvjgRbeBv5YqYCa VCz5pnrtXYbBtlbh0NOkZ2IOcrAPtecPQZYR7x1y5HhkN2jyoSYtMHjIqUQPe8hRIhu/ yu4xaMW/FP9xWxaQ1RL7XZEfGqoXN+h8tSPiIjusYo0bIhlaPukvEhF6jaMsezK1zh9k ij3w8ofmIkHviOmWbVHEI7/Z3nH+Kawez6G9adA/EMwvA4jmNm+gk0iB9z9h6Ro/9SdG Q1ZA== 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=rz05yDC3r2/q9C7nEwPKjJhh1GMA1SRnSR6G2PeLlKKVO6kP3iOtES4kKF6oQ13H/5 vZGJZy0dIh2kupzOcgLgEMwM2xviK5jzsif2wv1wuDfH8domObAMBW6yJBD5cn6rMM+o 9ms2EXEyi8s2MffxLtgF5hOfEPVM9iXSlws3uCSYXDaHLbWq2eBp2zYlsildu/NGqZcs DT5oMRF+vL1mgp6/qHL+aNr26QbukqKc0L22Mzn1KWlUzH9J/lXkNHXKTt3OsYdhrSIj j7bTQOQ++BGfg3Pvri3atz99S0lyiJZqZ3QJNneYBU6AYjpTBBmQfaFC1XMxH0MPq2ef d/xQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=F5GJyhZT; 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 q19si14877332edv.125.2021.07.06.02.23.32; Tue, 06 Jul 2021 02:23:33 -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=F5GJyhZT; 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 7E74368A758; Tue, 6 Jul 2021 12:23:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BDE7D68A744 for ; Tue, 6 Jul 2021 12:23:24 +0300 (EEST) Received: by mail-lf1-f48.google.com with SMTP id n14so37175192lfu.8 for ; Tue, 06 Jul 2021 02:23:24 -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=F5GJyhZTXB0jt5Q8Bnj8isGjBbl+ZFgHVCxMdbUEaEIQseH6jCTuVmkV/2uMaOR+jX VJBuRsL5Z4l5LO77QwjShjf1urncWLlDFYJ6Svucx5JgliXeCT+zbZmbquEAFaKbzb6R ad2Gz2G/SVvpbXttApEJAWBsdh7M/Ykht399ejTby1rb9lY9M5BX56imTnQ3A6LuF9Xd 8EBNmN7ZE8oVlRBV9hFD7xVUGe209hJ8RwXmq5b8Nshh4lZgi/WjjI3rixaVFzA2DP2Y qV8W/ZfDCwofVnqrbZEEC4WiZFXg9HkNNVTncfui5YuzRplWux/RFwaJJDwj5uxtrbTs 1jqQ== 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=g+8MCBBHH8bJWODQ23fG2SFnwW4hgaEaH3qqjawVFugszVYPqAwL06foPSDkk30Vs3 hOazE/T/Uww39LqYqY09Xrti6DEYX+YN194EKDavhP45jnagxR+XwdN0cTsdevprAsO4 0V3t5oCBaZiTxSbAO7mMNGwELISH5bA440lCsSQRpeFWChFfpNBLbB4H3IXkVE95/uwm QsbTLSxwzM3iOl8ZWy0S1x3ULj0PoW307WofJ5dHJpWiWIJ3Gm5lSefc/Zj1Dv2ruNfH BppaeBx94uaYCxX8gOAOiB8gL7x5Oo3tvTnQR6+zb7RbxP7NaoMrQu8st3MPx4MhhaRu /myA== X-Gm-Message-State: AOAM533xZggo22nye+VjjI+g3QZExTeI6Is0kpdR2h29nRIbDan51dAv Qi87JqtJTUXgvNyc6ZeKDLwyJsM/rVs= X-Received: by 2002:ac2:4205:: with SMTP id y5mr14371986lfh.538.1625563403907; Tue, 06 Jul 2021 02:23:23 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id y22sm1339886lfh.154.2021.07.06.02.23.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 02:23:23 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Tue, 6 Jul 2021 11:19:59 +0200 Message-Id: <20210706092020.1057-14-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210706092020.1057-1-dcnieho@gmail.com> References: <20210706092020.1057-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 13/34] 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: gQ0SYXvTGA8A 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, \