#include "config.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include <time.h>
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xlibint.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#include <X11/extensions/Xfixes.h>
#include "avdevice.h"
Go to the source code of this file.
Data Structures | |
| struct | x11_grab |
| X11 Device Demuxer context. More... | |
Defines | |
| #define | OFFSET(x) offsetof(struct x11_grab, x) |
| #define | DEC AV_OPT_FLAG_DECODING_PARAM |
Functions | |
| static int | x11grab_read_header (AVFormatContext *s1, AVFormatParameters *ap) |
| Initialize the x11 grab device demuxer (public device demuxer API). | |
| static void | paint_mouse_pointer (XImage *image, struct x11_grab *s) |
| 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). | |
Variables | |
| static const AVOption | options [] |
| static const AVClass | x11_class |
| AVInputFormat | ff_x11_grab_device_demuxer |
| x11 grabber device demuxer declaration | |
Definition in file x11grab.c.
| static void paint_mouse_pointer | ( | XImage * | image, | |
| struct x11_grab * | s | |||
| ) | [static] |
Paint a mouse pointer in an X11 image.
| image | image to paint the mouse pointer to | |
| s | context used to retrieve original grabbing rectangle coordinates |
Definition at line 273 of file x11grab.c.
Referenced by x11grab_read_packet().
| static int x11grab_read_close | ( | AVFormatContext * | s1 | ) | [static] |
| static int x11grab_read_header | ( | AVFormatContext * | s1, | |
| AVFormatParameters * | ap | |||
| ) | [static] |
Initialize the x11 grab device demuxer (public device demuxer API).
| s1 | Context from avformat core | |
| ap | Parameters from avformat core |
| static int x11grab_read_packet | ( | AVFormatContext * | s1, | |
| AVPacket * | pkt | |||
| ) | [static] |
| static int xget_zpixmap | ( | Display * | dpy, | |
| Drawable | d, | |||
| XImage * | image, | |||
| int | x, | |||
| int | y | |||
| ) | [static] |
Read new data in the image structure.
| 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 |
Definition at line 341 of file x11grab.c.
Referenced by x11grab_read_packet().
Initial value:
{
"x11grab",
NULL_IF_CONFIG_SMALL("X11grab"),
sizeof(struct x11_grab),
NULL,
x11grab_read_header,
x11grab_read_packet,
x11grab_read_close,
.flags = AVFMT_NOFILE,
.priv_class = &x11_class,
}
Initial value:
{
{ "video_size", "A string describing frame size, such as 640x480 or hd720.", OFFSET(video_size), FF_OPT_TYPE_STRING, {.str = "vga"}, 0, 0, DEC },
{ "framerate", "", OFFSET(framerate), FF_OPT_TYPE_STRING, {.str = "ntsc"}, 0, 0, DEC },
{ NULL },
}
Initial value:
{
.class_name = "X11grab indev",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
}
1.5.8