From: Timo Rothenpieler <timo@rothenpieler.org> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] avdevice: add dxgigrab Date: Thu, 9 Feb 2023 16:58:46 +0100 Message-ID: <78ebed94-3730-7054-677b-40c99f7b8615@rothenpieler.org> (raw) In-Reply-To: <20230209142255.38657-1-aline.gondimsantos@savoirfairelinux.com> On 09.02.2023 15:22, aline.gondimsantos@savoirfairelinux.com wrote: > From: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> > > A dxgi grab device may be either a display or a window. > Differently from the existing gdigrab, this new device does > not make the mouse to flick and also allows proper grabbing of > accelerated windows, such as chrome or visual studio code. How do you get access to the d3d hwdevice, given this lives in lavd, which has no provisions for that? This looks much more like it'd fit in with the desktop duplication capture, which ended up being a vsrc filter for that reason. > Signed-off-by: Aline Gondim Santos <aline.gondimsantos@savoirfairelinux.com> > --- > configure | 1 + > libavdevice/Makefile | 4 + > libavdevice/alldevices.c | 1 + > libavdevice/d3dHelpers.h | 59 ++++++++ > libavdevice/direct3d11.interop.h | 51 +++++++ > libavdevice/dxgigrab.cpp | 225 +++++++++++++++++++++++++++++++ > libavdevice/dxgigrab.h | 83 ++++++++++++ > libavdevice/dxgigrab_c.c | 59 ++++++++ > libavdevice/dxgigrab_c.h | 98 ++++++++++++++ > libavdevice/windows_capture.cpp | 184 +++++++++++++++++++++++++ > libavdevice/windows_capture.h | 82 +++++++++++ The name of these files seem way too generic to just sit there like this in the top level. > 11 files changed, 847 insertions(+) > create mode 100644 libavdevice/d3dHelpers.h > create mode 100644 libavdevice/direct3d11.interop.h > create mode 100644 libavdevice/dxgigrab.cpp > create mode 100644 libavdevice/dxgigrab.h > create mode 100644 libavdevice/dxgigrab_c.c > create mode 100644 libavdevice/dxgigrab_c.h > create mode 100644 libavdevice/windows_capture.cpp > create mode 100644 libavdevice/windows_capture.h > > diff --git a/configure b/configure > index 12184c7f26..c9cbee0c09 100755 > --- a/configure > +++ b/configure > @@ -3529,6 +3529,7 @@ fbdev_outdev_deps="linux_fb_h" > gdigrab_indev_deps="CreateDIBSection" > gdigrab_indev_extralibs="-lgdi32" > gdigrab_indev_select="bmp_decoder" > +dxgigrab_indev_extralibs="-ldxgi -ld3d11" > iec61883_indev_deps="libiec61883" > iec61883_indev_select="dv_demuxer" > jack_indev_deps="libjack" > diff --git a/libavdevice/Makefile b/libavdevice/Makefile > index 8a62822b69..6740012000 100644 > --- a/libavdevice/Makefile > +++ b/libavdevice/Makefile > @@ -30,6 +30,7 @@ OBJS-$(CONFIG_FBDEV_INDEV) += fbdev_dec.o \ > OBJS-$(CONFIG_FBDEV_OUTDEV) += fbdev_enc.o \ > fbdev_common.o > OBJS-$(CONFIG_GDIGRAB_INDEV) += gdigrab.o > +OBJS-$(CONFIG_DXGIGRAB_INDEV) += windows_capture.o dxgigrab.o dxgigrab_c.o > OBJS-$(CONFIG_IEC61883_INDEV) += iec61883.o > OBJS-$(CONFIG_JACK_INDEV) += jack.o timefilter.o > OBJS-$(CONFIG_KMSGRAB_INDEV) += kmsgrab.o > @@ -72,5 +73,8 @@ SKIPHEADERS-$(CONFIG_V4L2_INDEV) += v4l2-common.h > SKIPHEADERS-$(CONFIG_V4L2_OUTDEV) += v4l2-common.h > SKIPHEADERS-$(CONFIG_ALSA) += alsa.h > SKIPHEADERS-$(CONFIG_SNDIO) += sndio.h > +SKIPHEADERS-$(CONFIG_DXGIGRAB_INDEV) += dxgigrab.h \ > + windows_capture.h \ > + dxgigrab_c.h > > TESTPROGS-$(CONFIG_JACK_INDEV) += timefilter > diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c > index 22323a0a44..fb0a37513b 100644 > --- a/libavdevice/alldevices.c > +++ b/libavdevice/alldevices.c > @@ -35,6 +35,7 @@ extern const AVInputFormat ff_dshow_demuxer; > extern const AVInputFormat ff_fbdev_demuxer; > extern const AVOutputFormat ff_fbdev_muxer; > extern const AVInputFormat ff_gdigrab_demuxer; > +extern const AVInputFormat ff_dxgigrab_demuxer; > extern const AVInputFormat ff_iec61883_demuxer; > extern const AVInputFormat ff_jack_demuxer; > extern const AVInputFormat ff_kmsgrab_demuxer; > diff --git a/libavdevice/d3dHelpers.h b/libavdevice/d3dHelpers.h > new file mode 100644 > index 0000000000..d8d2c003ec > --- /dev/null > +++ b/libavdevice/d3dHelpers.h > @@ -0,0 +1,59 @@ > +/* > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public License > + * as published by the Free Software Foundation; either version 2.1 > + * of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA > + */ > + > +#pragma once > + > +#include <winrt/Windows.UI.Composition.h> > +#include <windows.ui.composition.interop.h> > +#include <d2d1_1.h> Are these headers parts of any normal windows SDK? I don't see them in anything mingw has. Does this break cross compiling from Linux, or with anything that's not MSVC? And given it's winrt... does this work on normal Desktop Windows? _______________________________________________ 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".
next prev parent reply other threads:[~2023-02-09 15:58 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-09 14:22 aline.gondimsantos 2023-02-09 15:58 ` Timo Rothenpieler [this message] 2023-02-09 16:10 ` Nicolas George 2023-02-09 16:38 ` Timo Rothenpieler 2023-02-09 19:01 ` Aline Gondim Santos Gondim Santos 2023-02-09 22:00 ` Michael Niedermayer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=78ebed94-3730-7054-677b-40c99f7b8615@rothenpieler.org \ --to=timo@rothenpieler.org \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git