libavdevice/x11grab.c File Reference

X11 frame device demuxer by Clemens Fruhwirth <clemens@endorphin.org> and Edouard Gomez <ed.gomez@free.fr>. More...

#include "config.h"
#include "libavformat/avformat.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>

Go to the source code of this file.

Data Structures

struct  x11_grab
 X11 Device Demuxer context. More...

Defines

#define _XOPEN_SOURCE   600

Functions

static int x11grab_read_header (AVFormatContext *s1, AVFormatParameters *ap)
 Initializes the x11 grab device demuxer (public device demuxer API).
static void paint_mouse_pointer (XImage *image, struct x11_grab *s)
 Paints a mouse pointer in an X11 image.
static int xget_zpixmap (Display *dpy, Drawable d, XImage *image, int x, int y)
 Reads new data in the image structure.
static int x11grab_read_packet (AVFormatContext *s1, AVPacket *pkt)
 Grabs a frame from x11 (public device demuxer API).
static int x11grab_read_close (AVFormatContext *s1)
 Closes x11 frame grabber (public device demuxer API).

Variables

AVInputFormat x11_grab_device_demuxer
 x11 grabber device demuxer declaration


Detailed Description

X11 frame device demuxer by Clemens Fruhwirth <clemens@endorphin.org> and Edouard Gomez <ed.gomez@free.fr>.

Definition in file x11grab.c.


Define Documentation

#define _XOPEN_SOURCE   600

Definition at line 38 of file x11grab.c.


Function Documentation

static void paint_mouse_pointer ( XImage *  image,
struct x11_grab s 
) [static]

Paints 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
x Mouse pointer coordinate
y Mouse pointer coordinate

Definition at line 250 of file x11grab.c.

Referenced by x11grab_read_packet().

static int x11grab_read_close ( AVFormatContext s1  )  [static]

Closes x11 frame grabber (public device demuxer API).

Parameters:
s1 Context from avformat core
Returns:
0 success, !0 failure

Definition at line 407 of file x11grab.c.

static int x11grab_read_header ( AVFormatContext s1,
AVFormatParameters ap 
) [static]

Initializes the x11 grab device demuxer (public device demuxer API).

Parameters:
s1 Context from avformat core
ap Parameters from avformat core
Returns:

Definition at line 85 of file x11grab.c.

static int x11grab_read_packet ( AVFormatContext s1,
AVPacket pkt 
) [static]

Grabs 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 345 of file x11grab.c.

static int xget_zpixmap ( Display *  dpy,
Drawable  d,
XImage *  image,
int  x,
int  y 
) [static]

Reads 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 301 of file x11grab.c.

Referenced by x11grab_read_packet().


Variable Documentation

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,
}
x11 grabber device demuxer declaration

Definition at line 430 of file x11grab.c.


Generated on Fri Oct 26 02:36:54 2012 for FFmpeg by  doxygen 1.5.8