[FFmpeg-devel] [PATCH] Add Win32 GDI-based screen grabbing
eli at algotec.co.il
Wed Apr 2 09:32:20 CEST 2014
> > > 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
> (i686-pc-mingw32) or mingw-w64 (*-w64-mingw32)?
I just have to mention this - the SetWindowLongPtr function replaces SetWindowLong as it was limited to 32-bit DWORD values. Supported as of Windows 2000.
So, to properly build under borth 32-bit and 64-bit, only SetWindowLongPtr should be used. The constants change accordingly, in this case GWLP_WNDPROC as
When compiling for 32-bit, SetWindowLongPtr is actually defined to be SetWindowLong.
More information about the ffmpeg-devel