[FFmpeg-devel] [PATCH] Add Win32 GDI-based screen grabbing
michaelni at gmx.at
Wed Apr 2 05:50:15 CEST 2014
On Tue, Apr 01, 2014 at 08:00:41PM -0700, Timothy Gu wrote:
> On Apr 1, 2014 7:35 PM, "Michael Niedermayer" <michaelni at gmx.at> wrote:
> > On Mon, Mar 24, 2014 at 04:36:37PM -0400, Calvin Walton wrote:
> > > Based on original code by Chrisotphe Gisquet in 2010, updated to work
> > > with current ffmpeg APIs.
> > >
> > > Supports grabbing a single window or an area of the screen, including
> > > support for multiple monitors (Windows does funky stuff with negative
> > > coordinates here).
> > >
> > > I've moved most of the configuration to AVOptions; the input file name
> > > is now only the string "desktop", or "title=<windowname>" to select a
> > > single window. The AVOptions are the same as x11grab where possible.
> > >
> > > Code has been added to support a "show_region" mode, like x11grab, which
> > > will draw a rectangle on the screen around the area being captured.
> > >
> > > Instead of duplicating code for paletted image handling, I make use of
> > > the GDI API's ability to output DIB (BMP) images, which can be run
> > > through ffmpeg's existing BMP decoder.
> > >
> > > Signed-off-by: Calvin Walton <calvin.walton at kepstin.ca>
> > > ---
> > > Changelog | 1 +
> > > configure | 5 +
> > > doc/general.texi | 1 +
> > > doc/indevs.texi | 75 ++++++
> > > libavdevice/Makefile | 1 +
> > > libavdevice/alldevices.c | 1 +
> > > libavdevice/gdigrab.c | 635
> > > 7 files changed, 719 insertions(+)
> > > create mode 100644 libavdevice/gdigrab.c
> > this breaks compilation with mingw
> > ffmpeg/libavdevice/gdigrab.c: In function 'gdigrab_region_wnd_init':
> > ffmpeg/libavdevice/gdigrab.c:162:29: error: 'GWL_WNDPROC' undeclared
> (first use in this function)
> > ffmpeg/libavdevice/gdigrab.c:162:29: note: each undeclared identifier is
> reported only once for each function it appears in
> > ffmpeg/libavdevice/gdigrab.c: In function 'gdigrab_read_packet':
> That should probably be *GWLP_**WNDPROC*. See
> But I'm not sure if that will fix compilation though. Are you using MinGW32
> (i686-pc-mingw32) or mingw-w64 (*-w64-mingw32)?
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel