[FFmpeg-devel] [PATCH] Screen frame grabbing for Win32 platform (bump)

Diego Biurrun diego
Sun Jan 23 20:35:47 CET 2011


Note: I know that Vitor is just sending in these patches for patchwork
to see them and that nobody is working on them.  So I'm just doing two
minute reviews but not spending any serious amount of time.

On Sun, Jan 23, 2011 at 05:13:00PM +0100, Vitor Sessak wrote:
>
> Git-friendly patch attached so patchwork will catch it up.

> --- a/configure
> +++ b/configure
> @@ -1403,6 +1403,8 @@ vfwcap_indev_deps="capCreateCaptureWindow"
>  vfwcap_indev_extralibs="-lavicap32"
>  x11_grab_device_indev_deps="x11grab XShmCreateImage"
>  x11_grab_device_indev_extralibs="-lX11 -lXext -lXfixes"
> +gdi_grab_device_indev_deps="GetBitmapBits"
> +gdi_grab_device_indev_extralibs="-lgdi32"

alphabetical order

> @@ -2701,6 +2703,8 @@ check_func XOpenDisplay -lX11           &&
>  check_func XShmCreateImage -lX11 -lXext &&
>  check_func XFixesGetCursorImage -lX11 -lXext -lXfixes
>  
> +check_func_headers "windows.h" GetBitmapBits "$gdi_grab_device_indev_extralibs"
> +
>  if ! disabled vdpau && enabled vdpau_vdpau_h; then
>  check_cpp_condition \
>      vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" ||
> --- a/doc/general.texi
> +++ b/doc/general.texi
> @@ -708,6 +708,7 @@ performance on systems without hardware floating point support).
>  @item VfW capture       @tab X      @tab
>  @item X11 grabbing      @tab X      @tab
> + at item Win32 grabbing    @tab X      @tab
>  @end multitable

alphabetical order

> --- a/libavdevice/Makefile
> +++ b/libavdevice/Makefile
> @@ -21,6 +21,7 @@ OBJS-$(CONFIG_V4L2_INDEV)                += v4l2.o
>  OBJS-$(CONFIG_VFWCAP_INDEV)              += vfwcap.o
>  OBJS-$(CONFIG_X11_GRAB_DEVICE_INDEV)     += x11grab.o
> +OBJS-$(CONFIG_GDI_GRAB_DEVICE_INDEV)     += gdigrab.o

alphabetical order

> --- a/libavdevice/alldevices.c
> +++ b/libavdevice/alldevices.c
> @@ -49,6 +49,7 @@ void avdevice_register_all(void)
>      REGISTER_INDEV    (VFWCAP, vfwcap);
>      REGISTER_INDEV    (X11_GRAB_DEVICE, x11_grab_device);
> +    REGISTER_INDEV    (GDI_GRAB_DEVICE, gdi_grab_device);

alphabetical order

> --- /dev/null
> +++ b/libavdevice/gdigrab.c
> @@ -0,0 +1,376 @@
> +
> +/**
> + * @file libavdevice/gdigrab.c

Drop the filename.

> +#include "config.h"
> +#include "libavformat/avformat.h"
> +#include <windows.h>

It's preferable to place system headers before local headers.

Diego



More information about the ffmpeg-devel mailing list