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 D06984275A for ; Wed, 30 Mar 2022 12:19:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D7A7E68B21E; Wed, 30 Mar 2022 15:18:59 +0300 (EEST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D99368B1D4 for ; Wed, 30 Mar 2022 15:18:54 +0300 (EEST) Received: by mail-lf1-f51.google.com with SMTP id e16so35421182lfc.13 for ; Wed, 30 Mar 2022 05:18:54 -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=ClrRLseG6F1UlJV3rG/lXuh8l16hYzU6DPKEBdY+xckNvyEyRERZ44iB6imbByGHgH p//ARZIyowPyXH7c3LXIN5f5tC1gyPnZykNzmDC/I239kVvl74zaNrmJHvzvyfWRMXgv wA1A5Ip1fyyanAOcgk0LzmW2gFrinuGdt0pyR7E7T8aj/f92duNuQ6MQu2vpkOG2K/hj oDLWmb/S5l0Hsk64QQFwquxzRzjdYXKmFTXsCB3mDnPTgmCSIUQ/8cxz1XGzpAVuP99l 5fiMbb3nuW/TwfoCvrKvyYEtFlLHS1A8gcrFnm5leyXsloj3ijDA/rHCWMAgcCgM/fDb UuYw== 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=OI4f79SaYVlJ1Y6b6zoh4tepxBsjxtGN/7hFQbGwogGTX7RW5jMZk1zz9W66/Sd2lb 6VVlss8fiL1RJ7e6dAPfW69I1Zfg9VGCT0tYMEkgk7eW2Dwjl2q8+yHyt/rlG+/CBBnk qjrE+YVqN3ZIzxbSYOmkPM/4Wb5XjyJbkj7AGxJNzjeJ+LPMf/8qKu3wzxu+VVEiCGCO bDgH+4t0ZYVkLnA3uE2SuXhvPvVYQblqKEO+H2UKlxoTCpfor7WwwWvu4GYCze3aQn7H zFC1sfrBAvrV0OGtDAMsP6wih7u0SackzWcfsNuoHyla3MAyybJxpmuXv9dGnALt4680 1SXA== X-Gm-Message-State: AOAM531/aYO5NrCqtK0S1fQ4VQqt1lGMQEtOSrQ6peE24ptZdG4on1i4 6zbVL5jdNo6ACkv2/Y4kSjKxuKNBCYc= X-Google-Smtp-Source: ABdhPJzDEwBlnmXP57eg8NriH2j8uvDC+NsKwnyBuYdsWzQObrSVlsj9PMSQ6fcnLodIG3zSeOk+zA== X-Received: by 2002:a05:6512:b12:b0:44a:ba81:f874 with SMTP id w18-20020a0565120b1200b0044aba81f874mr3234909lfu.449.1648642733125; Wed, 30 Mar 2022 05:18:53 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id b35-20020a0565120ba300b0044a909dba3asm1124805lfv.266.2022.03.30.05.18.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 05:18:52 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Wed, 30 Mar 2022 14:17:50 +0200 Message-Id: <20220330121806.822-6-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 05/21] 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".