X11 frame device demuxer.
More...
#include "config.h"
#include <time.h>
#include <sys/shm.h>
#include <X11/cursorfont.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/Xfixes.h>
#include <X11/extensions/XShm.h>
#include "avdevice.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavformat/internal.h"
Go to the source code of this file.
|
static void | x11grab_draw_region_win (X11GrabContext *s) |
| Draw grabbing region window.
|
|
static void | x11grab_region_win_init (X11GrabContext *s) |
| Initialize grabbing region window.
|
|
static int | setup_shm (AVFormatContext *s, Display *dpy, XImage **image) |
|
static int | setup_mouse (Display *dpy, int screen) |
|
static int | pixfmt_from_image (AVFormatContext *s, XImage *image, int *pix_fmt) |
|
static int | x11grab_read_header (AVFormatContext *s1) |
| Initialize the x11 grab device demuxer (public device demuxer API).
|
|
static void | paint_mouse_pointer (XImage *image, AVFormatContext *s1) |
| Paint a mouse pointer in an X11 image.
|
|
static int | xget_zpixmap (Display *dpy, Drawable d, XImage *image, int x, int y) |
| Read new data in the image structure.
|
|
static int | x11grab_read_packet (AVFormatContext *s1, AVPacket *pkt) |
| Grab a frame from x11 (public device demuxer API).
|
|
static int | x11grab_read_close (AVFormatContext *s1) |
| Close x11 frame grabber (public device demuxer API).
|
|
#define REGION_WIN_BORDER 3 |
static int setup_shm |
( |
AVFormatContext * |
s, |
|
|
Display * |
dpy, |
|
|
XImage ** |
image |
|
) |
| |
|
static |
static int setup_mouse |
( |
Display * |
dpy, |
|
|
int |
screen |
|
) |
| |
|
static |
static int pixfmt_from_image |
( |
AVFormatContext * |
s, |
|
|
XImage * |
image, |
|
|
int * |
pix_fmt |
|
) |
| |
|
static |
Initialize the x11 grab device demuxer (public device demuxer API).
- Parameters
-
- Returns
-
Definition at line 258 of file x11grab.c.
Paint a mouse pointer in an X11 image.
- Parameters
-
image | image to paint the mouse pointer to |
s | context used to retrieve original grabbing rectangle coordinates |
Definition at line 393 of file x11grab.c.
Referenced by x11grab_read_packet().
static int xget_zpixmap |
( |
Display * |
dpy, |
|
|
Drawable |
d, |
|
|
XImage * |
image, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
|
static |
Read new data in the image structure.
- Parameters
-
dpy | X11 display to grab from |
d | |
image | Image where the grab will be put |
x | Top-Left grabbing rectangle horizontal coordinate |
y | Top-Left grabbing rectangle vertical coordinate |
- Returns
- 0 if error, !0 if successful
Definition at line 473 of file x11grab.c.
Referenced by x11grab_read_packet().
Grab a frame from x11 (public device demuxer API).
- Parameters
-
s1 | Context from avformat core |
pkt | Packet holding the brabbed frame |
- Returns
- frame size in bytes
Definition at line 515 of file x11grab.c.
Close x11 frame grabber (public device demuxer API).
- Parameters
-
- Returns
- 0 success, !0 failure
Definition at line 632 of file x11grab.c.
Initial value:= {
{ "follow_mouse", "move the grabbing region when the mouse pointer reaches within specified amount of pixels to the edge of region",
{ "centered", "keep the mouse pointer at the center of grabbing region when following",
}
Definition at line 659 of file x11grab.c.
Initial value:= {
.class_name = "X11grab indev",
}
Definition at line 676 of file x11grab.c.
Initial value:
x11 grabber device demuxer declaration
Definition at line 685 of file x11grab.c.