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 "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "libavformat/internal.h"
#include "avdevice.h"
Go to the source code of this file.
|
static void | x11grab_draw_region_win (X11GrabContext *s) |
| Draw grabbing region window. More...
|
|
static void | x11grab_region_win_init (X11GrabContext *s) |
| Initialize grabbing region window. More...
|
|
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). More...
|
|
static void | paint_mouse_pointer (XImage *image, AVFormatContext *s1) |
| Paint a mouse pointer in an X11 image. More...
|
|
static int | xget_zpixmap (Display *dpy, Drawable d, XImage *image, int x, int y) |
| Read new data in the image structure. More...
|
|
static int | x11grab_read_packet (AVFormatContext *s1, AVPacket *pkt) |
| Grab a frame from x11 (public device demuxer API). More...
|
|
static int | x11grab_read_close (AVFormatContext *s1) |
| Close x11 frame grabber (public device demuxer API). More...
|
|
#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 259 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 395 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 475 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 517 of file x11grab.c.
Close x11 frame grabber (public device demuxer API).
- Parameters
-
- Returns
- 0 success, !0 failure
Definition at line 634 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",
}
offset must point to AVRational
offset must point to two consecutive integers
char * framerate
Set by a private option.
Definition at line 661 of file x11grab.c.
Initial value:= {
.class_name = "X11grab indev",
}
#define LIBAVUTIL_VERSION_INT
static const AVOption options[]
Definition at line 678 of file x11grab.c.
Initial value:= {
.name = "x11grab",
}
static int x11grab_read_header(AVFormatContext *s1)
Initialize the x11 grab device demuxer (public device demuxer API).
static int x11grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
Grab a frame from x11 (public device demuxer API).
static av_cold int read_close(AVFormatContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVClass x11_class
static int x11grab_read_close(AVFormatContext *s1)
Close x11 frame grabber (public device demuxer API).
static int read_header(FFV1Context *f)
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
X11 device demuxer context.
x11 grabber device demuxer declaration
Definition at line 687 of file x11grab.c.