From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 19E7A40412 for ; Fri, 25 Mar 2022 14:12:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9F31968B192; Fri, 25 Mar 2022 16:11:54 +0200 (EET) 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 4FAD968B192 for ; Fri, 25 Mar 2022 16:11:48 +0200 (EET) Received: by mail-lj1-f179.google.com with SMTP id 17so10473748ljw.8 for ; Fri, 25 Mar 2022 07:11:48 -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=gvjbBjGhD+4DTkoqUBR4omF9/1lb4OFPtJ3RkssfsRQ=; b=Utgn2+Z6vKcQpfpdc8JlaI0vgkeWFJ7EXlcCPaTKNkwatQXE4jCKLUO9g++BzAEb80 I6PbTgnVXfb302Pqe71hjoKucKxMX97iSthsbyhtQcLgHshlscl9nA9dJhTY1MZrWBab sTl4yTCEiw1IrBwEczvzHFjc04l/hgLvm3ZXTD/CJdQCvaPB+qHgYQK98G02Ecowwlj7 Gi4tvjHSRoQoHHOJI/M1HGF+3UQ1XDt8QVlpxTZtt45NiSGX27M8IWzyCbeO+F2yMEbj j6kGx5d5VMnlewzHPyucPTu9QEqexu7oQbMUL+Se/AmzxF3KwuKyZF3RhBJHda1CVX2a zGaA== 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=gvjbBjGhD+4DTkoqUBR4omF9/1lb4OFPtJ3RkssfsRQ=; b=QWb9hrBeaplkGL4z3u7R0mJaWjzXMP+umdkyG7wrakE8RpQ6MyQsat2ZQ0wqn9b3/C MODNt3WTc4BNuWROFXhuPotXfE87U4hMTZRZf5Y8yKuzVkKvHeCflXHhV9jLCDfkbNhF 1+S3MYCAdCCjB0i+QCZECD0WTSQKwLEezAy2RRX25gT6649TMwPt6xLSKFQVBgcNU9Ko d47yUbIdLaTLLC0aM/WS0WECaOCdsF5niFUSNHLGmZ4kCV/qe4IJ3G2S+gK8OH7xWgTL DtDxqaj3r/FzgdhxvOpKbVgMnuYrG5CdwZCh4XmC4dJY+Vd0xuW23yTVSAkhcz5F6KoW 678w== X-Gm-Message-State: AOAM5324616DRo9phuhDVoFNcFvLcSmR/BDonY3NC1rCDpmC2KIFfCoK eSlBDhmIJsA0hCxJXiua5Q4mGLMhIJU= X-Google-Smtp-Source: ABdhPJzx/hzGW/uh8JWbTScHPp4McDBBS4CSaAVoya4wnOdFsR/JewZ5crVFWNYLjY/5mo6if2Ua/w== X-Received: by 2002:a05:651c:19a3:b0:249:b26c:80d1 with SMTP id bx35-20020a05651c19a300b00249b26c80d1mr5117588ljb.344.1648217506175; Fri, 25 Mar 2022 07:11:46 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id d25-20020a194f19000000b0044a2ad98dcasm718409lfb.167.2022.03.25.07.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 07:11:45 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Fri, 25 Mar 2022 15:10:25 +0100 Message-Id: <20220325141041.1748-7-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 06/22] avdevice/dshow: accept show config dialog control message 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: DirectShow source will pop up its configuration dialog when AV_APP_TO_DEV_CONFIG is received. Implementation for several other possible configuration dialogs is more involved and will be provided in the next commit. Signed-off-by: Diederick Niehorster --- libavdevice/dshow.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 652e093204..78194406b5 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -1508,6 +1508,7 @@ static int dshow_control_message(AVFormatContext *avctx, int type, void *data, s struct dshow_ctx *ctx = avctx->priv_data; int run_state = ctx->is_running; HRESULT hr; + int ret = 0; switch (type) { case AV_APP_TO_DEV_PAUSE: @@ -1519,6 +1520,32 @@ static int dshow_control_message(AVFormatContext *avctx, int type, void *data, s case AV_APP_TO_DEV_TOGGLE_PAUSE: run_state = !run_state; break; + case AV_APP_TO_DEV_CONFIG: { + /* For documentation of dialog variable, see ffmpeg-devices.html in docs */ + int dialog; + enum dshowDeviceType devtype; + + if (!data) + av_log(avctx, AV_LOG_ERROR, "Use the data argument to indicate which dialog should be shown."); + dialog = *(int *) data; + devtype = (dialog & 1) ? AudioDevice : VideoDevice; + + if (dialog & 1<<1) { + // device_dialog + if (ctx->device_filter[devtype]) + ff_dshow_show_filter_properties(ctx->device_filter[devtype], avctx); + } else if (dialog & 1<<2) { + // crossbar_connection_dialog + // TODO + } else if (dialog & 1<<3) { + // tv_tuner_dialog + // TODO + } + break; + } + + default: + ret = AVERROR(ENOSYS); } // if play state change requested, apply @@ -1539,7 +1566,7 @@ static int dshow_control_message(AVFormatContext *avctx, int type, void *data, s ctx->is_running = run_state; } - return 0; + return ret; } static enum AVCodecID waveform_codec_id(enum AVSampleFormat sample_fmt) -- 2.28.0.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".