From patchwork Wed Jun 2 11:28: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: 28050 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp457031iof; Wed, 2 Jun 2021 04:30:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzb3mfMV6TVTzb5oytIE1na3kZU8QzVASynq6mobqwAjyhQuwMLDNunB1D6xAaFcgj5z9Kv X-Received: by 2002:a17:906:19d0:: with SMTP id h16mr9764414ejd.193.1622633411355; Wed, 02 Jun 2021 04:30:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622633411; cv=none; d=google.com; s=arc-20160816; b=B98muSnx40mDPDeAthiI3XtBGzMhzwTPLvWELHDROZuOOT1f2Ux/ZR2vaPP/Bepj6H lEGxBEpI5Gzy8yCjW6BTHoeBzPk2E072gB9l5pO/0KV+2hXklRuCdyb/fzxxtzhdzbKS sJL3A4DYa1NLUZdPfQw4slylGaHQNOuwZ/nsyV3sgHzatG2aBUzVQlGlB9YyOwJeOyOP 7xDZG9v7hiHSxTs4COIqK/LfCjCJ4aBByiYnwqIKbLcGDO+LcOzQfxhZ8kroK7la7Nk/ uNicVJhPmpMLxcSenY++m7/s9aDtUN79uzjpwd2MZ/Q+wlCU37gZIf6ivYAC2pOvfDOf jjwQ== 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=FUW04J1SzXfS0VxbI3rcnzkDXHaeUakqghFdoObizMM=; b=O/MiwytJkjkGXbCk6lsFCI//PRsam79I9tytjcnV5ngWcgUagouBJlytU8Q7Xnt3ka mwKch2LnFQdPvmSrYsz9qNI8+jApC7VudpQo7UoJ+NrW902Gx9Q7oWfpo4+3xfqMAru/ 7CsPIe+1HTXkM9OESNSaX3I5pBtX4Ugfo2HE/ntvTmaIQ++U3cu4S/A2V05gJXBHI1cn L78+JB0k2aL33I2VSg0AIozcnm854x9GGcldBHIIZELsG9S/DrGFkGX5RJAV9KSViyyI cRa54mEy+92hHf2U6hXcuNiCs51gRWmOWwUEhiFy/HGf/VrmXDjxuMJoibBsWA6rpWa3 teWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=WyJtsraH; 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 p3si21887174ejy.228.2021.06.02.04.30.11; Wed, 02 Jun 2021 04:30:11 -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=WyJtsraH; 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 4C602689E3B; Wed, 2 Jun 2021 14:29:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4C31B689F62 for ; Wed, 2 Jun 2021 14:29:23 +0300 (EEST) Received: by mail-lf1-f50.google.com with SMTP id b18so2785024lfv.11 for ; Wed, 02 Jun 2021 04:29:23 -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=63d/7q18GJa/f2DJkPbdcecTbhFZPP3C99PKfriHR+Y=; b=WyJtsraH4MQRCON7bSWfNb6K639jyZUwu/ra9hhpJTuOfS0yx2QMmfTbeeY+XlgVlO T87vqgGKKrzhn3dG81L9r6EB6ctJiTQRzKLyC94vhtkRUZd81A0SGJscqOX3RXfMgw7q FdOgmbSb5bU8q0ouN8FawnHbfwWkjMu8/b5MxQLX5Bw8C/jke6B22xPfzQhJpa23qsrY uS8vbN2JFBSgK5uZMmOgy92lyX552xACCpe8TzE0Ak55abY4pEmMedkOBIzF5gTsXTpO ssXc9pMplgJ3bGkhoFJbpygDdsv/PBqcguasFIQLpHwvGoe7sIWlOuX0Y7MyqtMQh3Tf qWxw== 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=63d/7q18GJa/f2DJkPbdcecTbhFZPP3C99PKfriHR+Y=; b=dk9JPAM5Irp+xGaNqvncs0sXiRBzsKm1E5tQ28LMoxy8Ftg75nrfT6rpUZS1ZSSpN6 1tFSALne/ocX/GeLOrAp0fU9S/+V3cjJxY70xATgy46ZQZ05CJC+IrHDdtCKCxkDHEK4 2RBs5EZd4yqRVL+GtSayWf1TWL+/I6hXt+ybUd+FdJBISBLX08zivRrEjxB5KE3nvDgo GFnwJH2awuH+vyKe1IbvAucXlb7iC3/tsDVGiSPTXMPoVC7nl+Nc8HK3uI+ILJvpLPox SyhLshsNrwHG/NxsohSSuRmXq6IAou8WD/EFnQoTApWAiVtsDGmNNT0unqFAKy5PbXJG uU0w== X-Gm-Message-State: AOAM532h6s+vHBxAg3tNQkQUiEdwaEeNX1OpQWqgTjNGkK9tHymU0Vxu si9ktuIdRDS4KjTlN0XeNwrmwhQqCnzYvQ== X-Received: by 2002:a05:6512:2249:: with SMTP id i9mr11191057lfu.592.1622633362435; Wed, 02 Jun 2021 04:29:22 -0700 (PDT) Received: from localhost.localdomain (deedock.humlab.lu.se. [130.235.135.183]) by smtp.gmail.com with ESMTPSA id v6sm1249497lfr.182.2021.06.02.04.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 04:29:22 -0700 (PDT) From: Diederick Niehorster To: ffmpeg-devel@ffmpeg.org Date: Wed, 2 Jun 2021 13:28:59 +0200 Message-Id: <20210602112901.2163-5-dcnieho@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20210602112901.2163-1-dcnieho@gmail.com> References: <20210602112901.2163-1-dcnieho@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 4/6] 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: JkN5p/A0jNdu 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 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index 6e0147aed7..561b85f4e0 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -928,6 +928,25 @@ 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: + { + int dialog = *(int*)data; + enum dshowDeviceType devtype = (dialog & 1) ? AudioDevice : VideoDevice; + if (dialog & 2) { + // device_dialog + if (ctx->device_filter[devtype]) + ff_dshow_show_filter_properties(ctx->device_filter[devtype], avctx); + } + else if (dialog & 2) { + // crossbar_connection_dialog + // TODO + } + else if (dialog & 4) { + // tv_tuner_dialog + // TODO + } + break; + } } if (run_state != ctx->is_running) {