~kamalmostafa/ubuntu/lucid/pdp/fix-504941-ftbfs

« back to all changes in this revision

Viewing changes to include/pdp_xvideo.h

  • Committer: Bazaar Package Importer
  • Author(s): Guenter Geiger (Debian/GNU)
  • Date: 2005-03-15 22:21:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050315222105-1q287rsihmd9j1tb
Tags: 1:0.12.4-2
* fixed the hardcoded depends
* added 3dp library

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/*
3
 
 *   Pure Data Packet header file: xwindow glue code
4
 
 *   Copyright (c) by Tom Schouten <pdp@zzz.kotnet.org>
5
 
 *
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.
10
 
 *
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.
15
 
 *
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.
19
 
 *
20
 
 */
21
 
 
22
 
 
23
 
// x stuff
24
 
#include <X11/Xlib.h>
25
 
#include <X11/Xatom.h>
26
 
#include <X11/extensions/Xv.h>
27
 
#include <X11/extensions/Xvlib.h>
28
 
 
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 */
33
 
 
34
 
 
35
 
 
36
 
/* xvideo class */
37
 
typedef struct _pdp_xvideo
38
 
{
39
 
 
40
 
    t_pdp_xdisplay *xdpy;
41
 
    t_pdp_xwindow  *xwin;
42
 
    //Display *dpy;
43
 
    //int screen;
44
 
    //Window win;
45
 
    
46
 
 
47
 
 
48
 
    int xv_format;
49
 
    int xv_port;
50
 
 
51
 
    XvImage *xvi;
52
 
    unsigned char *data;
53
 
    unsigned int width;
54
 
    unsigned int height;
55
 
    int last_encoding;
56
 
 
57
 
    int  initialized;
58
 
 
59
 
} t_pdp_xvideo;
60
 
 
61
 
 
62
 
/* cons */
63
 
void pdp_xvideo_init(t_pdp_xvideo *x);
64
 
t_pdp_xvideo *pdp_xvideo_new(void);
65
 
 
66
 
/* des */
67
 
void pdp_xvideo_cleanup(t_pdp_xvideo* x);
68
 
void pdp_xvideo_free(t_pdp_xvideo* x);
69
 
 
70
 
 
71
 
/* open an xv port (and create XvImage) */
72
 
int pdp_xvideo_open_on_display(t_pdp_xvideo *x, t_pdp_xdisplay *d);
73
 
 
74
 
/* close xv port (and delete XvImage */
75
 
void pdp_xvideo_close(t_pdp_xvideo* x);
76
 
 
77
 
/* display a packet */
78
 
void pdp_xvideo_display_packet(t_pdp_xvideo *x, t_pdp_xwindow *w, int packet);