[FFmpeg-devel] [PATCH] Add Win32 GDI-based screen grabbing
Michael Niedermayer
michaelni at gmx.at
Wed Apr 2 21:55:13 CEST 2014
On Wed, Apr 02, 2014 at 02:25:30PM -0400, Calvin Walton wrote:
> On Wed, 2014-04-02 at 07:32 +0000, Eli Kara wrote:
> > > > > 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
> > > http://msdn.microsoft.com/en-us/library/windows/desktop/ms644898(v=vs.85).aspx.
> > >
> > > But I'm not sure if that will fix compilation though. Are you using
> > > MinGW32
> > > (i686-pc-mingw32) or mingw-w64 (*-w64-mingw32)?
> >
> > > 64bit
> >
> > 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
> > mentioned before.
> > When compiling for 32-bit, SetWindowLongPtr is actually defined to be
> > SetWindowLong.
>
> My fault; I was only targeting 32-bit builds with my development
> (although I was using mingw-w64 to do so). I just now tried doing a
> 64-bit build and I see the build error (and a few printf format warnings
> in an old debug string). I am already using SetWindowLongPtr, the error
> was simply that I forgot the 'P' on the constant name :)
>
> I'll submit a new patch that fixes the build error and corrects
> Cristophe's name.
>
> As far as maintaining it going forwards - I am, quite honestly, not a
> windows developer; this capture work was done as part of a project which
> didn't really go anywhere in the end. I just figured that since I had
> something working, I might as well share it.
ok, anyone else interrested in maintaining it ?
roger ?
eli ?
someone else ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140402/072d97d7/attachment.asc>
More information about the ffmpeg-devel
mailing list