Revision 616deed2 libavdevice/x11grab.c

View differences:

libavdevice/x11grab.c
55 55
/**
56 56
 * X11 Device Demuxer context
57 57
 */
58
typedef struct x11_grab_s
58
struct x11_grab
59 59
{
60 60
    int frame_size;          /**< Size in bytes of a grabbed frame */
61 61
    AVRational time_base;    /**< Time base */
......
71 71
    int use_shm;             /**< !0 when using XShm extension */
72 72
    XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm infos */
73 73
    int mouse_warning_shown;
74
} x11_grab_t;
74
};
75 75

  
76 76
/**
77 77
 * Initializes the x11 grab device demuxer (public device demuxer API).
......
87 87
static int
88 88
x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
89 89
{
90
    x11_grab_t *x11grab = s1->priv_data;
90
    struct x11_grab *x11grab = s1->priv_data;
91 91
    Display *dpy;
92 92
    AVStream *st = NULL;
93 93
    int input_pixfmt;
......
259 259
    if (XQueryPointer(dpy, mrootwindow, &mrootwindow, &childwindow,
260 260
                      x, y, &dummy, &dummy, (unsigned int*)&dummy)) {
261 261
    } else {
262
        x11_grab_t *s = s1->priv_data;
262
        struct x11_grab *s = s1->priv_data;
263 263
        if (!s->mouse_warning_shown) {
264 264
            av_log(s1, AV_LOG_INFO, "couldn't find mouse pointer\n");
265 265
            s->mouse_warning_shown = 1;
......
306 306
 * @param y Mouse pointer coordinate
307 307
 */
308 308
static void
309
paint_mouse_pointer(XImage *image, x11_grab_t *s, int x, int y)
309
paint_mouse_pointer(XImage *image, struct x11_grab *s, int x, int y)
310 310
{
311 311
    /* 16x20x1bpp bitmap for the black channel of the mouse pointer */
312 312
    static const uint16_t const mousePointerBlack[] =
......
431 431
static int
432 432
x11grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
433 433
{
434
    x11_grab_t *s = s1->priv_data;
434
    struct x11_grab *s = s1->priv_data;
435 435
    Display *dpy = s->dpy;
436 436
    XImage *image = s->image;
437 437
    int x_off = s->x_off;
......
495 495
static int
496 496
x11grab_read_close(AVFormatContext *s1)
497 497
{
498
    x11_grab_t *x11grab = s1->priv_data;
498
    struct x11_grab *x11grab = s1->priv_data;
499 499

  
500 500
    /* Detach cleanly from shared mem */
501 501
    if (x11grab->use_shm) {
......
520 520
{
521 521
    "x11grab",
522 522
    NULL_IF_CONFIG_SMALL("X11grab"),
523
    sizeof(x11_grab_t),
523
    sizeof(struct x11_grab),
524 524
    NULL,
525 525
    x11grab_read_header,
526 526
    x11grab_read_packet,

Also available in: Unified diff