3
* Pure Data Packet header file: xwindow glue code
4
* Copyright (c) by Tom Schouten <pdp@zzz.kotnet.org>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
#include <X11/Xatom.h>
26
#include <X11/extensions/Xv.h>
27
#include <X11/extensions/Xvlib.h>
29
// image formats for communication with the X Server
30
#define FOURCC_YV12 0x32315659 /* YV12 YUV420P */
31
#define FOURCC_YUV2 0x32595559 /* YUV2 YUV422 */
32
#define FOURCC_I420 0x30323449 /* I420 Intel Indeo 4 */
37
typedef struct _pdp_xvideo
63
void pdp_xvideo_init(t_pdp_xvideo *x);
64
t_pdp_xvideo *pdp_xvideo_new(void);
67
void pdp_xvideo_cleanup(t_pdp_xvideo* x);
68
void pdp_xvideo_free(t_pdp_xvideo* x);
71
/* open an xv port (and create XvImage) */
72
int pdp_xvideo_open_on_display(t_pdp_xvideo *x, t_pdp_xdisplay *d);
74
/* close xv port (and delete XvImage */
75
void pdp_xvideo_close(t_pdp_xvideo* x);
77
/* display a packet */
78
void pdp_xvideo_display_packet(t_pdp_xvideo *x, t_pdp_xwindow *w, int packet);