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 3E9124012A for ; Thu, 3 Nov 2022 10:58:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 491CA68BF16; Thu, 3 Nov 2022 12:58:54 +0200 (EET) Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2296F68BEFA for ; Thu, 3 Nov 2022 12:58:48 +0200 (EET) Date: Thu, 3 Nov 2022 11:56:37 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lena.place; s=key1; t=1667473127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H4Is2SmJrj3cl1yAtxboxi3SGAeRM1Zhk7j4TlPX/ls=; b=ThVhqMNlnTl0J3oet/7i4jEbnvq0FowY5vnDQRiqC7DU+HrflGUHMq1ksHONVS6a2/vMGF TnCrIt2OE3/8sPoy1F5hnhXkAEsk6jXqM4fEQj4wmf0OfTZ6mCOkrsN+652QSbwZK/08kx umACxrz30OeCaplQVaZqNTwWr1E8tV45Z98S39jIzSwcq1j4lJ8TrvEaAF2WG1KpSomy6l UdK4VEAZ/ubTkFrrbHhmQXC7rI+09FY/bQunHtC78Y1VDLKfksTxk27wc+EIDzELHqEtBn 0yoLmhAdklF3W7IQgr614Plyk92FWuUdTVL3hgdn0q2B9TXTMIyV1NgWp5j+hg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lena To: ffmpeg-devel@ffmpeg.org Message-ID: <20221103115637.49a59969@adryzz-desktop> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT Subject: [FFmpeg-devel] [PATCH] avdevice/gdigrab: Allow capturing a window by its handle 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 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: Signed-off-by: Lena --- libavdevice/gdigrab.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c index c069232472..05d3c0c929 100644 --- a/libavdevice/gdigrab.c +++ b/libavdevice/gdigrab.c @@ -273,9 +273,13 @@ gdigrab_read_header(AVFormatContext *s1) } } else if (!strcmp(filename, "desktop")) { hwnd = NULL; + } else if (!strncmp(filename, "hwnd=", 5)) { + name = filename + 5; + + hwnd = strtol(name, NULL, 0); } else { av_log(s1, AV_LOG_ERROR, - "Please use \"desktop\" or \"title=\" to specify your target.\n"); + "Please use \"desktop\", \"title=\" or \"hwnd=\" to specify your target.\n"); ret = AVERROR(EIO); goto error; } -- 2.37.3 _______________________________________________ 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".