FFmpeg
4.0
|
GDI frame device demuxer. More...
#include "config.h"
#include "libavformat/internal.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include <windows.h>
Go to the source code of this file.
Data Structures | |
struct | gdigrab |
GDI Device Demuxer context. More... | |
Macros | |
#define | WIN32_API_ERROR(str) av_log(s1, AV_LOG_ERROR, str " (error %li)\n", GetLastError()) |
#define | REGION_WND_BORDER 3 |
#define | CURSOR_ERROR(str) |
#define | OFFSET(x) offsetof(struct gdigrab, x) |
#define | DEC AV_OPT_FLAG_DECODING_PARAM |
Functions | |
static LRESULT CALLBACK | gdigrab_region_wnd_proc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) |
Callback to handle Windows messages for the region outline window. More... | |
static int | gdigrab_region_wnd_init (AVFormatContext *s1, struct gdigrab *gdigrab) |
Initialize the region outline window. More... | |
static void | gdigrab_region_wnd_destroy (AVFormatContext *s1, struct gdigrab *gdigrab) |
Cleanup/free the region outline window. More... | |
static void | gdigrab_region_wnd_update (AVFormatContext *s1, struct gdigrab *gdigrab) |
Process the Windows message queue. More... | |
static int | gdigrab_read_header (AVFormatContext *s1) |
Initializes the gdi grab device demuxer (public device demuxer API). More... | |
static void | paint_mouse_pointer (AVFormatContext *s1, struct gdigrab *gdigrab) |
Paints a mouse pointer in a Win32 image. More... | |
static int | gdigrab_read_packet (AVFormatContext *s1, AVPacket *pkt) |
Grabs a frame from gdi (public device demuxer API). More... | |
static int | gdigrab_read_close (AVFormatContext *s1) |
Closes gdi frame grabber (public device demuxer API). More... | |
Variables | |
static const AVOption | options [] |
static const AVClass | gdigrab_class |
AVInputFormat | ff_gdigrab_demuxer |
gdi grabber device demuxer declaration More... | |
GDI frame device demuxer.
Definition in file gdigrab.c.
#define WIN32_API_ERROR | ( | str | ) | av_log(s1, AV_LOG_ERROR, str " (error %li)\n", GetLastError()) |
Definition at line 69 of file gdigrab.c.
Referenced by gdigrab_read_header(), gdigrab_read_packet(), and gdigrab_region_wnd_init().
#define REGION_WND_BORDER 3 |
Definition at line 72 of file gdigrab.c.
Referenced by gdigrab_region_wnd_init().
#define CURSOR_ERROR | ( | str | ) |
Referenced by paint_mouse_pointer().
#define DEC AV_OPT_FLAG_DECODING_PARAM |
|
static |
Callback to handle Windows messages for the region outline window.
In particular, this handles painting the frame rectangle.
hwnd | The region outline window handle. |
msg | The Windows message. |
wparam | First Windows message parameter. |
lparam | Second Windows message parameter. |
Definition at line 86 of file gdigrab.c.
Referenced by gdigrab_region_wnd_init().
|
static |
Initialize the region outline window.
s1 | The format context. |
gdigrab | gdigrab context. |
Definition at line 121 of file gdigrab.c.
Referenced by gdigrab_read_header().
|
static |
Cleanup/free the region outline window.
s1 | The format context. |
gdigrab | gdigrab context. |
Definition at line 187 of file gdigrab.c.
Referenced by gdigrab_read_close().
|
static |
Process the Windows message queue.
This is important to prevent Windows from thinking the window has become unresponsive. As well, things like WM_PAINT (to actually draw the window contents) are handled from the message queue context.
s1 | The format context. |
gdigrab | gdigrab context. |
Definition at line 205 of file gdigrab.c.
Referenced by gdigrab_read_packet().
|
static |
|
static |
Paints a mouse pointer in a Win32 image.
s1 | Context of the log information |
s | Current grad structure |
Definition at line 436 of file gdigrab.c.
Referenced by gdigrab_read_packet().
|
static |
|
static |
|
static |
|
static |
AVInputFormat ff_gdigrab_demuxer |
gdi grabber device demuxer declaration